Fix - UI para depositos
This commit is contained in:
parent
61ff2ce29a
commit
2d749d1564
|
@ -264,12 +264,15 @@ function txt_retiro_importe_change(new_value, old_value){
|
|||
|
||||
|
||||
function actualizar_deposito(grid){
|
||||
grid.sort("#fecha#", "desc", "date")
|
||||
|
||||
var suma = 0
|
||||
var descripcion = ''
|
||||
grid.data.each(function(obj){
|
||||
suma += obj.saldo.to_float()
|
||||
descripcion += 'Pago de la factura: ' + obj.serie + obj.folio + ' del '
|
||||
descripcion += 'cliente: ' + obj.cliente + '\n'
|
||||
obj.importe = obj.saldo
|
||||
})
|
||||
$$('txt_deposito_importe').setValue(suma)
|
||||
$$('deposito_descripcion').setValue(descripcion)
|
||||
|
@ -284,6 +287,5 @@ function grid_cfdi_por_pagar_after_drop(context, native_event){
|
|||
|
||||
function grid_cfdi_este_deposito_after_drop(context, native_event){
|
||||
var grid = $$('grid_cfdi_este_deposito')
|
||||
grid.sort("#fecha#", "asc", "string")
|
||||
actualizar_deposito(grid)
|
||||
}
|
||||
|
|
|
@ -83,6 +83,8 @@ var grid_cfdi_este_deposito_cols = [
|
|||
format: webix.i18n.priceFormat, css: 'right'},
|
||||
{id: 'saldo', header: ['Saldo'], width: 125, sort: 'int',
|
||||
format: webix.i18n.priceFormat, css: 'right'},
|
||||
{id: 'importe', header: ['Este pago'], width: 125, sort: 'int',
|
||||
format: webix.i18n.priceFormat, css: 'right'},
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue