[W1][MultiObjects] Output journal lines: event after CheckWhse in codeunits 5406 "Output Jnl.-Expl. Route" and 5510 "Production Journal Mgt"
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
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 capturesBaseQtythere 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 beforeCheckWhse, 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
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/BCApps
-
Team: Finance
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
microsoft/BCApps#13004 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Team: SCM
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 79/100
microsoft/BCApps#12988 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[EventRequest][W1][codeunit][426][Payment Tolerance Management] New event OnBeforePmtTolCBGJnl in procedure PmtTolCBGJnlForse già presa @business-central-extensibility-bot l’ha presa 1 giorno fa. ApertaApproved event-request ext-ready-to-implement Team: Finance
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
microsoft/BCApps#12900 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
missing-info Team: Finance
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
microsoft/BCApps#12893 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[W1][Extensibility Request][Subscription Billing] Remove local access from InitTempTable() procedure on page 8025 "Contract Price Update"Forse già presa @business-central-extensibility-bot l’ha presa 5 giorni fa. ApertaApproved ext-ready-to-implement request-for-external Team: Finance
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
microsoft/BCApps#12775 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/BCApps
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
module-core needs triage ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
darnitdevorg/darnit#648 ·
I maintainer di solito rispondono entro 2 giorni
-
area/gateway kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
vllm-project/aibrix#3226 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
drizzle-team/drizzle-orm#6552 ·
I maintainer di solito rispondono entro 2 giorni