[codex] block duplicate mobile sales order approvals#11
Draft
Ngonie69 wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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