forked from elmau/empresa-libre
Agregar controles para objeto de impuesto en productos
This commit is contained in:
parent
de2ab5cedd
commit
a36034a476
|
@ -466,7 +466,7 @@ class Configuracion(BaseModel):
|
||||||
'chk_config_codigo_barras',
|
'chk_config_codigo_barras',
|
||||||
'chk_config_precio_con_impuestos',
|
'chk_config_precio_con_impuestos',
|
||||||
'chk_llevar_inventario',
|
'chk_llevar_inventario',
|
||||||
'chk_use_packing',
|
# ~ 'chk_use_packing',
|
||||||
'chk_multi_stock',
|
'chk_multi_stock',
|
||||||
)
|
)
|
||||||
data = (Configuracion
|
data = (Configuracion
|
||||||
|
@ -4724,15 +4724,15 @@ class Facturas(BaseModel):
|
||||||
for k, v in receptor.items():
|
for k, v in receptor.items():
|
||||||
values['receptor'][k] = v
|
values['receptor'][k] = v
|
||||||
|
|
||||||
use_packing = Configuracion.get_bool('chk_use_packing')
|
# ~ use_packing = Configuracion.get_bool('chk_use_packing')
|
||||||
if use_packing:
|
# ~ if use_packing:
|
||||||
w = FacturasDetalle.factura == invoice
|
# ~ w = FacturasDetalle.factura == invoice
|
||||||
q = (FacturasDetalle
|
# ~ q = (FacturasDetalle
|
||||||
.select(FacturasDetalle.empaques)
|
# ~ .select(FacturasDetalle.empaques)
|
||||||
.where(w)
|
# ~ .where(w)
|
||||||
.order_by(FacturasDetalle.id.asc())
|
# ~ .order_by(FacturasDetalle.id.asc())
|
||||||
.tuples())
|
# ~ .tuples())
|
||||||
values['pakings'] = [str(int(r[0])) for r in q]
|
# ~ values['pakings'] = [str(int(r[0])) for r in q]
|
||||||
|
|
||||||
return values
|
return values
|
||||||
|
|
||||||
|
@ -5303,7 +5303,7 @@ class Facturas(BaseModel):
|
||||||
tax_locales = Configuracion.get_bool('chk_config_tax_locales')
|
tax_locales = Configuracion.get_bool('chk_config_tax_locales')
|
||||||
tax_locales_truncate = Configuracion.get_bool('chk_config_tax_locales_truncate')
|
tax_locales_truncate = Configuracion.get_bool('chk_config_tax_locales_truncate')
|
||||||
tax_decimals = Configuracion.get_bool('chk_config_tax_decimals')
|
tax_decimals = Configuracion.get_bool('chk_config_tax_decimals')
|
||||||
use_packing = Configuracion.get_bool('chk_use_packing')
|
# ~ use_packing = Configuracion.get_bool('chk_use_packing')
|
||||||
|
|
||||||
subtotal = 0
|
subtotal = 0
|
||||||
descuento_cfdi = 0
|
descuento_cfdi = 0
|
||||||
|
|
|
@ -19,7 +19,7 @@ function products_default_config(){
|
||||||
if(cfg_products['inventario']){
|
if(cfg_products['inventario']){
|
||||||
$$('grid_products').showColumn('existencia')
|
$$('grid_products').showColumn('existencia')
|
||||||
}
|
}
|
||||||
show('cant_by_packing', values.chk_use_packing)
|
//~ show('cant_by_packing', values.chk_use_packing)
|
||||||
show('cmd_show_exists', values.chk_multi_stock)
|
show('cmd_show_exists', values.chk_multi_stock)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -111,6 +111,13 @@ var suggest_sat_producto = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var opt_tax_object = [
|
||||||
|
{id: '01', value: '[01] No objeto de impuesto.'},
|
||||||
|
{id: '02', value: '[02] Sí objeto de impuesto.'},
|
||||||
|
{id: '03', value: '[03] Sí objeto del impuesto y no obligado al desglose.'},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
var controls_generals = [
|
var controls_generals = [
|
||||||
{view: 'checkbox', id: 'es_activo_producto', name: 'es_activo_producto',
|
{view: 'checkbox', id: 'es_activo_producto', name: 'es_activo_producto',
|
||||||
label: 'Activo: ', value: true,
|
label: 'Activo: ', value: true,
|
||||||
|
@ -141,10 +148,14 @@ var controls_generals = [
|
||||||
{view: "richselect", id: "unidad", name: "unidad", label: "Unidad",
|
{view: "richselect", id: "unidad", name: "unidad", label: "Unidad",
|
||||||
width: 300, labelWidth: 130, labelAlign: "right", required: true,
|
width: 300, labelWidth: 130, labelAlign: "right", required: true,
|
||||||
invalidMessage: "La Unidad es requerida", options: []},
|
invalidMessage: "La Unidad es requerida", options: []},
|
||||||
{view: 'text', id: 'cant_by_packing', name: 'cant_by_packing',
|
{view: 'richselect', id: 'lst_tax_object', label: 'Objeto de Impuestos',
|
||||||
labelAlign: 'right', labelWidth: 150, inputAlign: "right",
|
width: 500, labelWidth: 130, labelAlign: "right", required: true,
|
||||||
label: 'Cantidad por empaque:'},
|
invalidMessage: 'Este campo es requerido', options: opt_tax_object},
|
||||||
{},
|
{},
|
||||||
|
//~ {view: 'text', id: 'cant_by_packing', name: 'cant_by_packing',
|
||||||
|
//~ labelAlign: 'right', labelWidth: 150, inputAlign: "right",
|
||||||
|
//~ label: 'Cantidad por empaque:'},
|
||||||
|
//~ {},
|
||||||
//~ {view: 'text', id: 'tags_producto', name: 'tags_producto',
|
//~ {view: 'text', id: 'tags_producto', name: 'tags_producto',
|
||||||
//~ labelAlign: 'right', label: 'Etiquetas',
|
//~ labelAlign: 'right', label: 'Etiquetas',
|
||||||
//~ placeholder: 'Separadas por comas'}
|
//~ placeholder: 'Separadas por comas'}
|
||||||
|
|
Loading…
Reference in New Issue