...
IF "Currency Code" = '' THEN BEGIN
"VAT Amount (LCY)" := "VAT Amount";
"VAT Base LCY (Non Deduct.)" := "VAT Base (Non Deductible)";
"VAT Amount LCY (Non Deduct.)" := "VAT Amount (Non Deductible)";
END ELSE BEGIN
// Delete the following lines.
{IF ("VAT Calculation Type" = "VAT Calculation Type"::"Normal VAT") OR
("VAT Calculation Type" = "VAT Calculation Type"::"Reverse Charge VAT")
THEN
IF GLSetup."Round VAT Coeff." THEN
"VAT Amount (LCY)" :=
ROUND(
"Amount (LCY)" * ROUND("VAT %" / (100 + "VAT %"),GLSetup."VAT Coeff. Rounding Precision"),
RoundingPrecisionLCY,
RoundingDirectionLCY)
ELSE BEGIN
"VAT Base Amount (LCY)" := ROUND("Amount (LCY)" / (1 + "VAT %" / 100),RoundingPrecisionLCY);
"VAT Amount (LCY)" := ROUND("Amount (LCY)" - "VAT Base Amount (LCY)",RoundingPrecisionLCY,RoundingDirectionLCY);
END
ELSE
// End of the lines.
"VAT Amount (LCY)" :=
ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Posting Date","Currency Code",
"VAT Amount","Currency Factor"));
END;
"VAT Base Amount (LCY)" := "Amount (LCY)" - "VAT Amount (LCY)";
VALIDATE("VAT % (Non Deductible)",GetVATDeduction);
...
...
IF "Currency Code" = '' THEN BEGIN
"VAT Amount (LCY)" := "VAT Amount";
"VAT Base LCY (Non Deduct.)" := "VAT Base (Non Deductible)";
"VAT Amount LCY (Non Deduct.)" := "VAT Amount (Non Deductible)";
END ELSE BEGIN
"VAT Amount (LCY)" :=
ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Posting Date","Currency Code",
"VAT Amount","Currency Factor"));
// Add the following lines.
"VAT Base LCY (Non Deduct.)" :=
ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Posting Date","Currency Code",
"VAT Base (Non Deductible)","Currency Factor"));
"VAT Amount LCY (Non Deduct.)" :=
ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Posting Date","Currency Code",
"VAT Amount (Non Deductible)","Currency Factor"));
// End of the lines.
END;
"VAT Base Amount (LCY)" := "Amount (LCY)" - "VAT Amount (LCY)";
VALIDATE("VAT % (Non Deductible)",GetVATDeduction);
...