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:
|
except IndexError:
|
||||||
return {'cfdi_donativo': False}
|
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 = {
|
conf = {
|
||||||
'cfdi_anticipo': Configuracion.get_('chk_config_anticipo'),
|
|
||||||
'cfdi_donativo': obj.es_ong,
|
'cfdi_donativo': obj.es_ong,
|
||||||
|
'cfdi_anticipo': Configuracion.get_('chk_config_anticipo'),
|
||||||
'cfdi_ine': Configuracion.get_('chk_config_ine'),
|
'cfdi_ine': Configuracion.get_('chk_config_ine'),
|
||||||
|
'cfdi_metodo_pago': mp,
|
||||||
|
'cfdi_condicion_pago': cp,
|
||||||
}
|
}
|
||||||
|
|
||||||
return conf
|
return conf
|
||||||
|
@ -198,6 +203,8 @@ class Configuracion(BaseModel):
|
||||||
)
|
)
|
||||||
elif keys['fields'] == 'configotros':
|
elif keys['fields'] == 'configotros':
|
||||||
fields = (
|
fields = (
|
||||||
|
'chk_config_ocultar_metodo_pago',
|
||||||
|
'chk_config_ocultar_condiciones_pago',
|
||||||
'chk_config_anticipo',
|
'chk_config_anticipo',
|
||||||
'chk_config_cuenta_predial',
|
'chk_config_cuenta_predial',
|
||||||
'chk_config_codigo_barras',
|
'chk_config_codigo_barras',
|
||||||
|
@ -209,6 +216,17 @@ class Configuracion(BaseModel):
|
||||||
.select()
|
.select()
|
||||||
.where(Configuracion.clave.in_(fields))
|
.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}
|
values = {r.clave: r.valor for r in data}
|
||||||
return values
|
return values
|
||||||
|
|
|
@ -50,6 +50,8 @@ var controllers = {
|
||||||
$$('txt_plantilla_factura_33').attachEvent('onItemClick', txt_plantilla_factura_33_click)
|
$$('txt_plantilla_factura_33').attachEvent('onItemClick', txt_plantilla_factura_33_click)
|
||||||
$$('txt_plantilla_factura_33j').attachEvent('onItemClick', txt_plantilla_factura_33j_click)
|
$$('txt_plantilla_factura_33j').attachEvent('onItemClick', txt_plantilla_factura_33j_click)
|
||||||
$$('txt_plantilla_donataria').attachEvent('onItemClick', txt_plantilla_donataria_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_anticipo').attachEvent('onItemClick', chk_config_item_click)
|
||||||
$$('chk_config_ine').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)
|
$$('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){
|
webix.ajax().sync().get('/values/configtimbrar', function(text, data){
|
||||||
var values = data.json()
|
var values = data.json()
|
||||||
|
//~ showvar(values)
|
||||||
show('chk_cfdi_anticipo', values.cfdi_anticipo)
|
show('chk_cfdi_anticipo', values.cfdi_anticipo)
|
||||||
show('chk_cfdi_donativo', values.cfdi_donativo)
|
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'){
|
if(!values.cfdi_ine || values.cfdi_ine == '0'){
|
||||||
$$('tv_invoice').getTabbar().hideOption('INE')
|
$$('tv_invoice').getTabbar().hideOption('INE')
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -426,7 +426,7 @@ var controls_correo = [
|
||||||
|
|
||||||
var form_folios = {
|
var form_folios = {
|
||||||
type: 'space',
|
type: 'space',
|
||||||
responsive: true,
|
//~ responsive: true,
|
||||||
cols: [{
|
cols: [{
|
||||||
view: 'form',
|
view: 'form',
|
||||||
id: 'form_folios',
|
id: 'form_folios',
|
||||||
|
@ -451,12 +451,13 @@ var form_correo = {
|
||||||
view: 'form',
|
view: 'form',
|
||||||
id: 'form_correo',
|
id: 'form_correo',
|
||||||
complexData: true,
|
complexData: true,
|
||||||
|
scroll: true,
|
||||||
elements: controls_correo,
|
elements: controls_correo,
|
||||||
elementsConfig: {
|
elementsConfig: {
|
||||||
labelWidth: 150,
|
labelWidth: 150,
|
||||||
labelAlign: 'right'
|
labelAlign: 'right'
|
||||||
},
|
},
|
||||||
autoheight: true
|
//~ autoheight: true
|
||||||
}],
|
}],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -486,6 +487,14 @@ var options_templates = [
|
||||||
|
|
||||||
var options_admin_otros = [
|
var options_admin_otros = [
|
||||||
{maxHeight: 15},
|
{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'},
|
{template: 'Ayudas varias', type: 'section'},
|
||||||
{cols: [{maxWidth: 15},
|
{cols: [{maxWidth: 15},
|
||||||
{view: 'checkbox', id: 'chk_config_anticipo', labelWidth: 0,
|
{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 = {
|
var tab_options = {
|
||||||
view: 'tabview',
|
view: 'tabview',
|
||||||
id: 'tab_options',
|
id: 'tab_options',
|
||||||
multiview: true,
|
|
||||||
animate: true,
|
animate: true,
|
||||||
cells: [
|
cells: [
|
||||||
{id: 'Plantillas', rows: options_templates},
|
{id: 'Plantillas', rows: options_templates},
|
||||||
|
@ -707,8 +720,8 @@ var suggest_sat_moneda = {
|
||||||
name: 'grid_moneda_found',
|
name: 'grid_moneda_found',
|
||||||
body: {
|
body: {
|
||||||
autoConfig: false,
|
autoConfig: false,
|
||||||
scroll:true,
|
scroll: true,
|
||||||
autoheight:false,
|
autoheight: false,
|
||||||
header: true,
|
header: true,
|
||||||
yCount: 10,
|
yCount: 10,
|
||||||
columns: [
|
columns: [
|
||||||
|
@ -946,7 +959,6 @@ var app_correo = {
|
||||||
{view: 'template', id: 'th_correo', type: 'header',
|
{view: 'template', id: 'th_correo', type: 'header',
|
||||||
template: 'Configuración de correo'},
|
template: 'Configuración de correo'},
|
||||||
form_correo,
|
form_correo,
|
||||||
{},
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue