changeset 778d46f36be0 in modules/account:5.0
details: https://hg.tryton.org/modules/account?cmd=changeset&node=778d46f36be0
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 bdaa217a1ba9 -r 778d46f36be0 tax.py
--- a/tax.py    Thu Feb 17 00:08:33 2022 +0100
+++ b/tax.py    Mon Feb 21 00:57:41 2022 +0100
@@ -374,7 +374,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

Reply via email to