Skip to content

[codex] block duplicate mobile sales order approvals#11

Draft
Ngonie69 wants to merge 1 commit into
mainfrom
codex/mobile-sales-order-duplicate-guard
Draft

[codex] block duplicate mobile sales order approvals#11
Ngonie69 wants to merge 1 commit into
mainfrom
codex/mobile-sales-order-duplicate-guard

Conversation

@Ngonie69

Copy link
Copy Markdown
Owner

What changed

Adds a server-side guard before SAP sales order creation for mobile-originated orders. The approval/posting flow still first reconciles by the exact local order number in SAP (U_OrderNumber), then checks whether the mobile order matches another already-posted mobile order from the same creator/customer before allowing a new SAP create.

Why

Mobile retry problems can create separate local pending orders when the original client request id is lost or regenerated. The existing SAP duplicate protection prevents reposting the same local order number, but it does not catch two different local order numbers representing the same mobile draft. This blocks the second approval from creating another SAP order.

Impact

Sales reps approving duplicated mobile orders will now get a clear approval block instead of creating another SAP document. The block is intentionally narrow: mobile source only, same creator/customer, already-posted candidate, matching customer reference or device/location anchor, and matching delivery/warehouse/discount/line signature.

Validation

  • '/mnt/c/Program Files/dotnet/dotnet.exe' build ShopInventory/ShopInventory.csproj --no-restore

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant