...
IF "Currency Code" = '' THEN
CurrencyCode := GLSetup."LCY Code";
ELSE
CurrencyCode := "Currency Code";
...
...
IF "Currency Code" = '' THEN
CurrencyCode := GLSetup."LCY Code"
ELSE
CurrencyCode := "Currency Code";
// Add the following lines.
IF CurrencyCode = GLSetup."LCY Code" THEN
Currency.InitRoundingPrecision
ELSE BEGIN
Currency.GET(CurrencyCode);
Currency.TESTFIELD("Amount Rounding Precision");
END;
// End of the added lines.
...
...
TotalInvDiscountAmount := 0;
IF SalesInvLine2.FINDSET THEN
REPEAT
TotalInvDiscountAmount := TotalInvDiscountAmount + SalesInvLine2."Inv. Discount Amount" +
SalesInvLine2."Line Discount Amount";
...
...
TotalInvDiscountAmount := 0;
IF SalesInvLine2.FINDSET THEN
REPEAT
// Add the following line.
ExcludeVAT(SalesInvLine2,"Prices Including VAT");
// End of the added line.
TotalInvDiscountAmount := TotalInvDiscountAmount + SalesInvLine2."Inv. Discount Amount" +
SalesInvLine2."Line Discount Amount";
...
...
TaxableAmount := 0;
TaxAmount := 0;
SalesInvLine2.RESET;
SalesInvLine2.COPY(SalesInvLine);
SalesInvLineFound := FALSE;
IF SalesInvLine2.FINDSET THEN
REPEAT
TaxableAmount := TaxableAmount + SalesInvLine2.Amount + SalesInvLine2."Inv. Discount Amount" +
SalesInvLine2."Line Discount Amount";
...
...
TaxableAmount := 0;
TaxAmount := 0;
SalesInvLine2.RESET;
SalesInvLine2.COPY(SalesInvLine);
SalesInvLineFound := FALSE;
IF SalesInvLine2.FINDSET THEN
REPEAT
// Add the following line.
ExcludeVAT(SalesInvLine2,"Prices Including VAT");
// End of the added line.
TaxableAmount := TaxableAmount + SalesInvLine2.Amount + SalesInvLine2."Inv. Discount Amount" +
SalesInvLine2."Line Discount Amount";
...
...
REPEAT
SalesInvLine.TESTFIELD(Description);
AddElement(XMLCurrNode,'InvoiceLine','',DocNameSpace2,XMLNewChild,Prefix2);
...
...
REPEAT
SalesInvLine.TESTFIELD(Description);
// Add the following line.
ExcludeVAT(SalesInvLine,"Prices Including VAT");
// End of the added line.
AddElement(XMLCurrNode,'InvoiceLine','',DocNameSpace2,XMLNewChild,Prefix2);
...