Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[W1][MultiObjects] Output journal lines: event after CheckWhse in codeunits 5406 "Output Jnl.-Expl. Route" and 5510 "Production Journal Mgt"

Aperta Adatta ai principianti
#12,652 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@PredragMaricic ci sta già lavorando.

Dal 14/10/2026.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
66/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Ambito
backend

Direzione di ricerca

Inizia dal codeunit 5406 "Output Jnl.-Expl. Route", procedura InsertOutputJnlLine, e dal codeunit 5510 "Production Journal Mgt", procedura InsertOutputItemJnlLine, dove ogni chiamata a CheckWhse si trova in un blocco dell'ultima operazione. Aggiungi i due eventi di integrazione locali subito dopo queste chiamate, con le firme indicate nell'issue, e passa le quantità prima e dopo CheckWhse. È completato quando entrambi gli eventi vengono generati dopo CheckWhse con i parametri specificati e il progetto si compila.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Approved Team: SCM
Why do you need this change?

At a location whose "Prod. Output Whse. Handling" is Inventory Put-away, the output journal lines for a production order's last operation get "Output Quantity" 0, because CheckWhse (table extension 99000758 "Mfg. Item Journal Line") sets the quantity to post to 0 before the line is validated. Standard expects the output to be posted through the Inventory Put-away.

Some output should not be put away: it stays in the work center's output bin (for example output that is moved on later by an Internal Movement, or that a later process consumes from the output bin). An extension that lets such output be posted straight from the journal has to give the last operation's line its quantity back after CheckWhse zeroed it.

Today the only way to do that is to capture the quantity at an earlier event and write it back later:

  • Codeunit 5406 "Output Jnl.-Expl. Route": the quantity is only exposed in OnAfterCalcBaseQtyToPost(var ProdOrderRoutingLine; var BaseQty). Subscribers to an event run in no defined order, so an extension that captures BaseQty there cannot know whether another extension changes it afterwards. The captured value may be standard's quantity instead of the one another extension proposed, and the operator then sees the wrong quantity on the exploded line.
  • Codeunit 5510 "Production Journal Mgt": the quantity is exposed in OnInsertOutputItemJnlLineOnAfterAssignTimes(...; var QtyToPost) right before CheckWhse, with the same ordering problem for any other extension subscribing to that event.

An event raised right after CheckWhse, carrying both the quantity before CheckWhse and the quantity to post, lets an extension decide the last operation's quantity from the final value every other subscriber already shaped, with no capture state and no dependency on subscriber order. It also lets other warehouse extensions (for example ones that handle production output through their own documents) see and adjust what CheckWhse decided.

Describe the request

Please add one integration event after CheckWhse in each of the two procedures that create output journal lines. Both are needed for the same scenario: the Production Journal and the Output Journal's Explode Routing must behave the same for the same production order.

Codeunit 5406 "Output Jnl.-Expl. Route", procedure InsertOutputJnlLine

            if (LocationCode <> '') and LastOperation then begin
                QtyPerLineBeforeCheckWhse := QtyPerLine;
                ItemJnlLine.CheckWhse(LocationCode, QtyPerLine);
                OnInsertOutputJnlLineOnAfterCheckWhse(ItemJnlLine, ProdOrderLine, QtyPerLineBeforeCheckWhse, QtyPerLine);
            end;
            if ItemJnlLine.SubcontractingWorkCenterUsed() then
                ItemJnlLine.Validate("Output Quantity", 0)
            else
                ItemJnlLine.Validate("Output Quantity", QtyPerLine);
[IntegrationEvent(false, false)]
local procedure OnInsertOutputJnlLineOnAfterCheckWhse(var ItemJournalLine: Record "Item Journal Line"; ProdOrderLine: Record "Prod. Order Line"; QtyPerLineBeforeCheckWhse: Decimal; var QtyPerLine: Decimal)
begin
end;

Codeunit 5510 "Production Journal Mgt", procedure InsertOutputItemJnlLine

        if (ProdOrderLine."Location Code" <> '') and IsLastOperation(ProdOrderRtngLine) then begin
            QtyToPostBeforeCheckWhse := QtyToPost;
            ItemJnlLine.CheckWhse(ProdOrderLine."Location Code", QtyToPost);
            OnInsertOutputItemJnlLineOnAfterCheckWhse(ItemJnlLine, ProdOrderLine, ProdOrderRtngLine, QtyToPostBeforeCheckWhse, QtyToPost);
        end;
[IntegrationEvent(false, false)]
local procedure OnInsertOutputItemJnlLineOnAfterCheckWhse(var ItemJournalLine: Record "Item Journal Line"; ProdOrderLine: Record "Prod. Order Line"; ProdOrderRoutingLine: Record "Prod. Order Routing Line"; QtyToPostBeforeCheckWhse: Decimal; var QtyToPost: Decimal)
begin
end;

Neither event uses the IsHandled pattern: CheckWhse still runs, and a subscriber only adjusts the quantity that follows from it.

Provide an implementation (optional)
  • I will provide the implementation for this extensibility request
Lingua principale
AL
Stelle
706
Fork
477
Merge medio
2g 17h
PR unite (30g)
491

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/BCApps

Tutte le issue di microsoft/BCApps

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.