Skip to content

[29.x] Hardening subscription billing + drop shipment scenarios - #11060

Open
Joshua (mynjj) wants to merge 1 commit into
releases/29.xfrom
backport/649144-sb-dropshipments-29.x
Open

[29.x] Hardening subscription billing + drop shipment scenarios#11060
Joshua (mynjj) wants to merge 1 commit into
releases/29.xfrom
backport/649144-sb-dropshipments-29.x

Conversation

@mynjj

@mynjj Joshua (mynjj) commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Two scenarios stemming form a customer case:

  • We use the "Qty. to ship" to create the subscriptions at release of the sales order, this doesn't play well when "Sales & Receivables Setup" has "Default Quantity to Ship" set to "Blank".
  • In non-drop shipment scenarios for subscription billing we usually "fake invoice" the originating sales order, this was not the case when the release of the sales order was triggered by receiving the purchase order on a drop shipment.

Fixes:

  • Use the QtyPerSerialNo we already had and only fallback to "Qty to ship" when zero.
  • Subscribe also to when the sales order was being closed by a drop shipment purchase order, and set the same values as on the other path

Obviously, verified locally the scenarios and added tests.

Fixes AB#649144

@mynjj
Joshua (mynjj) requested a review from a team September 4, 2026 12:56
@mynjj
Joshua (mynjj) requested a review from a team as a code owner September 4, 2026 12:56
@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 Team: Finance GitHub request for Finance area labels Sep 4, 2026
@github-actions github-actions Bot added this to the Version 29.1 milestone Sep 4, 2026
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Accept with Suggestions

What this PR does

This change creates subscription headers from the posted item-journal quantity when that quantity is available, and it also marks subscription item sales lines as invoiced when a drop shipment purchase receipt closes the associated sales order line.

The quantity change is targeted: it keeps the old Qty. to Ship fallback when no posted quantity is available, but uses QtyPerSerialNo for the drop shipment posting path. The new Purch.-Post subscriber uses an existing event that fires after the shipped quantity is updated and before the sales line is modified, so the same invoicing fields used by the normal sales posting path are persisted for the drop shipment path.

Problem-solution fit

Fit: Strong

The diff addresses both reported problems. Subscription quantity now comes from the posted quantity when available, and the drop shipment close path applies the same fake-invoicing fields that already exist for the normal sales posting path.

Suggestions

S1 (🟠 Moderate): Set the blank quantity setup in the test
The reported scenario depends on Default Quantity to Ship being Blank, but the new non-serialized drop shipment test does not set that setup value. Please set it in the test, so the regression is protected even if the default company setup changes.

Risk assessment and necessity

Risk: The regression surface is Subscription Billing around sales order release, purchase receipt posting for drop shipment, and persisted sales-line invoicing quantities. The change is limited to subscription item lines by SalesLineShouldSkipInvoicing, reuses the existing invoicing-field assignment, and does not change public event signatures.

Necessity: The change is needed because a zero subscription quantity can produce wrong downstream billing data, and a drop shipment sales order line can remain treated as shipped-not-invoiced after the purchase receipt. The scope is small and matches the affected document flow.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11060 round=1 by=alexei-dobriansky at=2026-09-04T13:59:32Z lastSha=963c1d0f268bb4955400388b756e3adae6047563 reviewKey=917d94d467246a16b3a95254d45b0cfc8a344d4cd9eee4026ccdca30334aa56a suggestions=S1@7bf3c2f8

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

Labels

AL: Apps (W1) Add-on apps for W1 Team: Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants