From e7e9c3f8c0d5c2d13c190d53a12b558299f479e1 Mon Sep 17 00:00:00 2001 From: El Mau Date: Tue, 4 Jul 2023 11:59:20 -0600 Subject: [PATCH 1/2] Fix in tax exento --- source/helper/util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/helper/util.py b/source/helper/util.py index 956a953..bc34f9f 100644 --- a/source/helper/util.py +++ b/source/helper/util.py @@ -667,9 +667,11 @@ class DataToDict(): 'Base': data[i + 1], 'Impuesto': data[i + 2], 'TipoFactor': data[i + 3], - 'TasaOCuota': data[i + 4], - 'Importe': data[i + 5], } + if data[i + 4]: + tax['TasaOCuota'] = data[i + 4] + if data[i + 5]: + tax['Importe'] = data[i + 5] traslados.append(tax) elif type_tax == self.RETENCION: tax = { From 677de6be232649544bbb86354841a7edcbed6e55 Mon Sep 17 00:00:00 2001 From: El Mau Date: Thu, 10 Aug 2023 11:02:51 -0600 Subject: [PATCH 2/2] Fix - tax in cfdi pay --- source/helper/util.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/source/helper/util.py b/source/helper/util.py index bc34f9f..7c3203d 100644 --- a/source/helper/util.py +++ b/source/helper/util.py @@ -863,9 +863,11 @@ class DataToDict(): 'BaseP': data[i], 'ImpuestoP': data[i + 1], 'TipoFactorP': data[i + 2], - 'TasaOCuotaP': data[i + 3], - 'ImporteP': data[i + 4], } + if data[i + 3]: + tax['TasaOCuotaP'] = data[i + 3] + if data[i + 4]: + tax['ImporteP'] = data[i + 4] traslados.append(tax) return traslados @@ -941,10 +943,13 @@ class DataToDict(): tax = { 'BaseDR': data[i + 1], 'ImpuestoDR': data[i + 2], - 'TipoFactorDR': data[i + 3], - 'TasaOCuotaDR': data[i + 4], - 'ImporteDR': data[i + 5], + 'TipoFactorDR': data[i + 3] } + if data[i + 4]: + tax['TasaOCuotaDR'] = data[i + 4] + if data[i + 5]: + tax['ImporteDR'] = data[i + 5] + if type_tax == self.TRASLADO: traslados.append(tax) elif type_tax == self.RETENCION: