Modify name for Public RFC
This commit is contained in:
parent
edd8d560bd
commit
410a7080da
|
@ -27,6 +27,7 @@ from logbook import Logger
|
||||||
log = Logger('XML')
|
log = Logger('XML')
|
||||||
CFDI_ACTUAL = 'cfdi40'
|
CFDI_ACTUAL = 'cfdi40'
|
||||||
NOMINA_ACTUAL = 'nomina12'
|
NOMINA_ACTUAL = 'nomina12'
|
||||||
|
PUBLIC = 'PUBLICO EN GENERAL'
|
||||||
|
|
||||||
DEFAULT = {
|
DEFAULT = {
|
||||||
'exportacion': '01',
|
'exportacion': '01',
|
||||||
|
@ -317,7 +318,9 @@ class CFDI(object):
|
||||||
return
|
return
|
||||||
|
|
||||||
def _receptor(self, datos):
|
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)
|
node_name = '{}:Receptor'.format(self._pre)
|
||||||
emisor = ET.SubElement(self._cfdi, node_name, datos)
|
emisor = ET.SubElement(self._cfdi, node_name, datos)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue