...
PROCEDURE GetOriginalCurrencyFactor@2() : Decimal;
BEGIN
IF "Original Currency Factor" = 0 THEN
EXIT(1);
EXIT("Original Currency Factor");
END;
BEGIN
END.
}
}
...
PROCEDURE GetOriginalCurrencyFactor@2() : Decimal;
BEGIN
IF "Original Currency Factor" = 0 THEN
EXIT(1);
EXIT("Original Currency Factor");
END;
// Add the following lines.
PROCEDURE CalcOverDueBalance@1100(CustomerNo@1101 : Code[20]) OverDueBalance : Decimal;
VAR
CustLedgerEntry@1102 : Record 21;
BEGIN
SetFiltersToCalcOverDueBalance(CustLedgerEntry,CustomerNo);
IF CustLedgerEntry.FINDSET THEN BEGIN
REPEAT
CustLedgerEntry.CALCFIELDS("Amount (LCY)");
OverDueBalance += CustLedgerEntry."Amount (LCY)";
UNTIL (CustLedgerEntry.NEXT = 0);
END ELSE
OverDueBalance := 0;
END;
PROCEDURE SetFiltersToCalcOverDueBalance@1103(VAR CustLedgerEntry@1104 : Record 21;CustomerNo@1105 : Code[20]);
BEGIN
CustLedgerEntry.SETCURRENTKEY("Customer No.",Open,Positive,"Due Date","Currency Code");
CustLedgerEntry.SETRANGE("Customer No.",CustomerNo);
CustLedgerEntry.SETRANGE(Open,TRUE);
CustLedgerEntry.SETFILTER("Due Date",'<%1',WORKDATE);
END;
// End of the lines.
BEGIN
END.
}
}