Merged PR 19733: Bug Fix #2. TW Lot Qty Adjust
Fixed improper usage of CreateTestRunRecord. Removed unnecessary development gates and unnecessary code usages.
This commit is contained in:
parent
a878c9bb2e
commit
401c03d752
@ -114,6 +114,7 @@ Event PUB_SUBMIT.CLICK()
|
|||||||
CurrWfrQty = Database_Services('ReadDataColumn', 'LOT', LotId, LOT_WAFER_QTY$, True$, 0, False$)
|
CurrWfrQty = Database_Services('ReadDataColumn', 'LOT', LotId, LOT_WAFER_QTY$, True$, 0, False$)
|
||||||
AmountToDecrease = 0
|
AmountToDecrease = 0
|
||||||
AmountToIncrease = 0
|
AmountToIncrease = 0
|
||||||
|
|
||||||
If RowExists('LOT', LotId) then
|
If RowExists('LOT', LotId) then
|
||||||
If NewWfrQty NE '' then
|
If NewWfrQty NE '' then
|
||||||
if Num(NewWfrQty) then
|
if Num(NewWfrQty) then
|
||||||
@ -127,7 +128,7 @@ Event PUB_SUBMIT.CLICK()
|
|||||||
Case NewWfrQty LT CurrWfrQty
|
Case NewWfrQty LT CurrWfrQty
|
||||||
AmountToDecrease = CurrWfrQty - NewWfrQty
|
AmountToDecrease = CurrWfrQty - NewWfrQty
|
||||||
PSNNo = Xlate('RDS', LotID, 'PROD_SPEC_ID', 'X')
|
PSNNo = Xlate('RDS', LotID, 'PROD_SPEC_ID', 'X')
|
||||||
Test_Run_Services('CreateTestRunRecord', 13, '', '', PSNNo, '', @User4, LotID, NewWfrQty, True$)
|
Test_Run_Services('CreateTestRunRecord', 13, '', '', PSNNo, '', @User4, LotID, AmountToDecrease, True$)
|
||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'COMMENT', 'Manual Lot Qty decrease performed.', '', @User4, '' , '')
|
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'COMMENT', 'Manual Lot Qty decrease performed.', '', @User4, '' , '')
|
||||||
end
|
end
|
||||||
@ -194,3 +195,4 @@ return
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -340,26 +340,22 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
|
|||||||
Response = ''
|
Response = ''
|
||||||
ErrorMessage = ''
|
ErrorMessage = ''
|
||||||
If ManualQtyAdjust EQ '' then ManualQtyAdjust = False$
|
If ManualQtyAdjust EQ '' then ManualQtyAdjust = False$
|
||||||
TWTrackingSystemActive = Database_Services('ReadDataColumn', 'APP_INFO', 'NEW_TW_SYSTEM_ACTIVE_SWITCH', 1, True$, 0, False$)
|
If TWLotIds NE '' then
|
||||||
//Pre-Checks.
|
for each TWLotId in TWLotIds using @VM setting twLotPos
|
||||||
If TWTrackingSystemActive then
|
ThisTWLotCurrQty = Database_Services('ReadDataColumn', 'LOT', TWLotId, LOT_WAFER_QTY$, True$, 0, False$)
|
||||||
If TWLotIds NE '' then
|
If ThisTWLotCurrQty then
|
||||||
for each TWLotId in TWLotIds using @VM setting twLotPos
|
ThisTWLotUsageQty = TWLotQtys<1, twLotPos>
|
||||||
ThisTWLotCurrQty = Database_Services('ReadDataColumn', 'LOT', TWLotId, LOT_WAFER_QTY$, True$, 0, False$)
|
If ThisTWLotCurrQty LT ThisTWLotUsageQty then
|
||||||
If ThisTWLotCurrQty then
|
ErrorMessage = 'Error in Create Test Run Record routine. Lot # ' : TWLotId : ' does not have enough wafers. Please choose ' : ThisTWLotCurrQty : ' wafers or less.'
|
||||||
ThisTWLotUsageQty = TWLotQtys<1, twLotPos>
|
|
||||||
If ThisTWLotCurrQty LT ThisTWLotUsageQty then
|
|
||||||
ErrorMessage = 'Error in Create Test Run Record routine. Lot # ' : TWLotId : ' does not have enough wafers. Please choose ' : ThisTWLotCurrQty : ' wafers or less.'
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
ErrorMessage = 'Error in Create Test Run Record routine. Lot # ' : TWLotId : ' has a zero wafer quantity.'
|
|
||||||
end
|
end
|
||||||
Until ErrorMessage NE ''
|
end else
|
||||||
Next TWLotId
|
ErrorMessage = 'Error in Create Test Run Record routine. Lot # ' : TWLotId : ' has a zero wafer quantity.'
|
||||||
end else
|
end
|
||||||
ErrorMessage = 'Error in Create Test Run Record routine. No test wafer lots entered.'
|
Until ErrorMessage NE ''
|
||||||
end
|
Next TWLotId
|
||||||
end
|
end else
|
||||||
|
ErrorMessage = 'Error in Create Test Run Record routine. No test wafer lots entered.'
|
||||||
|
end
|
||||||
If ErrorMessage EQ '' then
|
If ErrorMessage EQ '' then
|
||||||
If (RunTypeID NE '' AND UserID NE '' AND EqpType NE '' AND EqpID NE '') OR (RunTypeID NE '' AND UserID NE '' AND ManualQtyAdjust EQ True$) then
|
If (RunTypeID NE '' AND UserID NE '' AND EqpType NE '' AND EqpID NE '') OR (RunTypeID NE '' AND UserID NE '' AND ManualQtyAdjust EQ True$) then
|
||||||
RunDTM = SRP_Datetime('Now')
|
RunDTM = SRP_Datetime('Now')
|
||||||
@ -456,23 +452,20 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
|
|||||||
ErrorMessage = 'Error in Create Test Run Record routine, Invalid qty for lot ' : TWLotId : ' passed to routine.'
|
ErrorMessage = 'Error in Create Test Run Record routine, Invalid qty for lot ' : TWLotId : ' passed to routine.'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end else
|
end else
|
||||||
//Lot is not classified as a test wafer lot.
|
//Lot is not classified as a test wafer lot.
|
||||||
|
ErrorMessage = 'Lot is not a test wafer lot.'
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
//Lot is on hold
|
//Lot is on hold
|
||||||
|
ErrorMessage = 'Lot is currently on hold.'
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
//Lot is not open
|
//Lot is not open
|
||||||
|
ErrorMessage = 'Lot is currently not in an open status.'
|
||||||
end
|
end
|
||||||
until ErrorMessage NE ''
|
until ErrorMessage NE ''
|
||||||
Next TWLotId
|
Next TWLotId
|
||||||
If ErrorMessage EQ '' then
|
|
||||||
//commit everything
|
|
||||||
end else
|
|
||||||
//commit nothing, there was an error.
|
|
||||||
end
|
|
||||||
end else
|
end else
|
||||||
//Supports legacy TW logging
|
//Supports legacy TW logging
|
||||||
Response = TWRunKey
|
Response = TWRunKey
|
||||||
@ -841,3 +834,4 @@ end service
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user