You need a "staging area"; or staging database; that is neither "A" or "B". You have a transaction that needs to "credit" inventory and "debit" the recipient; once the transaction is "approved" (and "posted"). At which time, stock could have been depleted (for whatever reason) before the transaction is approved (necessitating a roll-back versus a commit).