Fix - Issue 57
This commit is contained in:
parent
13053b24e3
commit
980bb710ce
|
@ -2057,7 +2057,11 @@ class Facturas(BaseModel):
|
|||
|
||||
@classmethod
|
||||
def get_pdf(cls, id, rfc):
|
||||
emisor = Emisor.select()[0]
|
||||
try:
|
||||
emisor = Emisor.select()[0]
|
||||
except IndexError:
|
||||
return b'', 'sin_datos_de_emisor.pdf'
|
||||
|
||||
obj = Facturas.get(Facturas.id==id)
|
||||
name = '{}{}_{}.pdf'.format(obj.serie, obj.folio, obj.cliente.rfc)
|
||||
if obj.uuid is None:
|
||||
|
|
|
@ -82,6 +82,22 @@ function get_regimen_fiscal(){
|
|||
}
|
||||
|
||||
|
||||
function validar_timbrar(){
|
||||
webix.ajax().sync().get('/values/validartimbrar', function(text, data){
|
||||
var values = data.json()
|
||||
if(!values.ok){
|
||||
msg_error(values.msg)
|
||||
$$('cmd_timbrar').disable()
|
||||
}else{
|
||||
if(values.msg){
|
||||
msg_error(values.msg)
|
||||
}
|
||||
$$('cmd_timbrar').enable()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function default_config(){
|
||||
webix.ajax().sync().get('/values/taxes', function(text, data){
|
||||
var values = data.json()
|
||||
|
@ -96,18 +112,7 @@ function default_config(){
|
|||
table_pt.clear()
|
||||
table_totals.clear()
|
||||
|
||||
webix.ajax().sync().get('/values/validartimbrar', function(text, data){
|
||||
var values = data.json()
|
||||
if(!values.ok){
|
||||
msg_error(values.msg)
|
||||
$$('cmd_timbrar').disable()
|
||||
}else{
|
||||
if(values.msg){
|
||||
msg_error(values.msg)
|
||||
}
|
||||
$$('cmd_timbrar').enable()
|
||||
}
|
||||
})
|
||||
validar_timbrar()
|
||||
|
||||
webix.ajax().sync().get('/values/configtimbrar', function(text, data){
|
||||
var values = data.json()
|
||||
|
|
|
@ -200,6 +200,7 @@ function multi_change(prevID, nextID){
|
|||
if(active == 'invoices_home'){
|
||||
current_dates()
|
||||
get_invoices()
|
||||
validar_timbrar()
|
||||
}
|
||||
gi = $$('grid_invoices')
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue