A transfer correction should change balances in the bins involved. It should not enter the warehouse as a new receipt. A validation check can compare the bin-level deltas even when the warehouse total looks right.
Take synthetic input. A transfer physically moves 10 units of SKU-X from bin A to bin B once. A retry without an idempotency key posts the transfer twice, so the ledger records β20 in A and +20 in B. An operator then physically returns the 10 units to A. If the system records that return as a new receipt in A, the ledger ends up 10 units below the starting balance in A and 20 above it in B. The physical counts in both bins are back where they started. Across the two bins the ledger is 10 units too high.
Give each transfer and each correction its own stable event ID. A retry reuses the same ID. Check the ID and commit the bin updates in one transaction.β¦