changeset a453b7a16eba in modules/account:6.2
details: https://hg.tryton.org/modules/account?cmd=changeset&node=a453b7a16eba
description:
Invert sign of credit instead of using absolute value of tax code
Since issue9743 the summed amounts of tax line can have different signs
so we
can not use anymore the absolute value.
issue11242
review360901002
(grafted from 75866feec26664d4165dcb845fe2c9d9c5be738f)
diffstat:
tax.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r cade63a3980c -r a453b7a16eba tax.py
--- a/tax.py Thu Feb 17 00:07:45 2022 +0100
+++ b/tax.py Mon Feb 21 00:57:41 2022 +0100
@@ -380,7 +380,8 @@
@property
def value(self):
value = getattr(self.tax, '%s_%s_amount' % (self.type, self.amount))
- value = abs(value)
+ if self.type == 'credit':
+ value *= -1
if self.operator == '-':
value *= -1
return value