Modify name for Public RFC

This commit is contained in:
El Mau 2023-10-30 16:51:38 -06:00
parent edd8d560bd
commit 410a7080da
1 changed files with 4 additions and 1 deletions

View File

@ -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