From 5ad6101b49fbb2f0ced7829237a74f943b7b8db0 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Fri, 9 Apr 2021 15:58:38 +0200 Subject: [PATCH] Set vat list code on recargo and exempt taxes Exclude reported_with base amounts to avoid duplication issue10213 review341961002 --- reporting_tax.py | 3 +++ tax.xml | 10 ++++++++++ tax_normal.xml | 10 ++++++++++ tax_pyme.xml | 10 ++++++++++ 4 files changed, 33 insertions(+) diff --git a/reporting_tax.py b/reporting_tax.py index 8b2f087a19..93f182f9ea 100644 --- a/reporting_tax.py +++ b/reporting_tax.py @@ -452,6 +452,9 @@ class ESVATList(ModelSQL, ModelView): & (tax.es_vat_list_code != Null) & (Extract('year', invoice.invoice_date) == context.get('date', Date.today()).year) + # Exclude base amount for es_reported_with taxes because it is + # already included in the base of main tax + & ((tax.es_reported_with == Null) | (tax_line.type == 'tax')) & ~Exists(cancel_invoice.select( cancel_invoice.cancel_move, distinct=True, where=(cancel_invoice.cancel_move == invoice.move))) diff --git a/tax.xml b/tax.xml index 0c600bd0fd..716b45542d 100644 --- a/tax.xml +++ b/tax.xml @@ -67,6 +67,7 @@ this repository contains the full copyright notices and license terms. --> + B IVA Exento (servicios) @@ -77,6 +78,7 @@ this repository contains the full copyright notices and license terms. --> + B Recargo equivalencia 5.2% @@ -88,6 +90,7 @@ this repository contains the full copyright notices and license terms. --> + B Recargo Equivalencia 1.4% @@ -99,6 +102,7 @@ this repository contains the full copyright notices and license terms. --> + B Recargo Equivalencia 0.5% @@ -110,6 +114,7 @@ this repository contains the full copyright notices and license terms. --> + B IVA Exportaciones (bienes) @@ -221,6 +226,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA Exento (servicios) @@ -231,6 +237,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA 21% (bienes de inversión) @@ -274,6 +281,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA Importaciones (bienes) @@ -423,6 +431,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA 10.5% Regimen especial ganadería y pesca @@ -435,6 +444,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA Intracomunitario. Bienes (1) diff --git a/tax_normal.xml b/tax_normal.xml index fccf2541a5..3fe8d47acb 100644 --- a/tax_normal.xml +++ b/tax_normal.xml @@ -67,6 +67,7 @@ this repository contains the full copyright notices and license terms. --> + B IVA Exento (servicios) @@ -77,6 +78,7 @@ this repository contains the full copyright notices and license terms. --> + B Recargo equivalencia 5.2% @@ -88,6 +90,7 @@ this repository contains the full copyright notices and license terms. --> + B Recargo Equivalencia 1.4% @@ -99,6 +102,7 @@ this repository contains the full copyright notices and license terms. --> + B Recargo Equivalencia 0.5% @@ -110,6 +114,7 @@ this repository contains the full copyright notices and license terms. --> + B IVA Exportaciones (bienes) @@ -221,6 +226,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA Exento (servicios) @@ -231,6 +237,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA 21% (bienes de inversión) @@ -274,6 +281,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA Importaciones (bienes) @@ -423,6 +431,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA 10.5% Regimen especial ganadería y pesca @@ -435,6 +444,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA Intracomunitario. Bienes (1) diff --git a/tax_pyme.xml b/tax_pyme.xml index b0b04c2c0f..4175c27747 100644 --- a/tax_pyme.xml +++ b/tax_pyme.xml @@ -67,6 +67,7 @@ this repository contains the full copyright notices and license terms. --> + B IVA Exento (servicios) @@ -77,6 +78,7 @@ this repository contains the full copyright notices and license terms. --> + B Recargo equivalencia 5.2% @@ -88,6 +90,7 @@ this repository contains the full copyright notices and license terms. --> + B Recargo Equivalencia 1.4% @@ -99,6 +102,7 @@ this repository contains the full copyright notices and license terms. --> + B Recargo Equivalencia 0.5% @@ -110,6 +114,7 @@ this repository contains the full copyright notices and license terms. --> + B IVA Exportaciones (bienes) @@ -221,6 +226,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA Exento (servicios) @@ -231,6 +237,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA 21% (bienes de inversión) @@ -274,6 +281,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA Importaciones (bienes) @@ -423,6 +431,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA 10.5% Regimen especial ganadería y pesca @@ -435,6 +444,7 @@ this repository contains the full copyright notices and license terms. --> + A IVA Intracomunitario. Bienes (1)