Cédric Krier pushed to branch branch/default at Tryton / Tryton


Commits:
01f8d4ee by Cédric Krier at 2023-04-07T17:03:03+02:00
Limit debit and credit kind to line with debit and credit in aged balance

Closes #12193
- - - - -


1 changed file:

- modules/account/account.py


Changes:

=====================================
modules/account/account.py
=====================================
@@ -2915,8 +2915,12 @@
         with Transaction().set_context(date=None):
             line_query, _ = MoveLine.query_get(line)
         kind = cls.get_kind(type_)
-        debit_kind = cls.get_kind(debit_type)
-        credit_kind = cls.get_kind(credit_type)
+        debit_kind = (
+            cls.get_kind(debit_type)
+            & (line.debit != 0))
+        credit_kind = (
+            cls.get_kind(credit_type)
+            & (line.credit != 0))
         columns = [
             line.party.as_('id'),
             Literal(0).as_('create_uid'),



View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/01f8d4ee34924c99faeb418b2a4eafd34fe9840f

-- 
View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/01f8d4ee34924c99faeb418b2a4eafd34fe9840f
You're receiving this email because of your account on foss.heptapod.net.


Reply via email to