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$)
|
||||
AmountToDecrease = 0
|
||||
AmountToIncrease = 0
|
||||
|
||||
If RowExists('LOT', LotId) then
|
||||
If NewWfrQty NE '' then
|
||||
if Num(NewWfrQty) then
|
||||
@ -127,7 +128,7 @@ Event PUB_SUBMIT.CLICK()
|
||||
Case NewWfrQty LT CurrWfrQty
|
||||
AmountToDecrease = CurrWfrQty - NewWfrQty
|
||||
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
|
||||
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'COMMENT', 'Manual Lot Qty decrease performed.', '', @User4, '' , '')
|
||||
end
|
||||
@ -194,3 +195,4 @@ return
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -340,26 +340,22 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
|
||||
Response = ''
|
||||
ErrorMessage = ''
|
||||
If ManualQtyAdjust EQ '' then ManualQtyAdjust = False$
|
||||
TWTrackingSystemActive = Database_Services('ReadDataColumn', 'APP_INFO', 'NEW_TW_SYSTEM_ACTIVE_SWITCH', 1, True$, 0, False$)
|
||||
//Pre-Checks.
|
||||
If TWTrackingSystemActive then
|
||||
If TWLotIds NE '' then
|
||||
for each TWLotId in TWLotIds using @VM setting twLotPos
|
||||
ThisTWLotCurrQty = Database_Services('ReadDataColumn', 'LOT', TWLotId, LOT_WAFER_QTY$, True$, 0, False$)
|
||||
If ThisTWLotCurrQty then
|
||||
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.'
|
||||
If TWLotIds NE '' then
|
||||
for each TWLotId in TWLotIds using @VM setting twLotPos
|
||||
ThisTWLotCurrQty = Database_Services('ReadDataColumn', 'LOT', TWLotId, LOT_WAFER_QTY$, True$, 0, False$)
|
||||
If ThisTWLotCurrQty then
|
||||
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
|
||||
Until ErrorMessage NE ''
|
||||
Next TWLotId
|
||||
end else
|
||||
ErrorMessage = 'Error in Create Test Run Record routine. No test wafer lots entered.'
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMessage = 'Error in Create Test Run Record routine. Lot # ' : TWLotId : ' has a zero wafer quantity.'
|
||||
end
|
||||
Until ErrorMessage NE ''
|
||||
Next TWLotId
|
||||
end else
|
||||
ErrorMessage = 'Error in Create Test Run Record routine. No test wafer lots entered.'
|
||||
end
|
||||
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
|
||||
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.'
|
||||
end
|
||||
end
|
||||
|
||||
end else
|
||||
//Lot is not classified as a test wafer lot.
|
||||
ErrorMessage = 'Lot is not a test wafer lot.'
|
||||
end
|
||||
end else
|
||||
//Lot is on hold
|
||||
ErrorMessage = 'Lot is currently on hold.'
|
||||
end
|
||||
end else
|
||||
//Lot is not open
|
||||
ErrorMessage = 'Lot is currently not in an open status.'
|
||||
end
|
||||
until ErrorMessage NE ''
|
||||
Next TWLotId
|
||||
If ErrorMessage EQ '' then
|
||||
//commit everything
|
||||
end else
|
||||
//commit nothing, there was an error.
|
||||
end
|
||||
end else
|
||||
//Supports legacy TW logging
|
||||
Response = TWRunKey
|
||||
@ -841,3 +834,4 @@ end service
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user