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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Base/Base.res b/Source/Base/Base.res
index 8b251f31..1641339f 100644
Binary files a/Source/Base/Base.res and b/Source/Base/Base.res differ
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
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDARemoteService
-
-
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDARemoteService
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataModule
-
-
-
- TDARemoteService
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
- TFrame
-
-
-
- TFrame
-
-
-
- TForm
-
-
-
- TFrame
-
-
-
- TDARemoteService
-
-
-
-
-
-
- TDataModule
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {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
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataModule
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+ TFrame
+
+
+
+ TFrame
+
+
+
+ TForm
+
+
+
+ TFrame
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+ TDataModule
+
+
+
+
+
+
+
+
+
+
+
+
+