From 410a7080da0f7c4f63dba58989276a059a9e2fb0 Mon Sep 17 00:00:00 2001 From: El Mau Date: Mon, 30 Oct 2023 16:51:38 -0600 Subject: [PATCH] Modify name for Public RFC --- source/app/controllers/cfdi_xml.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/app/controllers/cfdi_xml.py b/source/app/controllers/cfdi_xml.py index fc0aa87..9c41719 100644 --- a/source/app/controllers/cfdi_xml.py +++ b/source/app/controllers/cfdi_xml.py @@ -27,6 +27,7 @@ from logbook import Logger log = Logger('XML') CFDI_ACTUAL = 'cfdi40' NOMINA_ACTUAL = 'nomina12' +PUBLIC = 'PUBLICO EN GENERAL' DEFAULT = { 'exportacion': '01', @@ -317,7 +318,9 @@ class CFDI(object): return def _receptor(self, datos): - datos['Nombre'] = datos['Nombre'].upper() + receptor_name = datos['Nombre'].upper() + if receptor_name != PUBLIC: + datos['Nombre'] = receptor_name node_name = '{}:Receptor'.format(self._pre) emisor = ET.SubElement(self._cfdi, node_name, datos) return