Merge pull request #683 from csrapr/Fix/double-count-down-dispense
Fix: fix rare double counting down dispensed notes in cash out transactions
This commit is contained in:
commit
8bbb589ce0
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ function atomic (tx, pi, fromClient) {
|
|||
const tmSRD = new TransactionMode({tiLevel: isolationLevel.serializable})
|
||||
|
||||
function transaction (t) {
|
||||
const sql = 'select * from cash_out_txs where id=$1'
|
||||
const sql = 'SELECT * FROM cash_out_txs WHERE id=$1 FOR UPDATE'
|
||||
|
||||
return t.oneOrNone(sql, [tx.id])
|
||||
.then(toObj)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue