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:
Ouellette Jonathan (CSC FI SPS MESLEO)
2025-06-27 22:15:12 +02:00
parent a878c9bb2e
commit 401c03d752
2 changed files with 22 additions and 26 deletions

View File

@ -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

View File

@ -340,9 +340,6 @@ 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$)
@ -359,7 +356,6 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
end else
ErrorMessage = 'Error in Create Test Run Record routine. No test wafer lots entered.'
end
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