Why do you need this change?
In 4PS Construct we need to execute part of code in procedure CalculateVAT for new Account Type ("Fixed Asset") in a similar way as "G/L Account".
In current functionality for every Account Type other than "G/L Account" fields "VAT Type", "VAT Bus. Posting Group" and "VAT Prod. Posting Group" should be empty and there's no way to avoid this check.
Because of this we need new event with possibility to skip executing code in CalculateVAT and run custom code instead.
Describe the request
Dear ALAppExtensions team,
On behalf of 4PS I would like to request integration event 'OnBeforeCalculateVAT' to be added to procedure "CalculateVAT" in table 11401 "CBG Statement Line":
procedure CalculateVAT()
var
VATPostingSetup: Record "VAT Posting Setup";
GLAccount: Record "G/L Account";
IsHandled: Boolean; //new
begin
IsHandled := false; //new
OnBeforeCalculateVAT(Rec, IsHandled); //new
if IsHandled then //new
exit; //new
"VAT %" := 0;
"Debit Incl. VAT" := Debit;
"Debit VAT" := 0;
"Credit Incl. VAT" := Credit;
"Credit VAT" := 0;
[IntegrationEvent(false, false)]
local procedure OnBeforeCalculateVAT(var CBGStatementLine: Record "CBG Statement Line"; var IsHandled: Boolean)
begin
//new
end;
Internal work item: AB#631152
Why do you need this change?
In 4PS Construct we need to execute part of code in procedure CalculateVAT for new Account Type ("Fixed Asset") in a similar way as "G/L Account".
In current functionality for every Account Type other than "G/L Account" fields "VAT Type", "VAT Bus. Posting Group" and "VAT Prod. Posting Group" should be empty and there's no way to avoid this check.
Because of this we need new event with possibility to skip executing code in CalculateVAT and run custom code instead.
Describe the request
Dear ALAppExtensions team,
On behalf of 4PS I would like to request integration event 'OnBeforeCalculateVAT' to be added to procedure "CalculateVAT" in table 11401 "CBG Statement Line":
Internal work item: AB#631152