Capturar error al enviar certificado

This commit is contained in:
Mauricio Baeza 2017-10-12 16:43:07 -05:00
parent 829277e25c
commit f8c7385607
2 changed files with 22 additions and 21 deletions

View File

@ -166,7 +166,6 @@ class Emisor(BaseModel):
@classmethod
def get_(cls, rfc):
print ('rfc', rfc)
regimenes = SATRegimenes.get_activos(rfc)
row = {'regimenes': regimenes}
@ -199,8 +198,6 @@ class Emisor(BaseModel):
else:
row['emisor'] = {'emisor_rfc': rfc}
print (row)
return {'ok': True, 'row': row}
@classmethod

View File

@ -308,25 +308,29 @@ function cmd_subir_certificado_click(){
}
var rfc = $$('form_cert').getValues()['cert_rfc']
if(rfc){
msg = 'Ya existe un certificado guardado<BR><BR>¿Deseas reemplazarlo?'
webix.confirm({
title: 'Certificado Existente',
ok: 'Si',
cancel: 'No',
type: 'confirm-error',
text: msg,
callback:function(result){
if(result){
$$('up_cert').send(function(response){
if(response){
show(response)
}
})
}
}
})
try{
$$('up_cert').send()
}catch(err){
msg_error(err.message)
}
//~ if(rfc){
//~ msg = 'Ya existe un certificado guardado<BR><BR>¿Deseas reemplazarlo?'
//~ webix.confirm({
//~ title: 'Certificado Existente',
//~ ok: 'Si',
//~ cancel: 'No',
//~ type: 'confirm-error',
//~ text: msg,
//~ callback:function(result){
//~ if(result){
//~ $$('up_cert').send()
//~ }
//~ }
//~ })
//~ }
}