I need to get netto sallary for last month in my report and this code doesn't work. Can someone help

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;

Answers

  • ErictPErictP Member Posts: 164
    Try this:
    ECL1.SETFILTER(ECL1."Contract Termination Date",'>=%1', CALCDATE('-1M', TODAY));
    ECL1.SETFILTER(ECL1."Contract Activation Date",'<=%1', CALCDATE('-1M', TODAY));
  • Vesna_1Vesna_1 Member Posts: 23
    It's not working...
Sign In or Register to comment.