I have the following Rule on a BO....
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.

Wondering if anyone can either spot what is wrong and / or suggest how to fix please?