Invert sign of deposit amount of party

It is less astonishing for the user to see a positive deposit amount when the
party has made a deposit.

issue6558
review37661002
This commit is contained in:
Cédric Krier committed 2017-09-11 20:28:37 +02:00
1 parent d2910ccb73
commit f4147c876e
3 files changed
+5 -2

No files matched your search

+2
View File
@@ -1,3 +1,5 @@
* Use positive sign for deposit amount of party
Version 4.4.0 - 2017-05-01
* Bug fixes (see mercurial logs for details)
+2 -1
View File
@@ -50,7 +50,8 @@ class Party:
cursor.execute(*line.join(account,
condition=account.id == line.account
).select(line.party,
Sum(Coalesce(line.debit, 0) - Coalesce(line.credit, 0)),
# Use credit - debit to positive deposit amount
Sum(Coalesce(line.credit, 0) - Coalesce(line.debit, 0)),
where=account.active
& (account.kind == 'deposit')
& party_clause
+1 -1
View File
@@ -67,7 +67,7 @@ Check party deposit::
>>> party.reload()
>>> party.deposit
Decimal('-100.00')
Decimal('100.00')
Create final invoice::