Fixed a bug in obj_WO_Mat_Log('Post') function that would fail to properly process transactions out of order

This commit is contained in:
Infineon\StieberD
2025-10-01 15:23:42 -07:00
parent 705237545f
commit 128bf2ef8d
6 changed files with 70 additions and 50 deletions

View File

@ -41,9 +41,11 @@ Function OI_Wizard_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Recor
***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler
$insert LOGICAL
$insert FILE.SYSTEM.EQUATES
$insert ACTION_SETUP
$Insert LOGICAL
$Insert FILE.SYSTEM.EQUATES
$Insert ACTION_SETUP
$Insert OI_WIZARD_EQUATES
$Insert TIME_INSERTS
Declare function UCase, Utility_DotNet, Database_Services, Error_Services, Datetime
@ -140,12 +142,10 @@ VALID:
LastDate = {CREATED_DATE}
LastTime = {CREATED_TIME}
end
lastDateTime = Iconv(Oconv(LastDate, 'D4/') : ' ' : Oconv(LastTime, 'MTS'), 'DTS')
SessionAge = (Datetime() - lastDateTime) * 86400
// 600 seconds = 10 minutes
If SessionAge LT 600 then
Valid = True$
end
LastDateTime = Iconv(Oconv(LastDate, 'D4/') : ' ' : Oconv(LastTime, 'MTS'), 'DTS')
SessionAge = (Datetime() - LastDateTime) * SECONDS_IN_DAY$
MaxAge = HOUR_IN_SECONDS$ * 12
If SessionAge LT MaxAge then Valid = True$
end
ActionFlow = Valid
@ -164,8 +164,9 @@ EXPIRY:
LastTime = {CREATED_TIME}
end
lastDateTime = Iconv(Oconv(LastDate, 'D4/') : ' ' : Oconv(LastTime, 'MTS'), 'DTS')
// Set expiry to last updated datetime (i.e. last time the session was updated/validated) plus 10 minutes
Expiry = lastDateTime + (600 / 86400)
// Set expiry to last updated datetime (i.e. last time the session was updated/validated)
// plus 12 hours (0.5 of a day).
Expiry = lastDateTime + 0.5
end
ActionFlow = Expiry
@ -288,3 +289,4 @@ Restore_System_Variables:
@FILE.ERROR = OrigFileError
return