In taxes by invoice report, filter the invoices and credit note from

invoice related, not from invoice tax. To ensure the information showed
is related the global invoice amount not the specfic tax.
This commit is contained in:
Bernat Brunet 2023-10-26 10:04:33 +02:00
parent 0531ca161e
commit f2cfeee65b
1 changed files with 2 additions and 2 deletions

View File

@ -277,9 +277,9 @@ class TaxesByInvoiceReport(HTMLReport):
domain += [('invoice.party', 'in', parties)],
if data['tax_type'] == 'invoiced':
domain += [('base', '>=', 0)]
domain += [('invoice.untaxed_amount', '>=', 0)]
elif data['tax_type'] == 'refunded':
domain += [('base', '<', 0)]
domain += [('invoice.untaxed_amount', '<', 0)]
if data['taxes']:
domain += [('tax', 'in', data.get('taxes', []))]