forked from elmau/empresa-libre
Fix - Issue #172
This commit is contained in:
parent
ddb3588995
commit
ac4df43835
|
@ -1827,7 +1827,7 @@ class MovimientosBanco(BaseModel):
|
||||||
def get_(cls, values):
|
def get_(cls, values):
|
||||||
cuenta = int(values['cuenta'])
|
cuenta = int(values['cuenta'])
|
||||||
if 'fechas' in values:
|
if 'fechas' in values:
|
||||||
rango = values['fechas']
|
rango = util.loads(values['fechas'])
|
||||||
fd = (MovimientosBanco.fecha.between(
|
fd = (MovimientosBanco.fecha.between(
|
||||||
util.get_date(rango['start']),
|
util.get_date(rango['start']),
|
||||||
util.get_date(rango['end'], True)))
|
util.get_date(rango['end'], True)))
|
||||||
|
|
|
@ -17,6 +17,9 @@ var bancos_controllers = {
|
||||||
$$('grid_cfdi_por_pagar').attachEvent('onAfterDrop', grid_cfdi_por_pagar_after_drop)
|
$$('grid_cfdi_por_pagar').attachEvent('onAfterDrop', grid_cfdi_por_pagar_after_drop)
|
||||||
$$('grid_cfdi_este_deposito').attachEvent('onBeforeEditStop', grid_cfdi_este_deposito_before_edit_stop)
|
$$('grid_cfdi_este_deposito').attachEvent('onBeforeEditStop', grid_cfdi_este_deposito_before_edit_stop)
|
||||||
$$('grid_cfdi_este_deposito').attachEvent('onAfterEditStop', grid_cfdi_este_deposito_after_edit_stop)
|
$$('grid_cfdi_este_deposito').attachEvent('onAfterEditStop', grid_cfdi_este_deposito_after_edit_stop)
|
||||||
|
$$('filter_cuenta_year').attachEvent('onChange', filter_cuenta_change)
|
||||||
|
$$('filter_cuenta_month').attachEvent('onChange', filter_cuenta_change)
|
||||||
|
$$('filter_cuenta_dates').attachEvent('onChange', filter_cuenta_dates_change)
|
||||||
set_year_month()
|
set_year_month()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,8 +27,8 @@ var bancos_controllers = {
|
||||||
|
|
||||||
function set_year_month(){
|
function set_year_month(){
|
||||||
var d = new Date()
|
var d = new Date()
|
||||||
var y = $$('filtro_cuenta_year')
|
var y = $$('filter_cuenta_year')
|
||||||
var m = $$('filtro_cuenta_mes')
|
var m = $$('filter_cuenta_month')
|
||||||
|
|
||||||
webix.ajax().get('/values/cuentayears', {
|
webix.ajax().get('/values/cuentayears', {
|
||||||
error:function(text, data, XmlHttpRequest){
|
error:function(text, data, XmlHttpRequest){
|
||||||
|
@ -77,8 +80,8 @@ function get_estado_cuenta(rango){
|
||||||
if(rango == undefined){
|
if(rango == undefined){
|
||||||
var filtro = {
|
var filtro = {
|
||||||
cuenta: $$('lst_cuentas_banco').getValue(),
|
cuenta: $$('lst_cuentas_banco').getValue(),
|
||||||
year: $$('filtro_cuenta_year').getValue(),
|
year: $$('filter_cuenta_year').getValue(),
|
||||||
mes: $$('filtro_cuenta_mes').getValue(),
|
mes: $$('filter_cuenta_month').getValue(),
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
var filtro = {
|
var filtro = {
|
||||||
|
@ -120,7 +123,7 @@ function get_saldo_cuenta(){
|
||||||
|
|
||||||
|
|
||||||
function lst_cuentas_banco_change(nv, ov){
|
function lst_cuentas_banco_change(nv, ov){
|
||||||
//~ showvar('Cuenta change')
|
get_estado_cuenta()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -656,4 +659,15 @@ function cmd_invoice_payed_click(){
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function filter_cuenta_change(){
|
||||||
|
get_estado_cuenta()
|
||||||
|
}
|
||||||
|
|
||||||
|
function filter_cuenta_dates_change(range){
|
||||||
|
if(range.start != null && range.end != null){
|
||||||
|
get_estado_cuenta(range)
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -10,11 +10,11 @@ var toolbar_banco = [
|
||||||
|
|
||||||
|
|
||||||
var toolbar_filtro_cuenta = [
|
var toolbar_filtro_cuenta = [
|
||||||
{view: 'richselect', id: 'filtro_cuenta_year', label: 'Año',
|
{view: 'richselect', id: 'filter_cuenta_year', label: 'Año',
|
||||||
labelAlign: 'right', labelWidth: 50, width: 150, options: []},
|
labelAlign: 'right', labelWidth: 50, width: 150, options: []},
|
||||||
{view: 'richselect', id: 'filtro_cuenta_mes', label: 'Mes',
|
{view: 'richselect', id: 'filter_cuenta_month', label: 'Mes',
|
||||||
labelAlign: 'right', labelWidth: 50, width: 200, options: months},
|
labelAlign: 'right', labelWidth: 50, width: 200, options: months},
|
||||||
{view: 'daterangepicker', id: 'filtro_cuenta_fechas', label: 'Fechas',
|
{view: 'daterangepicker', id: 'filter_cuenta_dates', label: 'Fechas',
|
||||||
labelAlign: 'right', width: 300},
|
labelAlign: 'right', width: 300},
|
||||||
{},
|
{},
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue