...
IF "VAT Currency Factor" <> "Currency Factor" THEN BEGIN
// Delete the following lines.
CurrencyFactor := GenJnlLine."VAT Currency Factor";
InsertVAT(
GLEntry.Amount,"VAT Amount to Report (LCY)","VAT Base Amt. to Report (LCY)","Source Currency Code",
GLEntry."Additional-Currency Amount",AddCurrGLEntryVATAmt,"Source Curr. VAT Base Amount")
// End of the deleted lines.
END ELSE
...
...
IF "VAT Currency Factor" <> "Currency Factor" THEN BEGIN
// Add the following lines.
IF "Source Currency Code" = GLSetup."Additional Reporting Currency" THEN BEGIN
xCurrencyFactor := CurrencyFactor;
CurrencyFactor := GenJnlLine."VAT Currency Factor";
END;
InsertVAT(
GLEntry.Amount,"VAT Amount to Report (LCY)","VAT Base Amt. to Report (LCY)","Source Currency Code",
GLEntry."Additional-Currency Amount",AddCurrGLEntryVATAmt,"Source Curr. VAT Base Amount");
IF "Source Currency Code" = GLSetup."Additional Reporting Currency" THEN
CurrencyFactor := xCurrencyFactor;
// End of the added lines.
END ELSE
...