Hello, can you please add "PurchHeader" to the procedure RunOnCalculateVATAmountsOnAfterGetReverseChargeVATPostingSetup and to the event OnCalculateVATAmountsOnAfterGetReverseChargeVATPostingSetup in codeunit 826 "Purch. Post Invoice Events"?
local procedure CalculateVATAmounts(PurchHeader: Record "Purchase Header"; var InvoicePostingBuffer: Record "Invoice Posting Buffer")
var
.
.
.
if InvoicePostingBuffer.FindSet() then
repeat
case InvoicePostingBuffer."VAT Calculation Type" of
InvoicePostingBuffer."VAT Calculation Type"::"Reverse Charge VAT":
begin
VATPostingSetup.Get(InvoicePostingBuffer."VAT Bus. Posting Group", InvoicePostingBuffer."VAT Prod. Posting Group");
PurchPostInvoiceEvents.RunOnCalculateVATAmountsOnAfterGetReverseChargeVATPostingSetup(VATPostingSetup, PurchHeader);
VATBaseAmount := InvoicePostingBuffer."VAT Base Amount" * (1 - PurchHeader."VAT Base Discount %" / 100);
VATBaseAmountACY := InvoicePostingBuffer."VAT Base Amount (ACY)" * (1 - PurchHeader."VAT Base Discount %" / 100);
procedure RunOnCalculateVATAmountsOnAfterGetReverseChargeVATPostingSetup(var VATPostingSetup: Record "VAT Posting Setup")
begin
OnCalculateVATAmountsOnAfterGetReverseChargeVATPostingSetup(VATPostingSetup);
end;
[IntegrationEvent(false, false)]
local procedure OnCalculateVATAmountsOnAfterGetReverseChargeVATPostingSetup(var VATPostingSetup: Record "VAT Posting Setup")
begin
end;
Additional context
We would like to change VAT % depending on the posting date of the purchase header.
Internal work item: AB#550926
Describe the request
Hello, can you please add "PurchHeader" to the procedure RunOnCalculateVATAmountsOnAfterGetReverseChargeVATPostingSetup and to the event OnCalculateVATAmountsOnAfterGetReverseChargeVATPostingSetup in codeunit 826 "Purch. Post Invoice Events"?
Additional context
We would like to change VAT % depending on the posting date of the purchase header. Internal work item: AB#550926