Fix stamp nomina

This commit is contained in:
Mauricio Baeza 2020-02-09 22:34:58 -06:00
commit a17345c0fd
3 changed files with 21 additions and 3 deletions

View File

@ -1,4 +1,9 @@
v 1.34.1 [09-feb-2020]
----------------------
- Error: Al timbrar nómina de asimilados
v 1.34.0 [29-ene-2020]
----------------------
- Error: Al timbrar nómina

View File

@ -8437,19 +8437,26 @@ class CfdiNomina(BaseModel):
otros_pagos = []
for row in rows:
concepto = row.concepto or row.tipo_otro_pago.nombre or row.tipo_otro_pago.name
if nomina_receptor['TipoRegimen'] != '02' and \
row.tipo_otro_pago.key in ('002', '007', '008'):
continue
p = {
'TipoOtroPago': row.tipo_otro_pago.key,
'Clave': row.tipo_otro_pago.clave or row.tipo_otro_pago.key,
'Concepto': concepto[:100],
'Importe': FORMAT.format(row.importe),
}
# ~ if row.tipo_otro_pago.key == '002' and row.subsidio_causado:
if row.tipo_otro_pago.key == '002':
p['subsidio'] = {
'SubsidioCausado': FORMAT.format(row.subsidio_causado)
}
otros_pagos.append(p)
if not otros_pagos:
del nomina['TotalOtrosPagos']
rows = CfdiNominaIncapacidad.select().where(CfdiNominaIncapacidad.cfdi==cfdi)
incapacidades = []
for row in rows:
@ -9876,7 +9883,7 @@ def _import_from_folder(path):
return
def _exportar_documentos():
def _export_documents():
rfc = input('Introduce el RFC: ').strip().upper()
if not rfc:
msg = 'El RFC es requerido'
@ -10154,6 +10161,8 @@ def _process_command_line_arguments():
action='store_true', default=False, required=False)
parser.add_argument('-bk', '--backup', dest='backup',
action='store_true', default=False, required=False)
parser.add_argument('-ed', '--export-documents', dest='export_documents',
action='store_true', default=False, required=False)
parser.add_argument('-r', '--rfc', dest='rfc', default='')
return parser.parse_args()
@ -10190,6 +10199,10 @@ def main(args):
if args.backup:
utils.db_backup(IS_MV, URL['SEAFILE'])
return
if args.export_documents:
_export_documents()
return

View File

@ -47,7 +47,7 @@ except ImportError:
DEBUG = DEBUG
VERSION = '1.34.0'
VERSION = '1.34.1'
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)