...
VendLedgEntry.CALCFIELDS("Remaining Amount");
KAZV.Purposal :=
COPYSTR(
STRSUBSTNO(
DELCHR(PaymentSetup."Foreign Payment Proposal",'>'),
DELCHR(FORMAT(VendLedgEntry."External Document No."),'>'),
DELCHR(FORMAT(VendLedgEntry."Document No."),'>'),
FORMAT(VendLedgEntry."Document Date",8,'<day,2>.<month,2>.<year,2>'),
DELCHR(FORMAT(ABS(KAZV.Amount-(VendLedgEntry."Remaining Amount" + GenJnlLine.Amount)),12,'<Sign><Integer><Decimals,3>')),
DELCHR(FORMAT(ABS(VendLedgEntry."Remaining Amount" + GenJnlLine.Amount),8,'<Sign><Integer><Decimals,3>')),
DELCHR(FORMAT(ABS(KAZV.Amount),12,'<Sign><Integer><Decimals,3>')),
FORMAT(GenJnlLine."Posting Date",8,'<day,2>.<month,2>.<year,2>'),
DELCHR(FORMAT(VendLedgEntry."Currency Code")),
KAZV.CheckDocType(KAZV."Document Type")),
1,35);...
...
VendLedgEntry.CALCFIELDS("Remaining Amount","Original Amount");
KAZV.Purposal :=
COPYSTR(
STRSUBSTNO(
DELCHR(PaymentSetup."Foreign Payment Proposal",'>'),
DELCHR(FORMAT(VendLedgEntry."External Document No."),'>'),
DELCHR(FORMAT(VendLedgEntry."Document No."),'>'),
FORMAT(VendLedgEntry."Document Date",8,'<day,2>.<month,2>.<year,2>'),
DELCHR(FORMAT(ABS(KAZV.Amount),12,'<Sign><Integer><Decimals,3>')),
DELCHR(FORMAT(ABS(VendLedgEntry."Remaining Amount" + GenJnlLine.Amount),8,'<Sign><Integer><Decimals,3>')),
DELCHR(FORMAT(ABS(VendLedgEntry."Original Amount"),12,'<Sign><Integer><Decimals,3>')),
FORMAT(GenJnlLine."Posting Date",8,'<day,2>.<month,2>.<year,2>'),
DELCHR(FORMAT(VendLedgEntry."Currency Code")),
KAZV.CheckDocType(KAZV."Document Type")),
1,35);
...