Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event Request] Table 5902 "Service Line" #27857

Closed
germanaltamiranoAW opened this issue Dec 27, 2024 · 1 comment
Closed

[Event Request] Table 5902 "Service Line" #27857

germanaltamiranoAW opened this issue Dec 27, 2024 · 1 comment
Labels
event-request Request for adding an event SCM GitHub request for SCM area ships-in-future-update Fix ships in a future update

Comments

@germanaltamiranoAW
Copy link

germanaltamiranoAW commented Dec 27, 2024

Describe the request

Dear ALAppExtensions Team,
Please add the following Event to procedure CalcVATAmountLines in Table 5902 "Service Line":

IsHandled := false;
        OnCalcVATAmountLinesOnBeforeUpdateLines(TotalVATAmount, Currency, ServHeader, VATAmountLine, IsHandled);
        if not IsHandled then
            VATAmountLine.UpdateLines(
                TotalVATAmount, Currency, ServHeader."Currency Factor", ServHeader."Prices Including VAT", ServHeader."VAT Base Discount %",
                ServHeader."Tax Area Code", ServHeader."Tax Liable", ServHeader."Posting Date");

//NEW EVENT

if RoundingLineInserted and (TotalVATAmount <> 0) then
            if VATAmountLine.Get(ServiceLine."VAT Identifier", ServiceLine."VAT Calculation Type",
                 ServiceLine."Tax Group Code", false, ServiceLine."Line Amount" >= 0)
            then begin
                VATAmountLine."VAT Amount" := VATAmountLine."VAT Amount" + TotalVATAmount;
                VATAmountLine."Amount Including VAT" := VATAmountLine."Amount Including VAT" + TotalVATAmount;
                VATAmountLine."Calculated VAT Amount" := VATAmountLine."Calculated VAT Amount" + TotalVATAmount;
                VATAmountLine.Modify();
            end;

 OnAfterCalcVATAmountLines(ServHeader, ServiceLine, VATAmountLine, QtyType);
end;

...

The event should be like this

[IntegrationEvent(false, false)]
local procedure OnCalcVATAmountLinesOnAfterCalcShouldProcessRounding(var ServiceLine: Record "Service Line"; var VATAmountLine: Record "VAT Amount Line"; var TotalVATAmount: Decimal; Currency: Record Currency; var RoundingLineInserted: Boolean)
begin
end;

Additional context

This modification will allow us to better manage calculations in statistics with VAT amounts in our developments.
Internal work item: AB#561379

@JakovljevicDusan JakovljevicDusan added event-request Request for adding an event SCM GitHub request for SCM area labels Dec 30, 2024
@JesperSchulz JesperSchulz added the ships-in-future-update Fix ships in a future update label Dec 31, 2024
@JesperSchulz
Copy link
Contributor

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: 28412.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event-request Request for adding an event SCM GitHub request for SCM area ships-in-future-update Fix ships in a future update
Projects
None yet
Development

No branches or pull requests

3 participants