Fix in Reg ID
This commit is contained in:
parent
bf5192ed8e
commit
5eef753a7e
|
@ -358,7 +358,7 @@ class DictToCfdi():
|
||||||
node_name = f"{{{self._COMERCIO['xmlns']}}}Receptor"
|
node_name = f"{{{self._COMERCIO['xmlns']}}}Receptor"
|
||||||
attr = {}
|
attr = {}
|
||||||
if 'NumRegIdTrib' in receptor:
|
if 'NumRegIdTrib' in receptor:
|
||||||
attr = {'NumRegIdTrib': emisor.pop('NumRegIdTrib')}
|
attr = {'NumRegIdTrib': receptor.pop('NumRegIdTrib')}
|
||||||
node_receptor = ET.SubElement(node_comercio, node_name, attr)
|
node_receptor = ET.SubElement(node_comercio, node_name, attr)
|
||||||
|
|
||||||
node_name = f"{{{self._COMERCIO['xmlns']}}}Domicilio"
|
node_name = f"{{{self._COMERCIO['xmlns']}}}Domicilio"
|
||||||
|
@ -607,6 +607,7 @@ class DataToDict():
|
||||||
taxes = {}
|
taxes = {}
|
||||||
traslados = []
|
traslados = []
|
||||||
retenciones = []
|
retenciones = []
|
||||||
|
|
||||||
for i in range(0, len(data), 6):
|
for i in range(0, len(data), 6):
|
||||||
type_tax = data[i]
|
type_tax = data[i]
|
||||||
tax = {
|
tax = {
|
||||||
|
@ -615,9 +616,9 @@ class DataToDict():
|
||||||
'TipoFactor': data[i + 3],
|
'TipoFactor': data[i + 3],
|
||||||
}
|
}
|
||||||
if data[i + 4]:
|
if data[i + 4]:
|
||||||
tax['TasaOCuota'] : data[i + 4]
|
tax['TasaOCuota'] = data[i + 4]
|
||||||
if data[i + 5]:
|
if data[i + 5]:
|
||||||
tax['Importe'] : data[i + 5]
|
tax['Importe'] = data[i + 5]
|
||||||
|
|
||||||
if type_tax == self.TRASLADO:
|
if type_tax == self.TRASLADO:
|
||||||
traslados.append(tax)
|
traslados.append(tax)
|
||||||
|
@ -627,6 +628,7 @@ class DataToDict():
|
||||||
taxes['traslados'] = traslados
|
taxes['traslados'] = traslados
|
||||||
if retenciones:
|
if retenciones:
|
||||||
taxes['retenciones'] = retenciones
|
taxes['retenciones'] = retenciones
|
||||||
|
|
||||||
return taxes
|
return taxes
|
||||||
|
|
||||||
def _conceptos(self, data):
|
def _conceptos(self, data):
|
||||||
|
|
Loading…
Reference in New Issue