From a95e4ffa987a7c8168cd8ee0b76fd2c0684efeb2 Mon Sep 17 00:00:00 2001 From: roberto Date: Wed, 9 Apr 2008 10:35:38 +0000 Subject: [PATCH] Cambios en funcionalidad de subcuentas contables relacionadas con la gestion git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@190 f4e31baf-9722-1c47-927c-6f952f962d4b --- Database/scripts/factuges.sql | 1 + Source/Base/Base.dproj | 82 +-- Source/Base/Base.res | Bin 384 -> 4748 bytes .../Controller/uSubCuentasController.pas | 7 +- .../Servidor/srvContabilidad_Impl.dfm | 50 +- .../Servidor/srvContabilidad_Impl.pas | 4 +- .../Views/uEditorElegirCuentas.dfm | 20 +- .../Views/uEditorElegirCuentas.pas | 2 +- .../Views/uViewSubCuentaContacto.dfm | 22 +- .../Views/uViewSubCuentaContacto.pas | 5 +- Source/Servidor/FactuGES_Server.dproj | 504 +++++++++--------- 11 files changed, 373 insertions(+), 324 deletions(-) diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index 66d825eb..6c1c0a96 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -1987,6 +1987,7 @@ CONT_CUENTAS.REF_CUENTA, CONT_CUENTAS.DESCRIPCION as CUENTA, V_CONT_SUBCUENTAS_S from V_CONT_SUBCUENTAS_SALDO left join CONT_SUBCUENTAS on (CONT_SUBCUENTAS.ID = V_CONT_SUBCUENTAS_SALDO.ID_SUBCUENTA) left join CONT_CUENTAS on (CONT_CUENTAS.ID = CONT_SUBCUENTAS.ID_CUENTA) +order by CONT_CUENTAS.REF_CUENTA ; diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index 5048859e..c7c3b6b4 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -58,47 +58,47 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fConfigurarConexion
di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J<8T z?0b7=-`Z3A#vV$4XJ5(lQ~TOZHUFdA%oWvK5zg&_IKXIbughQBA8XAsd#=@|TFLXC zy(^m((;DnQmDQKatmw!@c`| G?EMQ&4NnpP delta 11 ScmeBCZD5|Duvteife`=|>;pCc diff --git a/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas b/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas index 2b902efd..59eeb00e 100644 --- a/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas +++ b/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas @@ -119,7 +119,8 @@ var begin ASubCuenta := Nuevo; Ver(ASubCuenta); - AsignarSubCuentaAContacto(ASubCuenta, ASubCuentaContacto); + if not ASubCuenta.IsEmpty then + AsignarSubCuentaAContacto(ASubCuenta, ASubCuentaContacto); end; procedure TSubCuentasController.AsignarDataModule; @@ -250,7 +251,7 @@ var begin ShowHourglassCursor; try - Result := BuscarCuentas(TipoCuenta); + Result := BuscarTodos;//BuscarCuentas(TipoCuenta); with Result.DataTable.DynamicWhere do begin @@ -484,7 +485,7 @@ begin inherited; try AController := TCuentasController.Create; - ACuenta := (AController.ElegirCuenta(AController.BuscarTodos, 'ddddddd', False) as IBizCuenta); + ACuenta := (AController.ElegirCuenta(AController.BuscarTodos, 'Debe elegir una cuenta asociada a la subcuenta', False) as IBizCuenta); if Assigned(ACuenta) then begin diff --git a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.dfm b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.dfm index 1dd3a5b2..0d6f6d87 100644 --- a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.dfm +++ b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.dfm @@ -488,11 +488,6 @@ object srvContabilidad: TsrvContabilidad Name = 'REF_CUENTA' Value = '' ParamType = daptInput - end - item - Name = 'REF_TIENDA' - Value = '' - ParamType = daptInput end> Statements = < item @@ -505,7 +500,7 @@ object srvContabilidad: TsrvContabilidad 'Integer))'#10'from cont_subcuentas'#10'left join cont_cuentas on cont_cu' + 'entas.id = cont_subcuentas.id_cuenta'#10'where cont_subcuentas.id_ej' + 'ercicio = :ID_EJERCICIO'#10'and cont_cuentas.ref_cuenta = :REF_CUENT' + - 'A'#10#10 + 'A'#10#10#10 StatementType = stSQL ColumnMappings = < item @@ -513,7 +508,7 @@ object srvContabilidad: TsrvContabilidad TableField = 'MAX' end> end> - Name = 'DarMaxRefSubCuenta' + Name = 'DarMaxRefSubCuentaProv' Fields = < item Name = 'MAX' @@ -1349,6 +1344,47 @@ object srvContabilidad: TsrvContabilidad Size = 255 DictionaryEntry = 'Balances_DESCRIPCION3' end> + end + item + Params = < + item + Name = 'ID_EJERCICIO' + Value = '' + ParamType = daptInput + end + item + Name = 'REF_CUENTA' + Value = '' + ParamType = daptInput + end + item + Name = 'REF_TIENDA' + Value = '' + ParamType = daptInput + end> + Statements = < + item + Connection = 'IBX' + SQL = + 'select max(cast(substr(cont_subcuentas.ref_subcuenta, 6, 10) as ' + + 'Integer))'#10'from cont_subcuentas'#10'left join cont_cuentas on cont_cu' + + 'entas.id = cont_subcuentas.id_cuenta'#10'where cont_subcuentas.id_ej' + + 'ercicio = :ID_EJERCICIO'#10'and cont_cuentas.ref_cuenta = :REF_CUENT' + + 'A'#10'and substr(cont_subcuentas.ref_subcuenta, 4, 5) = :REF_TIENDA'#10 + + #10 + StatementType = stSQL + ColumnMappings = < + item + DatasetField = 'MAX' + TableField = 'MAX' + end> + end> + Name = 'DarMaxRefSubCuentaCli' + Fields = < + item + Name = 'MAX' + DataType = datInteger + end> end> JoinDataTables = <> UnionDataTables = <> diff --git a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas index 9ae5cb04..af1af745 100644 --- a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas +++ b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas @@ -87,7 +87,7 @@ begin RefTienda := format('%.2d', [NumTienda]); dsData := NIL; - dsData := schContabilidad.NewDataset(AConn, 'DarMaxRefSubCuenta', ['ID_EJERCICIO', 'REF_CUENTA', 'REF_TIENDA'], [darEjercicioActivo(ID_EMPRESA), REFERENCIA_CLIENTES, RefTienda]); + dsData := schContabilidad.NewDataset(AConn, 'DarMaxRefSubCuentaCli', ['ID_EJERCICIO', 'REF_CUENTA', 'REF_TIENDA'], [darEjercicioActivo(ID_EMPRESA), REFERENCIA_CLIENTES, RefTienda]); dsData.Active := True; if VarIsNull(dsData.FieldValues[0]) then @@ -161,7 +161,7 @@ begin try try dsData := NIL; - dsData := schContabilidad.NewDataset(AConn, 'DarMaxRefSubCuenta', ['ID_EJERCICIO', 'REF_CUENTA'], [darEjercicioActivo(ID_EMPRESA), REFERENCIA_PROVEEDORES]); + dsData := schContabilidad.NewDataset(AConn, 'DarMaxRefSubCuentaProv', ['ID_EJERCICIO', 'REF_CUENTA'], [darEjercicioActivo(ID_EMPRESA), REFERENCIA_PROVEEDORES]); dsData.Active := True; if VarIsNull(dsData.FieldValues[0]) then diff --git a/Source/Modulos/Contabilidad/Views/uEditorElegirCuentas.dfm b/Source/Modulos/Contabilidad/Views/uEditorElegirCuentas.dfm index 04f473f8..e5aaddf9 100644 --- a/Source/Modulos/Contabilidad/Views/uEditorElegirCuentas.dfm +++ b/Source/Modulos/Contabilidad/Views/uEditorElegirCuentas.dfm @@ -1,8 +1,8 @@ inherited fEditorElegirCuentas: TfEditorElegirCuentas - Caption = 'Seleccionar pedido de cliente' + Caption = 'Seleccionar cuenta' ClientWidth = 656 ExplicitWidth = 664 - ExplicitHeight = 240 + ExplicitHeight = 478 PixelsPerInch = 96 TextHeight = 13 object JvgWizardHeader1: TJvgWizardHeader [0] @@ -26,7 +26,7 @@ inherited fEditorElegirCuentas: TfEditorElegirCuentas SymbolFont.Name = 'Wingdings' SymbolFont.Style = [fsBold] Captions.Strings = ( - 'Seleccione el pedido de proveedor') + 'Seleccione una cuenta') Comments.Strings = ( ' ') Gradient.FromColor = clHighlight @@ -38,8 +38,8 @@ inherited fEditorElegirCuentas: TfEditorElegirCuentas end inherited JvNavPanelHeader: TJvNavPanelHeader Width = 656 - Caption = 'Lista de pedidos de proveedor' Visible = False + ExplicitTop = -6 ExplicitWidth = 656 inherited Image1: TImage Left = 629 @@ -165,9 +165,17 @@ inherited fEditorElegirCuentas: TfEditorElegirCuentas inherited dxLayoutControl1: TdxLayoutControl Width = 656 ExplicitWidth = 656 + inherited txtFiltroTodo: TcxTextEdit + ExplicitWidth = 273 + Width = 273 + end + inherited edtFechaIniFiltro: TcxDateEdit + ExplicitWidth = 121 + Width = 121 + end inherited edtFechaFinFiltro: TcxDateEdit - Left = 290 - ExplicitLeft = 290 + Left = 225 + ExplicitLeft = 225 ExplicitWidth = 421 Width = 421 end diff --git a/Source/Modulos/Contabilidad/Views/uEditorElegirCuentas.pas b/Source/Modulos/Contabilidad/Views/uEditorElegirCuentas.pas index c66c2d67..12c27c3d 100644 --- a/Source/Modulos/Contabilidad/Views/uEditorElegirCuentas.pas +++ b/Source/Modulos/Contabilidad/Views/uEditorElegirCuentas.pas @@ -12,7 +12,7 @@ uses JvNavigationPane, uViewBarraSeleccion, JvgWizardHeader, StdCtrls, uBizCuentas, uIEditorElegirCuentas, JvExComCtrls, JvStatusBar, uEditorCuentas, uViewCuentas, - JSDialog, uDAInterfaces; + JSDialog, uDAInterfaces, dxGDIPlusClasses; type TfEditorElegirCuentas = class(TfEditorCuentas, IEditorElegirCuentas) diff --git a/Source/Modulos/Contactos/Views/uViewSubCuentaContacto.dfm b/Source/Modulos/Contactos/Views/uViewSubCuentaContacto.dfm index 94687524..a5e93d80 100644 --- a/Source/Modulos/Contactos/Views/uViewSubCuentaContacto.dfm +++ b/Source/Modulos/Contactos/Views/uViewSubCuentaContacto.dfm @@ -1,6 +1,6 @@ inherited frViewSubCuentaContacto: TfrViewSubCuentaContacto - Width = 451 - Height = 304 + Width = 680 + Height = 305 Align = alClient AutoSize = True OnCreate = CustomViewCreate @@ -10,15 +10,17 @@ inherited frViewSubCuentaContacto: TfrViewSubCuentaContacto object layoutApunte: TdxLayoutControl Left = 0 Top = 0 - Width = 451 - Height = 304 + Width = 680 + Height = 305 Align = alClient ParentBackground = True TabOrder = 0 AutoContentSizes = [acsWidth, acsHeight] + ExplicitWidth = 451 + ExplicitHeight = 304 DesignSize = ( - 451 - 304) + 680 + 305) object eRefSubCuenta: TcxDBTextEdit Left = 93 Top = 37 @@ -40,7 +42,7 @@ inherited frViewSubCuentaContacto: TfrViewSubCuentaContacto Width = 346 end object BitBtn3: TBitBtn - Left = 119 + Left = 338 Top = 37 Width = 110 Height = 25 @@ -104,7 +106,7 @@ inherited frViewSubCuentaContacto: TfrViewSubCuentaContacto Width = 265 end object BitBtn1: TBitBtn - Left = 235 + Left = 454 Top = 37 Width = 120 Height = 25 @@ -148,7 +150,7 @@ inherited frViewSubCuentaContacto: TfrViewSubCuentaContacto E000E248D100E407DB00FF00FF00FF00FF00FF00FF00FF00FF00} end object BitBtn2: TBitBtn - Left = 361 + Left = 580 Top = 37 Width = 90 Height = 25 @@ -258,9 +260,7 @@ inherited frViewSubCuentaContacto: TfrViewSubCuentaContacto end object actAnadirSubcuenta: TAction Caption = 'A'#241'adir subcuenta' - Enabled = False ImageIndex = 5 - Visible = False OnExecute = actAnadirSubcuentaExecute OnUpdate = actAnadirSubcuentaUpdate end diff --git a/Source/Modulos/Contactos/Views/uViewSubCuentaContacto.pas b/Source/Modulos/Contactos/Views/uViewSubCuentaContacto.pas index 91fff165..79a1ca14 100644 --- a/Source/Modulos/Contactos/Views/uViewSubCuentaContacto.pas +++ b/Source/Modulos/Contactos/Views/uViewSubCuentaContacto.pas @@ -84,9 +84,8 @@ end; procedure TfrViewSubCuentaContacto.actAnadirSubcuentaUpdate(Sender: TObject); begin inherited; - (Sender as TAction).Enabled := False; -// (Sender as TAction).Enabled := (not (cbIgnorarContabilidad.Checked)) -// and (DADataSource.DataTable.IsEmpty); + (Sender as TAction).Enabled := (not (cbIgnorarContabilidad.Checked)) + and (DADataSource.DataTable.IsEmpty); end; procedure TfrViewSubCuentaContacto.actElegirSubCuentaExecute(Sender: TObject); diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index 109b1a07..b7742f3e 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -1,254 +1,258 @@ - + - - {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1} - FactuGES_Server.dpr - Debug - AnyCPU - DCC32 - ..\..\Output\Debug\Servidor\FactuGES_Server.exe - - - 7.0 - False - False - 0 - 3 - ..\..\Output\Release\Servidor - RELEASE - - - 7.0 - 3 - ..\..\Output\Debug\Servidor - DEBUG; - True - - - Delphi.Personality - - - FalseTrueFalseTrueFalse1100FalseFalseFalseFalseFalse308212521.1.0.01.1.0.0martes, 25 de marzo de 2008 19:25 - RemObjects Pascal Script - RemObjects SDK 3.0 Integration - FactuGES_Server.dpr - - - - - MainSource - - - - - -
srvEjercicios
- TDataAbstractService -
- - - -
srvEmpresas
- TDARemoteService -
- - - - - - - - - -
srvAlbaranesCliente
- TDataAbstractService -
- - - - -
srvAlbaranesProveedor
- TDataAbstractService -
- - - -
srvAlmacenes
- TDARemoteService -
- - - - - - -
srvContabilidad
- TDataAbstractService -
- - - - - - - -
RptEtiquetasContacto
- TDataModule -
- -
RptFichasEmpleado
- TDataModule -
- -
srvContactos
- TDARemoteService -
- - - - -
RptFacturasCliente
- TDataModule -
- -
srvFacturasCliente
- TDataAbstractService -
- - - - -
srvFacturasProveedor
- TDataAbstractService -
- - - - - - - - - -
srvHistoricoMovimientos
- TDataAbstractService -
- - - -
srvInventario
- TDataAbstractService -
- - - - -
srvPedidosProveedor
- TDataAbstractService -
- - - - -
RptPresupuestosCliente
-
- -
srvPresupuestosCliente
- TDataAbstractService -
- - - - - -
RptRecibosCliente
- TDataModule -
- -
srvRecibosCliente
- TDataAbstractService -
- - - - - -
srvRecibosProveedor
- TDataAbstractService -
- - - -
srvReferencias
- TDataAbstractService -
- - - - -
srvRemesasCliente
- TDataAbstractService -
- - - - -
srvRemesasProveedor
- TDataAbstractService -
- - - - - - -
srvUnidadesMedida
- TDataAbstractService -
- - - -
srvConfiguracion
- TDataAbstractService -
- -
frConexionBD
- TFrame -
- -
frConfGeneral
- TFrame -
- -
fConfiguracion
- TForm -
- -
FrameConfiguracion
- TFrame -
- -
srvLogin
- TDARemoteService -
- -
fAcercaDe
-
- -
dmServer
- TDataModule -
- -
fServerForm
-
- - - - - - - - -
+ + {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1} + FactuGES_Server.dpr + Debug + AnyCPU + DCC32 + ..\..\Output\Debug\Servidor\FactuGES_Server.exe + + + 7.0 + False + False + 0 + 3 + ..\..\Output\Release\Servidor + RELEASE + + + 7.0 + 3 + ..\..\Output\Debug\Servidor + DEBUG; + True + + + Delphi.Personality + + +FalseTrueFalseTrueFalse1100FalseFalseFalseFalseFalse308212521.1.0.01.1.0.0martes, 25 de marzo de 2008 19:25 + + + + + RemObjects Pascal Script - RemObjects SDK 3.0 Integration + FactuGES_Server.dpr + + + + + MainSource + + + + + +
srvEjercicios
+ TDataAbstractService +
+ + + +
srvEmpresas
+ TDARemoteService +
+ + + + + + + + + +
srvAlbaranesCliente
+ TDataAbstractService +
+ + + + +
srvAlbaranesProveedor
+ TDataAbstractService +
+ + + +
srvAlmacenes
+ TDARemoteService +
+ + + + + + +
srvContabilidad
+ TDataAbstractService +
+ + + + + + + +
RptEtiquetasContacto
+ TDataModule +
+ +
RptFichasEmpleado
+ TDataModule +
+ +
srvContactos
+ TDARemoteService +
+ + + + +
RptFacturasCliente
+ TDataModule +
+ +
srvFacturasCliente
+ TDataAbstractService +
+ + + + +
srvFacturasProveedor
+ TDataAbstractService +
+ + + + + + + + + +
srvHistoricoMovimientos
+ TDataAbstractService +
+ + + +
srvInventario
+ TDataAbstractService +
+ + + + +
srvPedidosProveedor
+ TDataAbstractService +
+ + + + +
RptPresupuestosCliente
+
+ +
srvPresupuestosCliente
+ TDataAbstractService +
+ + + + + +
RptRecibosCliente
+ TDataModule +
+ +
srvRecibosCliente
+ TDataAbstractService +
+ + + + + +
srvRecibosProveedor
+ TDataAbstractService +
+ + + +
srvReferencias
+ TDataAbstractService +
+ + + + +
srvRemesasCliente
+ TDataAbstractService +
+ + + + +
srvRemesasProveedor
+ TDataAbstractService +
+ + + + + + +
srvUnidadesMedida
+ TDataAbstractService +
+ + + +
srvConfiguracion
+ TDataAbstractService +
+ +
frConexionBD
+ TFrame +
+ +
frConfGeneral
+ TFrame +
+ +
fConfiguracion
+ TForm +
+ +
FrameConfiguracion
+ TFrame +
+ +
srvLogin
+ TDARemoteService +
+ +
fAcercaDe
+
+ +
dmServer
+ TDataModule +
+ +
fServerForm
+
+ + + + + + + + +