...
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 SalesCrMemoLine2.FINDSET THEN
REPEAT
TotalInvDiscountAmount := TotalInvDiscountAmount + SalesCrMemoLine2."Inv. Discount Amount" +
SalesCrMemoLine2."Line Discount Amount";
...
...
TotalInvDiscountAmount := 0;
IF SalesCrMemoLine2.FINDSET THEN
REPEAT
// Add the following line.
ExcludeVAT(SalesCrMemoLine2,"Prices Including VAT");
// End of the added line.
TotalInvDiscountAmount := TotalInvDiscountAmount + SalesCrMemoLine2."Inv. Discount Amount" +
SalesCrMemoLine2."Line Discount Amount";
...
...
TaxableAmount:=0;
TaxAmount:=0;
SalesCrMemoLine2.RESET;
SalesCrMemoLine2.COPY(SalesCrMemoLine);
SalesCrMemoLineFound := FALSE;
IF SalesCrMemoLine2.FINDSET THEN
REPEAT
TaxableAmount := TaxableAmount + SalesCrMemoLine2.Amount + SalesCrMemoLine2."Inv. Discount Amount" +
SalesCrMemoLine2."Line Discount Amount";
...
...
TaxableAmount:=0;
TaxAmount:=0;
SalesCrMemoLine2.RESET;
SalesCrMemoLine2.COPY(SalesCrMemoLine);
SalesCrMemoLineFound := FALSE;
IF SalesCrMemoLine2.FINDSET THEN
REPEAT
// Add the following line.
ExcludeVAT(SalesCrMemoLine2,"Prices Including VAT");
// End of the added line.
TaxableAmount := TaxableAmount + SalesCrMemoLine2.Amount + SalesCrMemoLine2."Inv. Discount Amount" +
SalesCrMemoLine2."Line Discount Amount";
...
...
SalesCrMemoLine.TESTFIELD(Description);
AddElement(XMLCurrNode,'CreditNoteLine','',DocNameSpace2,XMLNewChild,Prefix2);
...
...
SalesCrMemoLine.TESTFIELD(Description);
// Add the following line.
ExcludeVAT(SalesCrMemoLine,"Prices Including VAT");
// End of the added line.
AddElement(XMLCurrNode,'CreditNoteLine','',DocNameSpace2,XMLNewChild,Prefix2);
...