Skip to content

[Master]-[Drop shipment reversal] Undo Shipment fails with blank Bin Code at bin-mandatory location - #11274

Open
Fixes4BC (neeleshsinghal) wants to merge 2 commits into
mainfrom
bugs/Bug-649618-Drop-Shipment-Undo-Shipment-fails-blank-Bin-Code-bin-mandatory
Open

[Master]-[Drop shipment reversal] Undo Shipment fails with blank Bin Code at bin-mandatory location#11274
Fixes4BC (neeleshsinghal) wants to merge 2 commits into
mainfrom
bugs/Bug-649618-Drop-Shipment-Undo-Shipment-fails-blank-Bin-Code-bin-mandatory

Conversation

@neeleshsinghal

@neeleshsinghal Fixes4BC (neeleshsinghal) commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Fixes AB#649618

@neeleshsinghal
Fixes4BC (neeleshsinghal) requested a review from a team September 9, 2026 14:22
@neeleshsinghal
Fixes4BC (neeleshsinghal) requested a review from a team as a code owner September 9, 2026 14:22
@github-actions github-actions Bot added the Team: SCM GitHub request for SCM area label Sep 9, 2026
@github-actions github-actions Bot added this to the Version 30.0 milestone Sep 9, 2026
ItemJnlLine."Shortcut Dimension 2 Code" := PurchRcptLine."Shortcut Dimension 2 Code";
ItemJnlLine."Dimension Set ID" := PurchRcptLine."Dimension Set ID";
ItemJnlLine.Description := PurchRcptLine.Description;
ItemJnlLine."Drop Shipment" := (PurchRcptLine."Sales Order No." <> '') and (PurchRcptLine."Sales Order Line No." <> 0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ Agent}$

The new "Drop Shipment" derivation in UndoPurchaseReceiptLine.Codeunit.al uses (PurchRcptLine."Sales Order No." <> '') and (PurchRcptLine."Sales Order Line No." <> 0), but the existing, equivalent derivation elsewhere in the base app (PurchRcptLine.Table.al, InsertInvLineFromRcptLine: if "Sales Order No." = '' then PurchLine."Drop Shipment" := false else PurchLine."Drop Shipment" := true) keys off "Sales Order No." alone. If a drop-shipment receipt line can legitimately have a populated "Sales Order No." with a zero "Sales Order Line No." (e.g. due to partial data migration, an upstream defect, or a not-yet-linked line), the new undo logic would compute "Drop Shipment" = false while the rest of the app would treat the same line as a drop shipment, causing the reversing item journal line to under- or over-report Drop Shipment status inconsistently with sibling logic.

Recommendation:

  • align the condition with the established "Sales Order No." <> '' check used elsewhere, or, if the extra "Sales Order Line No." <> 0 guard is intentionally stricter, add a brief comment explaining why undo processing diverges from the existing convention.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.41.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team: SCM GitHub request for SCM area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant