Please add 2 new events in codeunit 550 "VAT Rate Change Conversion" in function AddNewSalesLine

[IntegrationEvent(false, false)]
local procedure OnAddNewSalesLineOnBeforeNewSalesLineInsert(SalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line")
begin
end;

[IntegrationEvent(false, false)]
local procedure OnAddNewSalesLineOnAfterNewSalesLineInsert(SalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line")
begin
end;
SalesHeader.Get("Document Type", "Document No.");
RoundingPrecision := GetRoundingPrecision(SalesHeader."Currency Code");
if SalesHeader."Prices Including VAT" then
    Validate("Unit Price", Round(SalesLine."Unit Price" * (100 + "VAT %") / (100 + SalesLine."VAT %"), RoundingPrecision))
else
    Validate("Unit Price", SalesLine."Unit Price");
Validate("Line Discount %", SalesLine."Line Discount %");
OnAddNewSalesLineOnBeforeNewSalesLineInsert(SalesLine, NewSalesLine);
Insert;
OnAddNewSalesLineOnAfterNewSalesLineInsert(SalesLine, NewSalesLine);
RecRef.GetTable(SalesLine);
VATRateChangeLogEntry.Init();
VATRateChangeLogEntry."Record ID" := RecRef.RecordId;
VATRateChangeLogEntry."Table ID" := RecRef.Number;

0

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 45720.

0
© 2022 pullanswer.com - All rights reserved.