Various bug fixes with scanner, form validation within the adjust lot qty form, and added scroll bars on the view lot form

This commit is contained in:
Infineon\Ouellette
2025-02-11 15:25:57 -07:00
parent 76915aff9a
commit 5e00026748
7 changed files with 320 additions and 195 deletions

View File

@ -42,6 +42,7 @@ Event WINDOW.CREATE(CreateParam)
Set_Property(@Window : '.PUB_SEARCH_LOT', 'VISIBLE', True$)
end
end else
msg(@Window, 'Only Lead, Supervisors, or engineering may adjust lot quantities')
Result = ''
Result<1> = False$
End_Dialog(@Window, Result)
@ -58,27 +59,44 @@ end event
Event EDL_NEW_LOT_WFR_QTY.CHANGED(NewLotQty)
NewLotQty = Get_Property(@Window : '.EDL_NEW_LOT_WFR_QTY', 'TEXT')
If Num(NewLotQty) then
If NewLotQty LE 25 AND NewLotQty GE 0 then
Set_Property(@Window : '.PUB_SUBMIT', 'ENABLED', True$)
If NewLotQty NE '' then
If Num(NewLotQty) then
If NewLotQty LE 25 AND NewLotQty GE 0 then
Set_Property(@Window : '.PUB_SUBMIT', 'ENABLED', True$)
end else
msg(@Window, 'New wafer quantity value must be a number between 0 and 25.')
Set_Property(@Window : '.EDL_NEW_LOT_WFR_QTY', 'TEXT', '')
end
end else
msg(@Window, 'New wafer quantity value must be a number between 0 and 25.')
end
end else
If NewLotQty NE '' then
msg(@Window, 'New wafer quantity value must be a number between 0 and 25.')
end
If NewLotQty NE '' then
msg(@Window, 'New wafer quantity value must be a number between 0 and 25.')
end
end
end
end event
Event EDL_LOT_NO.CHANGED(LotNo)
LotIdString = Get_Property(@Window : '.EDL_LOT_NO', 'TEXT')
Begin Case
Case LotIdString[1, 4] EQ '1TTW'
Set_Property(@Window : '.EDL_LOT_NO', 'TEXT', LotIdString[3, 999])
Case LotIdString[1, 2] EQ '1T'
Set_Property(@Window : '.EDL_LOT_NO', 'TEXT', LotIdString[3, 999])
End Case
LotNo = Get_Property(@Window : '.EDL_LOT_NO', 'TEXT')
If LotNo[1, 4] EQ '1T' then
LotNo = LotNo[3, 999]
Set_Property(@Window : '.EDL_LOT_NO', 'TEXT', LotNo)
end
end event
Event EDL_LOT_NO.LOSTFOCUS(Flag, FocusID)
Set_Property(@Window : '.EDL_CURR_WFR_QTY', 'TEXT', '')
Set_Property(@Window : '.EDL_NEW_LOT_WFR_QTY', 'TEXT', '')
LotNo = Get_Property(@Window : '.EDL_LOT_NO', 'TEXT')
If LotNo[1, 4] EQ '1T' then
LotNo = LotNo[3, 999]
Set_Property(@Window : '.EDL_LOT_NO', 'TEXT', LotNo)
end
If RowExists('LOT', LotNo) then
GoSub GetLotCurrData
end
end event
Event PUB_SEARCH_LOT.CLICK()
@ -95,26 +113,43 @@ Event PUB_SUBMIT.CLICK()
CurrWfrQty = Database_Services('ReadDataColumn', 'LOT', LotId, LOT_WAFER_QTY$, True$, 0, False$)
AmountToDecrease = 0
AmountToIncrease = 0
If NewWfrQty NE CurrWfrQty then
Begin Case
Case NewWfrQty LT CurrWfrQty
AmountToDecrease = CurrWfrQty - NewWfrQty
Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'REDUCE_WAFER_QTY', 'Adjust wafer count by ' : AmountToDecrease, '', AmountToDecrease, 0, '', @User4)
Case NewWfrQty GT CurrWfrQty
AmountToIncrease = NewWfrQty - CurrWfrQty
Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'BONUS_WAFER_QTY', 'Adjust wafer count by ' : AmountToIncrease, '', 0, AmountToIncrease, '', @User4)
End Case
If Error_Services('NoError') then
msg(@Window, 'Wafer quantity adjusted successfully!')
Result = ''
Result<1> = True$
End_Dialog(@Window, Result)
If RowExists('LOT', LotId) then
If NewWfrQty NE '' then
if Num(NewWfrQty) then
If NewWfrQty NE CurrWfrQty then
MsgHead = 'Adjust lot wafer quantity'
MsgText = 'Are you sure you wish to adjust lot ' : LotId : ' wafer quantity from ' : CurrWfrQty : ' to ' : NewWfrQty : '?'
OK = Msg(@WINDOW,'','YESNO','',MsgHead:@FM:MsgText)
If OK then
Begin Case
Case NewWfrQty LT CurrWfrQty
AmountToDecrease = CurrWfrQty - NewWfrQty
Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'REDUCE_WAFER_QTY', 'Adjust wafer count by ' : AmountToDecrease, '', AmountToDecrease, 0, '', @User4)
Case NewWfrQty GT CurrWfrQty
AmountToIncrease = NewWfrQty - CurrWfrQty
Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'BONUS_WAFER_QTY', 'Adjust wafer count by ' : AmountToIncrease, '', 0, AmountToIncrease, '', @User4)
End Case
If Error_Services('NoError') then
msg(@Window, 'Wafer quantity adjusted successfully!')
Result = ''
Result<1> = True$
End_Dialog(@Window, Result)
end else
ErrorMessage = Error_Services('GetMessage')
msg(@Window, 'Error Adjusting wafer quantity, ' : ErrorMessage)
end
end
end
end else
msg(@Window, 'New wafer count must be a number between 0-25')
end
end else
ErrorMessage = Error_Services('GetMessage')
msg(@Window, 'Error Adjusting wafer quantity, ' : ErrorMessage)
msg(@Window, 'New wafer count cannot be blank and must be a number between 0-25')
end
end else
msg(@Window, 'Lot # ' : LotId : ' not found!')
end
end event
Event PUB_CANCEL.CLICK()
@ -139,3 +174,4 @@ GetLotCurrData:
return