forked from brmlab/brmbar-github
remove Account._transaction_split and dependents
This commit is contained in:
parent
76a484ea5e
commit
01491deec3
1 changed files with 7 additions and 7 deletions
|
@ -66,15 +66,15 @@ class Account:
|
|||
def negbalance_str(self):
|
||||
return self.currency.str(-self.balance())
|
||||
|
||||
def debit(self, transaction, amount, memo):
|
||||
return self._transaction_split(transaction, 'debit', amount, memo)
|
||||
#def debit(self, transaction, amount, memo):
|
||||
# return self._transaction_split(transaction, 'debit', amount, memo)
|
||||
|
||||
def credit(self, transaction, amount, memo):
|
||||
return self._transaction_split(transaction, 'credit', amount, memo)
|
||||
#def credit(self, transaction, amount, memo):
|
||||
# return self._transaction_split(transaction, 'credit', amount, memo)
|
||||
|
||||
def _transaction_split(self, transaction, side, amount, memo):
|
||||
""" Common part of credit() and debit(). """
|
||||
self.db.execute("INSERT INTO transaction_splits (transaction, side, account, amount, memo) VALUES (%s, %s, %s, %s, %s)", [transaction, side, self.id, amount, memo])
|
||||
#def _transaction_split(self, transaction, side, amount, memo):
|
||||
# """ Common part of credit() and debit(). """
|
||||
# self.db.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):
|
||||
# self.db.execute("INSERT INTO barcodes (account, barcode) VALUES (%s, %s)", [self.id, barcode])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue