forked from elmau/empresa-libre
Fix stamp nomina
This commit is contained in:
commit
a17345c0fd
|
@ -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]
|
v 1.34.0 [29-ene-2020]
|
||||||
----------------------
|
----------------------
|
||||||
- Error: Al timbrar nómina
|
- Error: Al timbrar nómina
|
||||||
|
|
|
@ -8437,19 +8437,26 @@ class CfdiNomina(BaseModel):
|
||||||
otros_pagos = []
|
otros_pagos = []
|
||||||
for row in rows:
|
for row in rows:
|
||||||
concepto = row.concepto or row.tipo_otro_pago.nombre or row.tipo_otro_pago.name
|
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 = {
|
p = {
|
||||||
'TipoOtroPago': row.tipo_otro_pago.key,
|
'TipoOtroPago': row.tipo_otro_pago.key,
|
||||||
'Clave': row.tipo_otro_pago.clave or row.tipo_otro_pago.key,
|
'Clave': row.tipo_otro_pago.clave or row.tipo_otro_pago.key,
|
||||||
'Concepto': concepto[:100],
|
'Concepto': concepto[:100],
|
||||||
'Importe': FORMAT.format(row.importe),
|
'Importe': FORMAT.format(row.importe),
|
||||||
}
|
}
|
||||||
# ~ if row.tipo_otro_pago.key == '002' and row.subsidio_causado:
|
|
||||||
if row.tipo_otro_pago.key == '002':
|
if row.tipo_otro_pago.key == '002':
|
||||||
p['subsidio'] = {
|
p['subsidio'] = {
|
||||||
'SubsidioCausado': FORMAT.format(row.subsidio_causado)
|
'SubsidioCausado': FORMAT.format(row.subsidio_causado)
|
||||||
}
|
}
|
||||||
otros_pagos.append(p)
|
otros_pagos.append(p)
|
||||||
|
|
||||||
|
if not otros_pagos:
|
||||||
|
del nomina['TotalOtrosPagos']
|
||||||
|
|
||||||
rows = CfdiNominaIncapacidad.select().where(CfdiNominaIncapacidad.cfdi==cfdi)
|
rows = CfdiNominaIncapacidad.select().where(CfdiNominaIncapacidad.cfdi==cfdi)
|
||||||
incapacidades = []
|
incapacidades = []
|
||||||
for row in rows:
|
for row in rows:
|
||||||
|
@ -9876,7 +9883,7 @@ def _import_from_folder(path):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
def _exportar_documentos():
|
def _export_documents():
|
||||||
rfc = input('Introduce el RFC: ').strip().upper()
|
rfc = input('Introduce el RFC: ').strip().upper()
|
||||||
if not rfc:
|
if not rfc:
|
||||||
msg = 'El RFC es requerido'
|
msg = 'El RFC es requerido'
|
||||||
|
@ -10154,6 +10161,8 @@ def _process_command_line_arguments():
|
||||||
action='store_true', default=False, required=False)
|
action='store_true', default=False, required=False)
|
||||||
parser.add_argument('-bk', '--backup', dest='backup',
|
parser.add_argument('-bk', '--backup', dest='backup',
|
||||||
action='store_true', default=False, required=False)
|
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='')
|
parser.add_argument('-r', '--rfc', dest='rfc', default='')
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
@ -10190,6 +10199,10 @@ def main(args):
|
||||||
|
|
||||||
if args.backup:
|
if args.backup:
|
||||||
utils.db_backup(IS_MV, URL['SEAFILE'])
|
utils.db_backup(IS_MV, URL['SEAFILE'])
|
||||||
|
return
|
||||||
|
|
||||||
|
if args.export_documents:
|
||||||
|
_export_documents()
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
DEBUG = DEBUG
|
DEBUG = DEBUG
|
||||||
VERSION = '1.34.0'
|
VERSION = '1.34.1'
|
||||||
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
||||||
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue