Merge branch 'develop'

Fix - bancos y plantillas
This commit is contained in:
Mauricio Baeza 2017-11-24 11:51:57 -06:00
commit a50ad106d2
2 changed files with 4 additions and 2 deletions

View File

@ -1205,7 +1205,7 @@ def upload_file(rfc, opt, file_obj):
if save_file(path, file_obj.file.read()):
return {'status': 'server', 'name': file_obj.filename, 'ok': True}
return {'status': 'error'}
return {'status': 'error', 'ok': False}
def cancel_cfdi(uuid, pk12, rfc, auth):

View File

@ -1183,7 +1183,9 @@ class MovimientosBanco(BaseModel):
def add(cls, values):
ids = values.pop('ids', '')
actualizar = False
if not 'saldo' in values:
if 'saldo' in values:
saldo = values['saldo']
else:
actualizar = True
hora = values.pop('hora')
values['fecha'] = '{}T{}'.format(values['fecha'][:10], hora)