Capturar error al enviar certificado
This commit is contained in:
parent
829277e25c
commit
f8c7385607
|
@ -166,7 +166,6 @@ class Emisor(BaseModel):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_(cls, rfc):
|
def get_(cls, rfc):
|
||||||
print ('rfc', rfc)
|
|
||||||
regimenes = SATRegimenes.get_activos(rfc)
|
regimenes = SATRegimenes.get_activos(rfc)
|
||||||
row = {'regimenes': regimenes}
|
row = {'regimenes': regimenes}
|
||||||
|
|
||||||
|
@ -199,8 +198,6 @@ class Emisor(BaseModel):
|
||||||
else:
|
else:
|
||||||
row['emisor'] = {'emisor_rfc': rfc}
|
row['emisor'] = {'emisor_rfc': rfc}
|
||||||
|
|
||||||
print (row)
|
|
||||||
|
|
||||||
return {'ok': True, 'row': row}
|
return {'ok': True, 'row': row}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
@ -308,25 +308,29 @@ function cmd_subir_certificado_click(){
|
||||||
}
|
}
|
||||||
|
|
||||||
var rfc = $$('form_cert').getValues()['cert_rfc']
|
var rfc = $$('form_cert').getValues()['cert_rfc']
|
||||||
if(rfc){
|
|
||||||
msg = 'Ya existe un certificado guardado<BR><BR>¿Deseas reemplazarlo?'
|
try{
|
||||||
webix.confirm({
|
$$('up_cert').send()
|
||||||
title: 'Certificado Existente',
|
}catch(err){
|
||||||
ok: 'Si',
|
msg_error(err.message)
|
||||||
cancel: 'No',
|
|
||||||
type: 'confirm-error',
|
|
||||||
text: msg,
|
|
||||||
callback:function(result){
|
|
||||||
if(result){
|
|
||||||
$$('up_cert').send(function(response){
|
|
||||||
if(response){
|
|
||||||
show(response)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//~ 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