pre cutover push

This commit is contained in:
Infineon\StieberD
2024-09-04 20:33:41 -07:00
parent 6ea6969f4b
commit 7762b129af
2072 changed files with 130000 additions and 95295 deletions

View File

@ -12,7 +12,7 @@ COMPILE FUNCTION obj_PM_Spec(Method,Parms)
SendReminders ;* Send Notes reminding of calibrations coming due
*/
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, Dialog_Box, Popup, NextKey, Database_Services, Datetime
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, Dialog_Box, Popup, NextKey, Database_Services, Datetime, SRP_Datetime
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, RList, obj_Notes, ErrMsg, Btree.Extract, Database_Services
$INSERT LOGICAL
@ -88,7 +88,7 @@ SchedStart:
PMRec = XLATE('PM',PMKey,'','X')
SchedStart = ''
IF SchedUnits = 'D' THEN
IF SchedUnits = 'D' OR SchedUnits = 'M' THEN
SchedStart = OCONV(PMRec<PM_SCHED_DT$>,'D')
END
@ -136,6 +136,10 @@ EarlyStart:
EarlyStart = OCONV(PMRec<PM_SCHED_DT$> - Delta ,'D')
END
If SchedUnits = 'M' then
EarlyStart = OConv(SRP_Datetime('AddMonths', PMRec<PM_SCHED_DT$>, (-Delta)), 'D')
end
IF SchedUnits = 'T' THEN
Delta = ( Delta/24 ) ;* Convert hours to decimal part of day
SchedTM = ( PMRec<PM_SCHED_TM$> / 86400 ) ;* Sec (since midnight ) * Sec/Day => decimal part of day
@ -181,6 +185,10 @@ LateStart:
Start = OCONV(PMRec<PM_SCHED_DT$> + Delta ,'D')
END
If SchedUnits = 'M' then
Start = OConv(SRP_Datetime('AddMonths', PMRec<PM_SCHED_DT$>, (Delta)), 'D')
end
IF SchedUnits = 'T' THEN
Delta = ( Delta/24 ) ;* Convert hours to decimal part of day
SchedTM = ( PMRec<PM_SCHED_TM$> / 86400 ) ;* Sec (since midnight ) * Sec/Day => decimal part of day
@ -264,7 +272,10 @@ SchedNewPM:
BEGIN CASE
CASE Units = 'D'
SchedDt = thisStartDt + PMSpecRec<PM_SPEC_INTERVAL$> ;* Interval is in days
Case Units = 'M'
SchedDt = SRP_Datetime('AddMonths', thisStartDt, PMSpecRec<PM_SPEC_INTERVAL$>)
CASE Units = 'T'
Interval = PMSpecRec<PM_SPEC_INTERVAL$> ;* Interval is in hours
Interval = ( Interval/24 ) ;* Convert hours to decimal part of day