mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-09 22:04:01 +02:00
#20: stored function for undo transaction
This commit is contained in:
parent
c8892f825c
commit
69c405f715
2 changed files with 65 additions and 1 deletions
|
@ -277,6 +277,6 @@ class Shop:
|
|||
# memo = 'undo %d (%s)' % (splitid, memo)
|
||||
# amount = -amount
|
||||
# self.db.execute("INSERT INTO transaction_splits (transaction, side, account, amount, memo) VALUES (%s, %s, %s, %s, %s)", [transaction, side, account, amount, memo])
|
||||
transaction = self.db.execute_and_fetch("CALL undo_transaction(%s)",[oldtid])[0]
|
||||
transaction = self.db.execute_and_fetch("SELECT public.undo_transaction(%s)",[oldtid])[0]
|
||||
self.db.commit()
|
||||
return transaction
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue