modfied some logging

This commit is contained in:
Infineon\StieberD
2025-04-01 16:50:52 -07:00
parent 07054d0075
commit 5b8ec59e68
3 changed files with 28 additions and 22 deletions

View File

@ -52,9 +52,10 @@ $Insert EVENT_SETUP
$Insert APP_INSERTS
$Insert MSG_EQUATES
$Insert POPUP_EQUATES
$Insert WO_LOG_EQUATES
Declare subroutine Errmsg, Btree.Extract, Set_Status, Logging_Services, Work_Order_Services
Declare function obj_WO_Log, Work_Order_Services, Environment_Services, Logging_Services
Declare function obj_WO_Log, Work_Order_Services, Environment_Services, Logging_Services, Database_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/')
@ -258,9 +259,28 @@ PopulateControls:
Swap ',' with @VM in Ctrls
Swap ',' with @VM in Cols
WORec = Database_Services('ReadDataRow', 'WO_LOG', WONo)
WOQty = WORec<WO_LOG_QTY$>
// Pull these quantities using obj_WO_Log to ensure they are up-to-date.
// The physical fields are updated via the PROC_QUEUE and may lag by a few seconds.
RxQty = obj_WO_Log('RxQty', WONo:@RM:WORec)
RelQty = obj_WO_Log('RelQty', WONo:@RM:WORec)
UnRelQty = WOQty - RelQty
For each Ctrl in Ctrls using @VM setting vPos
Val = Xlate('WO_LOG', WONo, Cols<0, vPos>, 'X')
Begin Case
Case Ctrl EQ 'EDL_RX_QTY'
Val = RxQty
Case Ctrl EQ 'EDL_REL_QTY'
Val = RelQty
Case Ctrl EQ 'EDL_UNREL_QTY'
Val = UnRelQty
Case Otherwise$
Val = Xlate('WO_LOG', WONo, Cols<0, vPos>, 'X')
End Case
Set_Property(@Window:'.':Ctrl, 'DEFPROP', Val)
Running = Msg(@WINDOW, MsgUp, vPos, MSGINSTUPDATE$) ;* Update message