From fbb7612d0d8d5703bafa64d0efa027305db99be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 16 May 2021 17:46:47 +0200 Subject: [PATCH] Check party deposit for all negative deposit lines issue10399 review348381002 --- invoice.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/invoice.py b/invoice.py index 7b20a8a9fa..20048c2774 100644 --- a/invoice.py +++ b/invoice.py @@ -97,10 +97,7 @@ class Invoice(metaclass=PoolMeta): if line.type != 'line': continue if line.account.type.deposit: - if ((invoice.type.endswith('invoice') - and line.amount < 0) - or (invoice.type.endswith('credit_note') - and line.amount > 0)): + if line.amount < 0: sign = 1 if invoice.type.startswith('in') else -1 to_check.add((invoice.party, line.account, sign))