diff --git a/Build/Build.fbl6 b/Build/Build.fbl6 index ead7731..2c1e901 100644 Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ diff --git a/Source/Cliente/uPantallaPrincipal.pas b/Source/Cliente/uPantallaPrincipal.pas index 9240bbc..c234ca1 100644 --- a/Source/Cliente/uPantallaPrincipal.pas +++ b/Source/Cliente/uPantallaPrincipal.pas @@ -194,14 +194,12 @@ end; procedure TfPantallaPrincipal.FormShow(Sender: TObject); begin - //El usuario vendedor de graden solo podrá ver ventas (Graden-Vendedor(2)) + //El usuario vendedor de graden solo podrá ver ventas y caja (Graden-Vendedor(2)) if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN) or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_MARBELLA) or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_DONOSTI) or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN_UECKO) then begin - Contabilidad1.Enabled := False; - Contabilidad1.Visible := False; Compras1.Enabled := False; Compras1.Visible := False; Logistica1.Enabled := False; @@ -209,7 +207,7 @@ begin ConfigurarFactuGES1.Enabled := False; ConfigurarFactuGES1.Visible := False; end - //El usuario normal de uecko solo no verá los bancos + //El usuario normal de uecko solo no verá contabilidad else if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_USUARIO) then begin Contabilidad1.Enabled := False; diff --git a/Source/GUIBase/GUIBase.res b/Source/GUIBase/GUIBase.res index 1641339..8b251f3 100644 Binary files a/Source/GUIBase/GUIBase.res and b/Source/GUIBase/GUIBase.res differ diff --git a/Source/Informes/1/InfAlbaranCliente.fr3 b/Source/Informes/1/InfAlbaranCliente.fr3 index 71e99c2..1a20e46 100644 --- a/Source/Informes/1/InfAlbaranCliente.fr3 +++ b/Source/Informes/1/InfAlbaranCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -33,12 +33,13 @@ - + + + - diff --git a/Source/Informes/1/InfAlbaranProveedor.fr3 b/Source/Informes/1/InfAlbaranProveedor.fr3 index 631a869..1ebd088 100644 --- a/Source/Informes/1/InfAlbaranProveedor.fr3 +++ b/Source/Informes/1/InfAlbaranProveedor.fr3 @@ -1,5 +1,5 @@ - + @@ -30,12 +30,13 @@ - + - + + diff --git a/Source/Informes/1/InfContratoCliente.fr3 b/Source/Informes/1/InfContratoCliente.fr3 index 3b02e9d..68e960e 100644 --- a/Source/Informes/1/InfContratoCliente.fr3 +++ b/Source/Informes/1/InfContratoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -13,7 +13,7 @@ - + @@ -70,12 +70,13 @@ - + + - + @@ -85,13 +86,14 @@ - + - + + diff --git a/Source/Informes/1/InfFacturaCliente.fr3 b/Source/Informes/1/InfFacturaCliente.fr3 index 04d2b90..07be0e7 100644 --- a/Source/Informes/1/InfFacturaCliente.fr3 +++ b/Source/Informes/1/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -47,20 +47,21 @@ - + - + + - + diff --git a/Source/Informes/1/InfPedidoProveedor.fr3 b/Source/Informes/1/InfPedidoProveedor.fr3 index bf2427c..b48c84a 100644 --- a/Source/Informes/1/InfPedidoProveedor.fr3 +++ b/Source/Informes/1/InfPedidoProveedor.fr3 @@ -1,5 +1,5 @@ - + @@ -31,12 +31,13 @@ - + - + + diff --git a/Source/Informes/1/InfPresupuestoCliente.fr3 b/Source/Informes/1/InfPresupuestoCliente.fr3 index c70c849..52aee8d 100644 --- a/Source/Informes/1/InfPresupuestoCliente.fr3 +++ b/Source/Informes/1/InfPresupuestoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -65,12 +65,13 @@ - + - + + @@ -81,13 +82,14 @@ - + - + - + + diff --git a/Source/Informes/10/InfContratoCliente.fr3 b/Source/Informes/10/InfContratoCliente.fr3 index 4ea4a40..2c67569 100644 --- a/Source/Informes/10/InfContratoCliente.fr3 +++ b/Source/Informes/10/InfContratoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -68,12 +68,13 @@ - + - + + @@ -82,14 +83,15 @@ - + - + + diff --git a/Source/Informes/10/InfFacturaCliente.fr3 b/Source/Informes/10/InfFacturaCliente.fr3 index a1688af..f0bded6 100644 --- a/Source/Informes/10/InfFacturaCliente.fr3 +++ b/Source/Informes/10/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -48,13 +48,14 @@ - + - + + diff --git a/Source/Informes/10/InfPresupuestoCliente.fr3 b/Source/Informes/10/InfPresupuestoCliente.fr3 index 756ff14..3b69c09 100644 --- a/Source/Informes/10/InfPresupuestoCliente.fr3 +++ b/Source/Informes/10/InfPresupuestoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -65,23 +65,25 @@ - + - + + - + - + + diff --git a/Source/Informes/2/2/InfContratoCliente.fr3 b/Source/Informes/2/2/InfContratoCliente.fr3 index 6c2c263..80fec3a 100644 --- a/Source/Informes/2/2/InfContratoCliente.fr3 +++ b/Source/Informes/2/2/InfContratoCliente.fr3 @@ -1,13 +1,14 @@ - + - + - + + @@ -82,14 +83,15 @@ - + - + + diff --git a/Source/Informes/2/2/InfFacturaCliente.fr3 b/Source/Informes/2/2/InfFacturaCliente.fr3 index 6ab8d3c..882a82c 100644 --- a/Source/Informes/2/2/InfFacturaCliente.fr3 +++ b/Source/Informes/2/2/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -48,13 +48,14 @@ - + - + + diff --git a/Source/Informes/2/2/InfPresupuestoCliente.fr3 b/Source/Informes/2/2/InfPresupuestoCliente.fr3 index 30fcc11..e87664a 100644 --- a/Source/Informes/2/2/InfPresupuestoCliente.fr3 +++ b/Source/Informes/2/2/InfPresupuestoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -65,23 +65,25 @@ - + - + + - + - + + diff --git a/Source/Informes/2/4/InfContratoCliente.fr3 b/Source/Informes/2/4/InfContratoCliente.fr3 index f34918e..6eff194 100644 --- a/Source/Informes/2/4/InfContratoCliente.fr3 +++ b/Source/Informes/2/4/InfContratoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -68,12 +68,13 @@ - + - + + @@ -82,14 +83,15 @@ - + - + + diff --git a/Source/Informes/2/4/InfFacturaCliente.fr3 b/Source/Informes/2/4/InfFacturaCliente.fr3 index e5b1c63..cc8ffd8 100644 --- a/Source/Informes/2/4/InfFacturaCliente.fr3 +++ b/Source/Informes/2/4/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -48,13 +48,14 @@ - + - + + diff --git a/Source/Informes/2/4/InfPresupuestoCliente.fr3 b/Source/Informes/2/4/InfPresupuestoCliente.fr3 index 47b4f2d..beee5cf 100644 --- a/Source/Informes/2/4/InfPresupuestoCliente.fr3 +++ b/Source/Informes/2/4/InfPresupuestoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -65,23 +65,25 @@ - + + - + - + - + + diff --git a/Source/Informes/2/5/InfContratoCliente.fr3 b/Source/Informes/2/5/InfContratoCliente.fr3 index 9301ab2..79bc562 100644 --- a/Source/Informes/2/5/InfContratoCliente.fr3 +++ b/Source/Informes/2/5/InfContratoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -68,12 +68,13 @@ - + - + + @@ -82,14 +83,15 @@ - + - + + diff --git a/Source/Informes/2/5/InfFacturaCliente.fr3 b/Source/Informes/2/5/InfFacturaCliente.fr3 index 22c2517..1cf1534 100644 --- a/Source/Informes/2/5/InfFacturaCliente.fr3 +++ b/Source/Informes/2/5/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -48,13 +48,14 @@ - + - + + diff --git a/Source/Informes/2/5/InfPresupuestoCliente.fr3 b/Source/Informes/2/5/InfPresupuestoCliente.fr3 index a7fb1d4..fc6d0ae 100644 --- a/Source/Informes/2/5/InfPresupuestoCliente.fr3 +++ b/Source/Informes/2/5/InfPresupuestoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -65,23 +65,25 @@ - + - + + - + - + + diff --git a/Source/Informes/6/InfContratoCliente.fr3 b/Source/Informes/6/InfContratoCliente.fr3 index 5ed883f..65cc128 100644 --- a/Source/Informes/6/InfContratoCliente.fr3 +++ b/Source/Informes/6/InfContratoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -68,12 +68,13 @@ - + - + + @@ -82,14 +83,15 @@ - + - + + diff --git a/Source/Informes/6/InfFacturaCliente.fr3 b/Source/Informes/6/InfFacturaCliente.fr3 index 18af425..908dc3f 100644 --- a/Source/Informes/6/InfFacturaCliente.fr3 +++ b/Source/Informes/6/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -48,13 +48,14 @@ - + - + + diff --git a/Source/Informes/6/InfPresupuestoCliente.fr3 b/Source/Informes/6/InfPresupuestoCliente.fr3 index 67f0f23..6751ea1 100644 --- a/Source/Informes/6/InfPresupuestoCliente.fr3 +++ b/Source/Informes/6/InfPresupuestoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -65,23 +65,25 @@ - + - + + - + - + + diff --git a/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas b/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas index c9c285e..15b0277 100644 --- a/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas +++ b/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas @@ -178,40 +178,32 @@ var Condicion: TDAWhereExpression; Condicion1: TDAWhereExpression; Condicion2: TDAWhereExpression; - Condicion3: TDAWhereExpression; - Condicion4: TDAWhereExpression; begin ShowHourglassCursor; try - Result := BuscarTodos; + Result := BuscarCajasBancos; with Result.DataTable.DynamicWhere do begin - // (REF_CUENTAS = 570 cajas) - Condicion1 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(CTE_CUENTASCAJA, datInteger), dboEqual); - // (REF_CUENTAS = 572 bancos) - //CAMBIO DE PRIVILEGIOS BANCO - Condicion3 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(CTE_CUENTASBANCO, datInteger), dboEqual); - if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_ADMINISTRADOR) - or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_GERENCIA) then - begin - Condicion2 := Condicion3; - end + //Añadimos los banco de pago segun empresa + //Si estamos en Abeto solo presentamos la cuenta bancaria que tengan por defecto en esa empresa/ejercicio + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO) then + Condicion1 := NewBinaryExpression(NewField('', fld_SubCuentasID_Ejercicio), NewConstant(AppFactuGES.EjercicioActivo.ID, datInteger), dboEqual) + //En el resto de casos e¡presentamos siempre las cuentas bancarias de Graden empresa 2/ejercicio 2 else - begin - Condicion4 := NewBinaryExpression(NewField('', fld_SubCuentasPAGO_DEFECTO), NewConstant(1, datInteger), dboEqual); - Condicion2 := NewBinaryExpression(Condicion3, Condicion4, dboAnd); - end; + Condicion1 := NewBinaryExpression(NewField('', fld_SubCuentasID_Ejercicio), NewConstant(2, datInteger), dboEqual); - //Acoplamos cajas y bancos a cuento - Condicion := NewBinaryExpression(Condicion1, Condicion2, dboOr); + //Añadimos presentar solo banco de pago por defecto + Condicion2 := NewBinaryExpression(NewField('', fld_SubCuentasPAGO_DEFECTO), NewConstant(1, datInteger), dboEqual); + + Condicion := NewBinaryExpression(Condicion1, Condicion2, dboAnd); if IsEmpty then Expression := Condicion else - Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + Expression := NewBinaryExpression(Expression, Condicion, dboOr); end; finally diff --git a/Source/Servidor/FactuGES_Server.res b/Source/Servidor/FactuGES_Server.res index 682b7e5..14ba592 100644 Binary files a/Source/Servidor/FactuGES_Server.res and b/Source/Servidor/FactuGES_Server.res differ