[W1][MultiObjects] Output journal lines: event after CheckWhse in codeunits 5406 "Output Jnl.-Expl. Route" and 5510 "Production Journal Mgt"
メンテナーはふだん 1 日以内に返信
@PredragMaricic がすでに取り組んでいます。
2026年10月14日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 66/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 領域
- backend
調査の方向性
codeunit 5406 "Output Jnl.-Expl. Route" の プロシージャ InsertOutputJnlLine と、codeunit 5510 "Production Journal Mgt" の プロシージャ InsertOutputItemJnlLine から始めてください。どちらも、各 CheckWhse の呼び出しは最後の操作のブロック内にあります。Issue に記載されたシグネチャで、これらの呼び出しの直後に2つのローカル統合イベントを追加し、CheckWhse の前後の数量を渡してください。両方のイベントが指定されたパラメータで CheckWhse の後に発生し、プロジェクトがビルドできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- AL
- スター
- 714
- フォーク
- 482
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 546
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/BCApps のほかの issue
-
[Bug]: Deliv.-Rem. Ext. Text Transfer: OnAfterReadLines will never be reached due to exit(true)オープンTeam: Finance
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/BCApps#13205 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: FI reference payment matching scans Cust. Ledger Entry because "Reference No." has no key対応中かも @AndersLarsenMicrosoft が 3 日前に担当しました。 オープンApproved Team: Finance
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microsoft/BCApps#13101 · コメント 2 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Team: Finance
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/BCApps#13082 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: Imported Subscription Line processing misses two fields対応中かも @AndersLarsenMicrosoft が 3 日前に担当しました。 オープンApproved Team: Finance
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/BCApps#13004 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[EventRequest][W1][codeunit][426][Payment Tolerance Management] New event OnBeforePmtTolCBGJnl in procedure PmtTolCBGJnl対応中かも @business-central-extensibility-bot が 7 日前に担当しました。 オープンApproved event-request ext-ready-to-implement Team: Finance
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
microsoft/BCApps#12900 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
microsoft/BCApps の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
FootprintAI/Containarium#3182 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
VictoriaMetrics/victorialogs-datasource#747 ·
メンテナーはふだん 1 日以内に返信
-
good first issue hardware help wanted no-box serve
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信