Ocultar método y forma de pago
This commit is contained in:
parent
ff0a2f27b1
commit
c7bd84f9bf
|
@ -129,10 +129,15 @@ def config_timbrar():
|
|||
except IndexError:
|
||||
return {'cfdi_donativo': False}
|
||||
|
||||
mp = not util.get_bool(Configuracion.get_('chk_config_ocultar_metodo_pago'))
|
||||
cp = not util.get_bool(
|
||||
Configuracion.get_('chk_config_ocultar_condiciones_pago'))
|
||||
conf = {
|
||||
'cfdi_anticipo': Configuracion.get_('chk_config_anticipo'),
|
||||
'cfdi_donativo': obj.es_ong,
|
||||
'cfdi_anticipo': Configuracion.get_('chk_config_anticipo'),
|
||||
'cfdi_ine': Configuracion.get_('chk_config_ine'),
|
||||
'cfdi_metodo_pago': mp,
|
||||
'cfdi_condicion_pago': cp,
|
||||
}
|
||||
|
||||
return conf
|
||||
|
@ -198,6 +203,8 @@ class Configuracion(BaseModel):
|
|||
)
|
||||
elif keys['fields'] == 'configotros':
|
||||
fields = (
|
||||
'chk_config_ocultar_metodo_pago',
|
||||
'chk_config_ocultar_condiciones_pago',
|
||||
'chk_config_anticipo',
|
||||
'chk_config_cuenta_predial',
|
||||
'chk_config_codigo_barras',
|
||||
|
@ -209,6 +216,17 @@ class Configuracion(BaseModel):
|
|||
.select()
|
||||
.where(Configuracion.clave.in_(fields))
|
||||
)
|
||||
elif keys['fields'] == 'timbrar':
|
||||
fields = (
|
||||
'chk_config_ocultar_metodo_pago',
|
||||
'chk_config_ocultar_condiciones_pago',
|
||||
'chk_config_anticipo',
|
||||
'chk_config_ine',
|
||||
)
|
||||
data = (Configuracion
|
||||
.select()
|
||||
.where(Configuracion.clave.in_(fields))
|
||||
)
|
||||
|
||||
values = {r.clave: r.valor for r in data}
|
||||
return values
|
||||
|
|
|
@ -50,6 +50,8 @@ var controllers = {
|
|||
$$('txt_plantilla_factura_33').attachEvent('onItemClick', txt_plantilla_factura_33_click)
|
||||
$$('txt_plantilla_factura_33j').attachEvent('onItemClick', txt_plantilla_factura_33j_click)
|
||||
$$('txt_plantilla_donataria').attachEvent('onItemClick', txt_plantilla_donataria_click)
|
||||
$$('chk_config_ocultar_metodo_pago').attachEvent('onItemClick', chk_config_item_click)
|
||||
$$('chk_config_ocultar_condiciones_pago').attachEvent('onItemClick', chk_config_item_click)
|
||||
$$('chk_config_anticipo').attachEvent('onItemClick', chk_config_item_click)
|
||||
$$('chk_config_ine').attachEvent('onItemClick', chk_config_item_click)
|
||||
$$('chk_config_cuenta_predial').attachEvent('onItemClick', chk_config_item_click)
|
||||
|
|
|
@ -108,8 +108,11 @@ function default_config(){
|
|||
|
||||
webix.ajax().sync().get('/values/configtimbrar', function(text, data){
|
||||
var values = data.json()
|
||||
//~ showvar(values)
|
||||
show('chk_cfdi_anticipo', values.cfdi_anticipo)
|
||||
show('chk_cfdi_donativo', values.cfdi_donativo)
|
||||
show('lst_metodo_pago', values.cfdi_metodo_pago)
|
||||
show('txt_condicion_pago', values.cfdi_condicion_pago)
|
||||
if(!values.cfdi_ine || values.cfdi_ine == '0'){
|
||||
$$('tv_invoice').getTabbar().hideOption('INE')
|
||||
}else{
|
||||
|
|
|
@ -426,7 +426,7 @@ var controls_correo = [
|
|||
|
||||
var form_folios = {
|
||||
type: 'space',
|
||||
responsive: true,
|
||||
//~ responsive: true,
|
||||
cols: [{
|
||||
view: 'form',
|
||||
id: 'form_folios',
|
||||
|
@ -451,12 +451,13 @@ var form_correo = {
|
|||
view: 'form',
|
||||
id: 'form_correo',
|
||||
complexData: true,
|
||||
scroll: true,
|
||||
elements: controls_correo,
|
||||
elementsConfig: {
|
||||
labelWidth: 150,
|
||||
labelAlign: 'right'
|
||||
},
|
||||
autoheight: true
|
||||
//~ autoheight: true
|
||||
}],
|
||||
}
|
||||
|
||||
|
@ -486,6 +487,14 @@ var options_templates = [
|
|||
|
||||
var options_admin_otros = [
|
||||
{maxHeight: 15},
|
||||
{template: 'Facturación', type: 'section'},
|
||||
{cols: [{maxWidth: 15},
|
||||
{view: 'checkbox', id: 'chk_config_ocultar_metodo_pago', labelWidth: 0,
|
||||
labelRight: 'Ocultar método de pago'},
|
||||
{view: 'checkbox', id: 'chk_config_ocultar_condiciones_pago', labelWidth: 0,
|
||||
labelRight: 'Ocultar condiciones de pago'},
|
||||
{}]},
|
||||
{maxHeight: 20},
|
||||
{template: 'Ayudas varias', type: 'section'},
|
||||
{cols: [{maxWidth: 15},
|
||||
{view: 'checkbox', id: 'chk_config_anticipo', labelWidth: 0,
|
||||
|
@ -518,10 +527,14 @@ var options_admin_otros = [
|
|||
{}]
|
||||
|
||||
|
||||
|
||||
var body_admin_otros = {
|
||||
view: 'scrollview', body: {rows: options_admin_otros},
|
||||
}
|
||||
|
||||
var tab_options = {
|
||||
view: 'tabview',
|
||||
id: 'tab_options',
|
||||
multiview: true,
|
||||
animate: true,
|
||||
cells: [
|
||||
{id: 'Plantillas', rows: options_templates},
|
||||
|
@ -707,8 +720,8 @@ var suggest_sat_moneda = {
|
|||
name: 'grid_moneda_found',
|
||||
body: {
|
||||
autoConfig: false,
|
||||
scroll:true,
|
||||
autoheight:false,
|
||||
scroll: true,
|
||||
autoheight: false,
|
||||
header: true,
|
||||
yCount: 10,
|
||||
columns: [
|
||||
|
@ -946,7 +959,6 @@ var app_correo = {
|
|||
{view: 'template', id: 'th_correo', type: 'header',
|
||||
template: 'Configuración de correo'},
|
||||
form_correo,
|
||||
{},
|
||||
],
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue