Capturar error al enviar certificado
This commit is contained in:
parent
829277e25c
commit
f8c7385607
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
//~ }
|
||||
//~ }
|
||||
//~ })
|
||||
//~ }
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue