diff --git a/LSL2/STPROC/NDW_ADJUST_LOT_QTY_EVENTS.txt b/LSL2/STPROC/NDW_ADJUST_LOT_QTY_EVENTS.txt index 983d829..dc88436 100644 --- a/LSL2/STPROC/NDW_ADJUST_LOT_QTY_EVENTS.txt +++ b/LSL2/STPROC/NDW_ADJUST_LOT_QTY_EVENTS.txt @@ -3,7 +3,7 @@ Compile function NDW_ADJUST_LOT_QTY_EVENTS(CtrlEntId, Event, @PARAMS) #window NDW_ADJUST_LOT_QTY Declare function MemberOf, Database_Services, Error_Services, Datetime -Declare subroutine PlaceDialog, Database_Services, Lot_Services +Declare subroutine PlaceDialog, Database_Services, Lot_Services, Lot_Event_Services $Insert App_Inserts $Insert Lot_Equates @@ -125,10 +125,16 @@ Event PUB_SUBMIT.CLICK() Begin Case Case NewWfrQty LT CurrWfrQty AmountToDecrease = CurrWfrQty - NewWfrQty - Lot_Services('ReduceLotWaferCount', LotId, AmountToDecrease, @User4) + Lot_Services('ReduceLotWaferCount', LotId, AmountToDecrease, @User4) + If Error_Services('NoError') then + Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'COMMENT', 'Manual Lot Qty decrease performed.', '', @User4, '' , '') + end Case NewWfrQty GT CurrWfrQty AmountToIncrease = NewWfrQty - CurrWfrQty Lot_Services('IncreaseLotWaferCount', LotId, AmountToIncrease, @User4) + If Error_Services('NoError') then + Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'COMMENT', 'Manual Lot Qty increase performed.', '', @User4, '' , '') + end End Case If Error_Services('NoError') then msg(@Window, 'Wafer quantity adjusted successfully!') @@ -176,3 +182,4 @@ return +