...
EXIT(FALSE);
UNTIL SalesLine.NEXT = 0;
EXIT(TRUE);
END;
BEGIN
END.
}
}
...
...
EXIT(FALSE);
UNTIL SalesLine.NEXT = 0;
EXIT(TRUE);
END;
// Add the following lines.
LOCAL PROCEDURE SetVATClause@1470048(SalesInvHeader@1470001 : Record 112;SalesInvLine@1470002 : Record 113);
BEGIN
WITH VATClauseBuffer DO
IF GET(SalesInvLine."VAT Bus. Posting Group",SalesInvLine."VAT Prod. Posting Group") THEN BEGIN
"VAT Base" +=
CurrExchRate.ExchangeAmtFCYToLCY(SalesInvHeader."Posting Date",
SalesInvHeader."Currency Code",
PrepmtInvBuffer.Amount,
SalesInvHeader."Currency Factor");
"VAT Amount" +=
(CurrExchRate.ExchangeAmtFCYToLCY(SalesInvHeader."Posting Date",
SalesInvHeader."Currency Code",
PrepmtInvBuffer."Amount Incl. VAT",
SalesInvHeader."Currency Factor") -
CurrExchRate.ExchangeAmtFCYToLCY(SalesInvHeader."Posting Date",
SalesInvHeader."Currency Code",
SalesInvLine.Amount,
SalesInvHeader."Currency Factor"));
MODIFY;
END ELSE BEGIN
"VAT Bus. Posting Group" := SalesInvLine."VAT Bus. Posting Group";
"VAT Prod. Posting Group" := SalesInvLine."VAT Prod. Posting Group";
"VAT Base" :=
CurrExchRate.ExchangeAmtFCYToLCY(SalesInvHeader."Posting Date",
SalesInvHeader."Currency Code",
PrepmtInvBuffer.Amount,
SalesInvHeader."Currency Factor");
"VAT Amount" :=
CurrExchRate.ExchangeAmtFCYToLCY(SalesInvHeader."Posting Date",
SalesInvHeader."Currency Code",
PrepmtInvBuffer."Amount Incl. VAT",
SalesInvHeader."Currency Factor") -
"VAT Base";
INSERT;
END;
END;
LOCAL PROCEDURE FinalizeVATClause@1470049(SalesInvHeader@1470002 : Record 112;SalesInvLine@1470003 : Record 113);
VAR
TransferExtText@1470000 : Codeunit 378;
VATClauseSetup@1470001 : Record 26512;
BEGIN
IF VATClauseBuffer.FINDSET THEN
REPEAT
VATClauseSetup.SETRANGE("VAT Bus. Posting Group",VATClauseBuffer."VAT Bus. Posting Group");
VATClauseSetup.SETRANGE("VAT Prod. Posting Group",VATClauseBuffer."VAT Prod. Posting Group");
IF VATClauseSetup.FINDSET THEN
REPEAT
VATClauseSetup.TESTFIELD("Standard Text Code");
TransferExtText.VATCheckIfAnyExtText(SalesInvHeader,VATClauseSetup."Standard Text Code");
TransferExtText.InsertVATExtText(SalesInvLine,VATClauseBuffer);
UNTIL VATClauseSetup.NEXT = 0;
UNTIL VATClauseBuffer.NEXT = 0;
END;
// End of the added lines.
BEGIN
END.
}
}
...