Browse Source

store negative amount in Transaction when buying something

master
Frederic 11 years ago
parent
commit
fd213cd47d
  1. 2
      cash/models.py

2
cash/models.py

@ -45,7 +45,7 @@ class Account(models.Model): @@ -45,7 +45,7 @@ class Account(models.Model):
descr += '%dx %s\n' % (amount, product.name)
transaction = Transaction(account=self, subject=BUY_SUBJECT,
amount=total_value, description=descr)
amount=(-total_value), description=descr)
transaction.save()
return True

Loading…
Cancel
Save