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

[Public procedure] Query "Qty. Reserved From Item Ledger" - SetSourceFilter #27696

Closed
fvet opened this issue Nov 26, 2024 · 1 comment
Closed
Labels
request-for-external Request for exposing a function for extension development SCM GitHub request for SCM area ships-in-future-update Fix ships in a future update

Comments

@fvet
Copy link
Contributor

fvet commented Nov 26, 2024

Describe the request

Can you please expose function SetSourceFilter in Query "Qty. Reserved From Item Ledger"?

Additional context

We want to calculate the ReservedQtyFromInventory for a given Sales / Purchase order by location, forcing us to copy the functions from codeunit 99000832 "Sales Line-Reserve" GetReservedQtyFromInventory.

Doing so fails to compile due to the missing access to SetSourceFilter.

internal procedure GetReservedQtyFromInventoryWithLocation(SalesHeader: Record "Sales Header"; LocationCode: Code[10]): Decimal
    var
        ReservationEntry: Record "Reservation Entry";
        QtyReservedFromItemLedger: Query "Qty. Reserved From Item Ledger";
    begin
        ReservationEntry.SetSource(Database::"Sales Line", SalesHeader."Document Type".AsInteger(), SalesHeader."No.", 0, '', 0);
        QtyReservedFromItemLedger.SetSourceFilter(ReservationEntry); // MISSING     
        QtyReservedFromItemLedger.SetFilter(Location_Code, LocationCode);
        QtyReservedFromItemLedger.Open();
        if QtyReservedFromItemLedger.Read() then
            exit(QtyReservedFromItemLedger.Quantity__Base_);

        exit(0);
    end;

Internal work item: AB#558855

@ChethanT ChethanT added request-for-external Request for exposing a function for extension development SCM GitHub request for SCM area labels Nov 27, 2024
@JesperSchulz JesperSchulz added the ships-in-future-update Fix ships in a future update label Dec 1, 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: 27466.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request-for-external Request for exposing a function for extension development 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