Agregar objeto de impuestos a productos
This commit is contained in:
parent
7d40e79f3c
commit
f8c2c5e2d6
|
@ -3926,6 +3926,7 @@ class Productos(BaseModel):
|
|||
Productos.descuento,
|
||||
Productos.inventario,
|
||||
Productos.existencia,
|
||||
Productos.objeto_impuesto,
|
||||
)
|
||||
where = (
|
||||
(Productos.es_activo==True) &
|
||||
|
@ -4005,7 +4006,8 @@ class Productos(BaseModel):
|
|||
Productos.valor_unitario,
|
||||
Productos.descuento,
|
||||
Productos.inventario,
|
||||
Productos.existencia)
|
||||
Productos.existencia,
|
||||
Productos.objeto_impuesto)
|
||||
.join(SATUnidades).switch(Productos)
|
||||
.where((Productos.es_activo==True) &
|
||||
((Productos.clave==clave) | (Productos.codigo_barras==clave)))
|
||||
|
@ -4178,7 +4180,8 @@ class Productos(BaseModel):
|
|||
Productos.inventario,
|
||||
Productos.existencia,
|
||||
Productos.minimo,
|
||||
Productos.cantidad_empaque.alias('cant_by_packing'),
|
||||
Productos.objeto_impuesto,
|
||||
# ~ Productos.cantidad_empaque.alias('cant_by_packing'),
|
||||
)
|
||||
.where(Productos.id==id).dicts()[0]
|
||||
)
|
||||
|
|
|
@ -123,6 +123,7 @@ function cmd_edit_product_click(){
|
|||
get_taxes()
|
||||
$$('unidad').getList().load('/values/unidades')
|
||||
configurar_producto()
|
||||
|
||||
var grid = $$('grid_products')
|
||||
var row = grid.getSelectedItem()
|
||||
if(row == undefined){
|
||||
|
@ -131,13 +132,15 @@ function cmd_edit_product_click(){
|
|||
}
|
||||
|
||||
$$('categoria').getList().load('/values/categorias')
|
||||
webix.ajax().get('/products', {id:row['id']}, {
|
||||
|
||||
webix.ajax().get('/products', {id: row['id']}, {
|
||||
error: function(text, data, xhr) {
|
||||
msg_error()
|
||||
},
|
||||
success: function(text, data, xhr){
|
||||
var values = data.json()
|
||||
$$('form_product').setValues(values.row)
|
||||
msg_ok(values.objeto_impuesto)
|
||||
add_config({'key': 'id_product', 'value': values.row.id})
|
||||
for(i = 0; i < values.taxes.length; i++){
|
||||
$$('grid_product_taxes').select(values.taxes[i], true)
|
||||
|
|
|
@ -148,8 +148,8 @@ var controls_generals = [
|
|||
{view: "richselect", id: "unidad", name: "unidad", label: "Unidad",
|
||||
width: 300, labelWidth: 130, labelAlign: "right", required: true,
|
||||
invalidMessage: "La Unidad es requerida", options: []},
|
||||
{view: 'richselect', id: 'lst_tax_object', label: 'Objeto de Impuestos',
|
||||
width: 500, labelWidth: 130, labelAlign: "right", required: true,
|
||||
{view: 'richselect', id: 'objeto_impuesto', name: 'objeto_impuesto', label: 'Objeto de Impuestos',
|
||||
width: 500, labelWidth: 150, labelAlign: "right", required: true,
|
||||
invalidMessage: 'Este campo es requerido', options: opt_tax_object},
|
||||
{},
|
||||
//~ {view: 'text', id: 'cant_by_packing', name: 'cant_by_packing',
|
||||
|
|
Loading…
Reference in New Issue