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

[Request for External] Codeunit 5988 "Serv-Documents Mgt." - Event OnPostDocumentLinesOnAfterSortLines #27859

Closed
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,
I would like to request a modification to codeunit 5988 "Serv-Documents Mgt.", specifically to the IntegrationEvent OnPostDocumentLinesOnAfterSortLines included in the PostDocumentLines procedure
Add parameters TempVATAmountLine and TempVATAmountLineForSLE

LineCount := 0;

        // init cu for posting SLE type Usage
        ServPostingJnlsMgt.InitServiceRegister(NextServLedgerEntryNo, NextWarrantyLedgerEntryNo);
        OnPostDocumentLinesOnBeforeFilterServiceLine(ServHeader, ServLine); 
        if not ApplicationAreaMgmt.IsSalesTaxEnabled() then begin
            ServLine.CalcVATAmountLines(1, ServHeader, ServLine, TempVATAmountLine, Ship);
            ServLine.CalcVATAmountLines(2, ServHeader, ServLine, TempVATAmountLineForSLE, Ship);
        end;

        GetZeroServiceLineRecID(ServHeader, ZeroServiceLineRecID);
        ErrorMessageMgt.PushContext(ErrorContextElementProcessLine, ZeroServiceLineRecID, 0, PostDocumentLinesMsg);

        ServLine.Reset();
        SortLines(ServLine);
        OnPostDocumentLinesOnAfterSortLines(ServHeader, ServLine); // MODIFY EVENT
        ServLedgEntryNo := FindFirstServLedgEntry(ServLine);

The event should be like this

 [IntegrationEvent(false, false)]
local procedure OnPostDocumentLinesOnAfterSortLines(var ServHeader: Record "Service Header"; var ServLine: Record "Service Line";var TempVATAmountLine: Record "VAT Amount Line" temporary;var TempVATAmountLineForSLE: Record "VAT Amount Line" temporary)
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#561382

@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