From a6221c02d565b7b7634a8dedb877dfe87597f374 Mon Sep 17 00:00:00 2001 From: Marc Calvo Date: Tue, 1 Oct 2024 10:59:58 +0200 Subject: [PATCH] new method to get reduced taxes --- gestionatr/input/messages/F1.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gestionatr/input/messages/F1.py b/gestionatr/input/messages/F1.py index d22db88..a989872 100644 --- a/gestionatr/input/messages/F1.py +++ b/gestionatr/input/messages/F1.py @@ -477,6 +477,14 @@ def ivas(self): data.append(IVA(d)) return data + @property + def ivas_reducidos(self): + data = [] + if hasattr(self.factura, 'IVAReducido'): + for d in self.factura.IVAReducido: + data.append(IVA(d)) + return data + @property def conceptos_repercutibles(self): data = [] @@ -582,6 +590,12 @@ def get_linies_factura_by_type(self): return res + def con_iva_reducido_exempto(self): + for iva in self.ivas_reducidos: + if iva.porcentaje != 0: + return False + return True + def sin_base_imponible(self): for iva in self.ivas: if iva.base != 0: