changeset ec5c38a8ade2 in modules/account_be:default
details: 
https://hg.tryton.org/modules/account_be?cmd=changeset;node=ec5c38a8ade2
description:
        Include be_vat identifier to VAT customer

        issue9891
        review318961002
diffstat:

 account.py |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (20 lines):

diff -r e9103c11bde5 -r ec5c38a8ade2 account.py
--- a/account.py        Mon Nov 02 15:42:07 2020 +0100
+++ b/account.py        Sun Dec 06 00:33:19 2020 +0100
@@ -93,10 +93,12 @@
         where = ((invoice.company == context.get('company'))
             & (period.fiscalyear == context.get('fiscalyear')))
         where &= invoice.type == 'out'
-        where &= (company_identifier.code.ilike('BE%')
-            & (company_identifier.type == 'eu_vat'))
-        where &= (party_identifier.code.ilike('BE%')
-            & (party_identifier.type == 'eu_vat'))
+        where &= ((company_identifier.code.ilike('BE%')
+                & (company_identifier.type == 'eu_vat'))
+            | (company_identifier.type == 'be_vat'))
+        where &= ((party_identifier.code.ilike('BE%')
+                & (party_identifier.type == 'eu_vat'))
+            | (party_identifier.type == 'be_vat'))
         where &= tax.group.in_(groups)
         return (invoice_tax
             .join(invoice,

Reply via email to