...
IF GenJnlTemplate.Recurring THEN BEGIN
// Recurring journal
LineCount := 0;
GenJnlLine2.COPY(GenJnlLine);
GenJnlLine2.FINDSET(TRUE,FALSE);
REPEAT
LineCount := LineCount + 1;
Window.UPDATE(9,LineCount);
Window.UPDATE(10,ROUND(LineCount / NoOfRecords * 10000,1));
IF GenJnlLine2."Posting Date" <> 0D THEN
GenJnlLine2.VALIDATE(
"Posting Date",CALCDATE(GenJnlLine2."Recurring Frequency",GenJnlLine2."Posting Date"));
IF NOT
(GenJnlLine2."Recurring Method" IN
[GenJnlLine2."Recurring Method"::"F Fixed",
GenJnlLine2."Recurring Method"::"RF Reversing Fixed"])
THEN
//Delete the following line.
MultiplyAmounts(GenJnlLine2,0);
GenJnlLine2.MODIFY;
UNTIL GenJnlLine2.NEXT = 0;
END ELSE BEGIN
...
...
IF GenJnlTemplate.Recurring THEN BEGIN
// Recurring journal
LineCount := 0;
GenJnlLine2.COPY(GenJnlLine);
GenJnlLine2.FINDSET(TRUE,FALSE);
REPEAT
LineCount := LineCount + 1;
Window.UPDATE(9,LineCount);
Window.UPDATE(10,ROUND(LineCount / NoOfRecords * 10000,1));
//Add the following lines.
OldVATAmount := GenJnlLine2."VAT Amount";
OldVATPct := GenJnlLine2."VAT %";
//End of the lines.
IF GenJnlLine2."Posting Date" <> 0D THEN
GenJnlLine2.VALIDATE(
"Posting Date",CALCDATE(GenJnlLine2."Recurring Frequency",GenJnlLine2."Posting Date"));
IF NOT
(GenJnlLine2."Recurring Method" IN
[GenJnlLine2."Recurring Method"::"F Fixed",
GenJnlLine2."Recurring Method"::"RF Reversing Fixed"])
THEN
//Add the following lines.
MultiplyAmounts(GenJnlLine2,0)
ELSE
IF (GenJnlLine2."VAT %" = OldVATPct) and (GenJnlLine2."VAT Amount" <> OldVATAmount) THEN
GenJnlLine2.VALIDATE("VAT Amount",OldVATAmount);
//End of the lines.
GenJnlLine2.MODIFY;
UNTIL GenJnlLine2.NEXT = 0;
END ELSE BEGIN
...