...
LetterLine.FIELDERROR(
"Amount Linked To Journal Line",
STRSUBSTNO(Text008,LetterLine.FIELDCAPTION("Amount To Link"),LetterLine."Amount To Link",
LetterLine.TABLECAPTION,GenJnlLine.TABLECAPTION));
TotalAmount := TotalAmount + LetterLine."Amount Linked To Journal Line";
// Delete the following lines.
IF ABS(TotalAmount) > ABS(GenJnlLine.Amount) THEN
LetterLine.FIELDERROR(
"Amount Linked To Journal Line",
STRSUBSTNO(Text008,GenJnlLine.FIELDCAPTION(Amount),GenJnlLine.Amount,
LetterLine.TABLECAPTION,GenJnlLine.TABLECAPTION));
UNTIL LetterLine.NEXT = 0;
// End of the deleted lines.
...
...
LetterLine.FIELDERROR(
"Amount Linked To Journal Line",
STRSUBSTNO(Text008,LetterLine.FIELDCAPTION("Amount To Link"),LetterLine."Amount To Link",
LetterLine.TABLECAPTION,GenJnlLine.TABLECAPTION));
TotalAmount := TotalAmount + LetterLine."Amount Linked To Journal Line";
// Add the following lines.
UNTIL LetterLine.NEXT = 0;
IF ABS(TotalAmount) > ABS(GenJnlLine.Amount) THEN
LetterLine.FIELDERROR(
"Amount Linked To Journal Line",
STRSUBSTNO(Text008,GenJnlLine.FIELDCAPTION(Amount),GenJnlLine.Amount,
LetterLine.TABLECAPTION,GenJnlLine.TABLECAPTION));
//End of the added lines.
...