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] Codeunit 7110 Analysis Report Management - Procedure CalcBudgetQuantity - OnBeforeCalcBudgetQuantity #27861

Closed
mavohra opened this issue Dec 30, 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

@mavohra
Copy link

mavohra commented Dec 30, 2024

Describe the request

Please add the event OnBeforeCalcBudgetQuantity in procedure CalcBudgetQuantity in Codeunit 7110 Analysis Report Management.

local procedure CalcBudgetQuantity(var ItemStatisticsBuf: Record "Item Statistics Buffer"): Decimal
begin
    OnBeforeCalcBudgetQuantity(ItemStatisticsBuf, IsHandled, Result); // <---- New Event
    if IsHandled then
        exit(Result);
        
    if ItemStatisticsBuf.GetFilter("Source No. Filter") = '' then
        ItemStatisticsBuf.SetRange(ItemStatisticsBuf."Source Type Filter");

    if AnalysisLineTemplate."Item Analysis View Code" = '' then begin
        ItemStatisticsBuf.CalcFields(ItemStatisticsBuf."Budgeted Quantity");
        exit(ItemStatisticsBuf."Budgeted Quantity");
    end;
    ItemStatisticsBuf.CalcFields(ItemStatisticsBuf."Analysis - Budgeted Quantity");
    exit(ItemStatisticsBuf."Analysis - Budgeted Quantity");
end;

[IntegrationEvent(false, false)]
local procedure OnBeforeCalcBudgetQuantity(var ItemStatisticsBuf: Record "Item Statistics Buffer"; var IsHandled: Boolean; var Result: Decimal)
begin
end;

Additional context

Our customization allows handling alternative budget quantities based on specific conditions, and we'd like to make changes in the procedure.

Event 2/4
Internal work item: AB#561385

@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