IF
/* Usual Non Working Day. EDLH Duration = 0. No Event. No Toggle Shift */
EmployeeLabourMonth.D18T WAS CHANGED AND
CHARS_FROM_LEFT(EmployeeLabourMonth.D18T,1)<>'-' AND
EmployeeLabourMonth.ps_EDLH18.Duration=0 AND
EmployeeLabourMonth.ps_EDLH18.ps_AbsenceApplicationEvent IS UNDEFINED
THEN
EmployeeLabourMonth.D18WD='Yes'
EmployeeLabourMonth.D18D=AS_NUMBER(EmployeeLabourMonth.D18T)*3600000
EmployeeLabourMonth.ps_EDLH18.TimeStart=EmployeeLabourMonth.ob_EmployeeSalaryPlanPeriod.ps_EmployeePayrollSettings.DefaultTimeStart
EmployeeLabourMonth.ps_EDLH18.TimeEnd=EmployeeLabourMonth.ps_EDLH18.TimeStart+EmployeeLabourMonth.D18D
ELSE
IF
/* Usual Non Working Day. EDLH Duration = 0. No Event. Toggle Shift */
EmployeeLabourMonth.D18T WAS CHANGED AND
CHARS_FROM_LEFT(EmployeeLabourMonth.D18T,1)='-' AND
EmployeeLabourMonth.ps_EDLH18.Duration=0 AND
EmployeeLabourMonth.ps_EDLH18.ps_AbsenceApplicationEvent IS UNDEFINED
THEN
EmployeeLabourMonth.D18WD='Yes'
EmployeeLabourMonth.D18T=REPLACE_PATTERN (EmployeeLabourMonth.D18T,'-','')
EmployeeLabourMonth.D18D=AS_NUMBER(EmployeeLabourMonth.D18T)*3600000
EmployeeLabourMonth.ps_EDLH18.TimeStart=EmployeeLabourMonth.ob_EmployeeSalaryPlanPeriod.ps_EmployeePayrollSettings.DefaultTimeStart
EmployeeLabourMonth.ps_EDLH18.TimeEnd=EmployeeLabourMonth.ps_EDLH18.TimeStart+EmployeeLabourMonth.D18D
ToggleDayshiftNightshift USING EmployeeLabourMonth.ps_EDLH18
In the logs I am seeing this error.....
Clearly it is concerning the 2nd line of each IF.
CHARS_FROM_LEFT Error.jpg (33.99 KiB) Viewed 4843 times
Wondering if anyone can either spot what is wrong and / or suggest how to fix please?
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....