Netto:=0;
ECL1.RESET;
ECL1.SETFILTER("Employee No.","No.");
ECL1.SETFILTER(ECL1."Contract Termination Date",'>=CALCDATE(<TODAY-1M>)');
ECL1.SETFILTER(ECL1."Contract Activation Date",'<=CALCDATE(<TODAY-1M>)');
IF ECL1.FINDLAST THEN BEGIN
Netto:=ECL1.Netto
END
ELSE BEGIN
Netto:=0;
END;
0
Answers
ECL1.SETFILTER(ECL1."Contract Termination Date",'>=%1', CALCDATE('-1M', TODAY));
ECL1.SETFILTER(ECL1."Contract Activation Date",'<=%1', CALCDATE('-1M', TODAY));