...
("Line Amount" - "Invoice Discount Amount" - "VAT Base" - "VAT Difference") *
(1 - PurchHeader."VAT Base Discount %" / 100),
Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
"Amount Including VAT" := "VAT Base" + "VAT Amount";
// Delete the following lines.
"VAT Base (Non Deductible)" := CalcAmountPart("VAT Base","VAT % (Non Deductible)");
"VAT Amount (Non Deductible)" :=
PrevVatAmountLine."VAT Amount (Non Deductible)" +
CalcAmountPart("Line Amount" - "Invoice Discount Amount" - "VAT Base","VAT % (Non Deductible)");
// End of the lines.
IF Positive THEN
PrevVatAmountLine.INIT
ELSE BEGIN
PrevVatAmountLine := VATAmountLine;
...
...
("Line Amount" - "Invoice Discount Amount" - "VAT Base" - "VAT Difference") *
(1 - PurchHeader."VAT Base Discount %" / 100),
Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
"Amount Including VAT" := "VAT Base" + "VAT Amount";
// Add the following lines.
"VAT Base (Non Deductible)" := CalcAmountPart(Currency,"VAT Base","VAT % (Non Deductible)");
"VAT Amount (Non Deductible)" :=
PrevVatAmountLine."VAT Amount (Non Deductible)" +
CalcAmountPart(Currency,"Line Amount" - "Invoice Discount Amount" - "VAT Base","VAT % (Non Deductible)");
// End of the lines.
IF Positive THEN
PrevVatAmountLine.INIT
ELSE BEGIN
PrevVatAmountLine := VATAmountLine;
...
...
PrevVatAmountLine."VAT Amount" :=
PrevVatAmountLine."VAT Amount" -
ROUND(PrevVatAmountLine."VAT Amount",Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
PrevVatAmountLine."VAT Amount (Non Deductible)" :=
// Delete the following line.
CalcAmountPart("Line Amount" - "Invoice Discount Amount","VAT % (Non Deductible)") - "VAT Base (Non Deductible)";
PrevVatAmountLine."VAT Amount (Non Deductible)" :=
PrevVatAmountLine."VAT Amount (Non Deductible)" -
ROUND(PrevVatAmountLine."VAT Amount (Non Deductible)",
Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
...
...
PrevVatAmountLine."VAT Amount" :=
PrevVatAmountLine."VAT Amount" -
ROUND(PrevVatAmountLine."VAT Amount",Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
PrevVatAmountLine."VAT Amount (Non Deductible)" :=
// Add the following line.
CalcAmountPart(Currency,"Line Amount" - "Invoice Discount Amount","VAT % (Non Deductible)") - "VAT Base (Non Deductible)";
PrevVatAmountLine."VAT Amount (Non Deductible)" :=
PrevVatAmountLine."VAT Amount (Non Deductible)" -
ROUND(PrevVatAmountLine."VAT Amount (Non Deductible)",
Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
...
...
PrevVatAmountLine."VAT Amount" +
"VAT Base" * "VAT %" / 100 * (1 - PurchHeader."VAT Base Discount %" / 100),
Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
"Amount Including VAT" := "Line Amount" - "Invoice Discount Amount" + "VAT Amount";
// Delete the following lines.
"VAT Base (Non Deductible)" := CalcAmountPart("VAT Base","VAT % (Non Deductible)");
"VAT Amount (Non Deductible)" := CalcAmountPart("VAT Base (Non Deductible)","VAT %");
// End of the lines.
IF Positive THEN
PrevVatAmountLine.INIT
...
...
PrevVatAmountLine."VAT Amount" +
"VAT Base" * "VAT %" / 100 * (1 - PurchHeader."VAT Base Discount %" / 100),
Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
"Amount Including VAT" := "Line Amount" - "Invoice Discount Amount" + "VAT Amount";
// Add the following lines.
"VAT Base (Non Deductible)" := CalcAmountPart(Currency,"VAT Base","VAT % (Non Deductible)");
"VAT Amount (Non Deductible)" := CalcAmountPart(Currency,"VAT Base (Non Deductible)","VAT %");
// End of the lines.
IF Positive THEN
PrevVatAmountLine.INIT
...