mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-08 05:14:00 +02:00
brmbar.Account.add_barcode(): New method
This commit is contained in:
parent
8b4e916a6e
commit
4e1681cb94
1 changed files with 4 additions and 0 deletions
|
@ -78,3 +78,7 @@ class Account:
|
|||
""" Common part of credit() and debit(). """
|
||||
with closing(self.db.cursor()) as cur:
|
||||
cur.execute("INSERT INTO transaction_splits (transaction, side, account, amount, memo) VALUES (%s, %s, %s, %s, %s)", [transaction, side, self.id, amount, memo])
|
||||
|
||||
def add_barcode(self, barcode):
|
||||
with closing(self.db.cursor()) as cur:
|
||||
cur.execute("INSERT INTO barcodes (account, barcode) VALUES (%s, %s)", [self.id, barcode])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue