...
VATBusinessPostingGroup.INIT;
IF CreateFile THEN
// Delete the following lines.
InsertLine2File("Posting Date","No.",AmountLCY,
VATAmountLCY,Customer."VAT Registration No.",
"Sell-to Customer Name",UnitedVATInvoice,VATBusinessPostingGroup."VAT to Be Paid by Customer");
// End of the lines.
AmountWithVATLCY := ROUND(AmountWithVATLCY, RoundingPrecision);
AmountLCY := ROUND(AmountLCY, RoundingPrecision);
VATAmountLCY := ROUND(VATAmountLCY, RoundingPrecision);
...
...
VATBusinessPostingGroup.INIT;
IF CreateFile THEN
// Add the following lines.
InsertLine2File(
"Posting Date",
"No.",
AmountLCY,
VATAmountLCY,
GetRegistrationNo(Customer."VAT Registration No.",Customer."Registration No."),
"Sell-to Customer Name",
UnitedVATInvoice,
VATBusinessPostingGroup."VAT to Be Paid by Customer");
// End of the lines.
AmountWithVATLCY := ROUND(AmountWithVATLCY, RoundingPrecision);
AmountLCY := ROUND(AmountLCY, RoundingPrecision);
VATAmountLCY := ROUND(VATAmountLCY, RoundingPrecision);
...