Code changes
Note Always test code fixes in a controlled environment before you apply the fixes to your production computers.
To resolve this problem, follow these steps:
1. Change the code in the OnAfterGetRecord of DataItem 2 in the Salary Payment Order report (3010606) as follows:
Existing code
…
DirectPay1 := DirectPay1 + Amount
ELSE
DirectPay2 := DirectPay2 + Amount;
IF DirectPay2 <> 0 THEN BEGIN
NetPayment1 := DirectPay1;
NetPayment2 := DirectPay2;
…
Replacement code
…
DirectPay1 := DirectPay1 + Amount
ELSE
DirectPay2 := DirectPay2 + Amount;
RecordCount := RecordCount + 1;
IF RecordCount <> "Salary Entry".COUNT THEN
CurrReport.SKIP;
IF DirectPay2 <> 0 THEN BEGIN
NetPayment1 := DirectPay1;
NetPayment2 := DirectPay2;
…
Existing code
…
BenAdr := Staff."Beneficiary Address 2";
BenCity := '';
END;
RecordCount := RecordCount + 1;
IF RecordCount <> "Salary Entry".COUNT THEN
CurrReport.SKIP;
END;
Replacement code
…
BenAdr := Staff."Beneficiary Address 2";
BenCity := '';
END;
END;