diff --git a/Database/scripts/factuges_generadores_fabrica.sql b/Database/scripts/factuges_generadores_fabrica.sql
new file mode 100644
index 0000000..ef99afd
--- /dev/null
+++ b/Database/scripts/factuges_generadores_fabrica.sql
@@ -0,0 +1,65 @@
+/* Los que empiezan en 1.000.000.000 */
+
+SET GENERATOR GEN_ALBARANES_CLI_DETALLES_ID TO 2000000000;
+SET GENERATOR GEN_ALBARANES_CLI_ID TO 2000000000;
+SET GENERATOR GEN_ALBARANES_PRO_DETALLES_ID TO 2000000000;
+SET GENERATOR GEN_ALBARANES_PRO_ID TO 2000000000;
+SET GENERATOR GEN_ALMACENES_ID TO 2000000000;
+SET GENERATOR GEN_ARTICULOS_ID TO 2000000000;
+SET GENERATOR GEN_BALANCES_ID TO 2000000000;
+SET GENERATOR GEN_CATEGORIAS_ID TO 2000000000;
+SET GENERATOR GEN_CLIENTES_DTOS_PROV_ID TO 2000000000;
+SET GENERATOR GEN_CLIENTES_GRUPOS_ID TO 2000000000;
+SET GENERATOR GEN_CLIENTES_PROCEDENCIAS_ID TO 2000000000;
+SET GENERATOR GEN_COMISIONES_LIQUID_ID TO 2000000000;
+SET GENERATOR GEN_COMISIONES_VENDEDORES_ID TO 2000000000;
+SET GENERATOR GEN_CONFIGURACION_ID TO 2000000000;
+SET GENERATOR GEN_CONTACTOS_DATOS_BANCO_ID TO 2000000000;
+SET GENERATOR GEN_CONTACTOS_DIR_ID TO 2000000000;
+SET GENERATOR GEN_CONTACTOS_ID TO 2000000000;
+SET GENERATOR GEN_CONTACTOS_PERSONAL_ID TO 2000000000;
+SET GENERATOR GEN_CONTRATOS_CLI_DETALLE_ID TO 2000000000;
+SET GENERATOR GEN_CONTRATOS_CLI_ID TO 2000000000;
+SET GENERATOR GEN_CONT_APUNTES_ID TO 2000000000;
+SET GENERATOR GEN_CONT_ASIENTOS_ID TO 2000000000;
+SET GENERATOR GEN_CONT_BALANCES_ID TO 2000000000;
+SET GENERATOR GEN_CONT_CUENTAS_ESP_ID TO 2000000000;
+SET GENERATOR GEN_CONT_CUENTAS_ID TO 2000000000;
+SET GENERATOR GEN_CONT_EJERCICIOS_ID TO 2000000000;
+SET GENERATOR GEN_CONT_EPIGRAFES_ID TO 2000000000;
+SET GENERATOR GEN_CONT_SUBCUENTAS_ID TO 2000000000;
+SET GENERATOR GEN_EJERCICIOS_ID TO 2000000000;
+SET GENERATOR GEN_EMPRESAS_CONTACTOS_ID TO 2000000000;
+SET GENERATOR GEN_EMPRESAS_DATOS_BANCO_ID TO 2000000000;
+SET GENERATOR GEN_EMPRESAS_ID TO 2000000000;
+SET GENERATOR GEN_EMPRESAS_TIENDAS_ID TO 2000000000;
+SET GENERATOR GEN_EMPRESAS_USUARIOS_ID TO 2000000000;
+SET GENERATOR GEN_FACTURAS_CLIENTE_ID TO 2000000000;
+SET GENERATOR GEN_FACTURAS_PROVEEDOR_ID TO 2000000000;
+SET GENERATOR GEN_FACTURAS_PROV_CONTRATOS_ID TO 2000000000;
+SET GENERATOR GEN_FACTURA_CLIENTE_DETALLES_ID TO 2000000000;
+SET GENERATOR GEN_FACTURA_PROV_DETALLES_ID TO 2000000000;
+SET GENERATOR GEN_FAMILIAS_ID TO 2000000000;
+SET GENERATOR GEN_FORMAS_PAGO_ID TO 2000000000;
+SET GENERATOR GEN_FORMAS_PAGO_PLAZOS_ID TO 2000000000;
+SET GENERATOR GEN_INFORMES_ID TO 2000000000;
+SET GENERATOR GEN_MOVIMIENTOS_ID TO 2000000000;
+SET GENERATOR GEN_PAGOS_CLIENTE_ID TO 2000000000;
+SET GENERATOR GEN_PAGOS_PROVEEDOR_ID TO 2000000000;
+SET GENERATOR GEN_PEDIDOS_CLI_DETALLES_ID TO 2000000000;
+SET GENERATOR GEN_PEDIDOS_CLI_ID TO 2000000000;
+SET GENERATOR GEN_PEDIDOS_PROV_DETALLES_ID TO 2000000000;
+SET GENERATOR GEN_PEDIDOS_PROV_ID TO 2000000000;
+SET GENERATOR GEN_PERMISOSEX_ID TO 2000000000;
+SET GENERATOR GEN_PERMISOS_ID TO 2000000000;
+SET GENERATOR GEN_PRESUPUESTOS_CLI_DETALLE_ID TO 2000000000;
+SET GENERATOR GEN_PRESUPUESTOS_CLI_ID TO 2000000000;
+SET GENERATOR GEN_PROVEEDORES_GRUPOS_ID TO 2000000000;
+SET GENERATOR GEN_RECIBOS_CLIENTE_ID TO 2000000000;
+SET GENERATOR GEN_RECIBOS_PROVEEDOR_ID TO 2000000000;
+SET GENERATOR GEN_REMESAS_CLIENTE_ID TO 2000000000;
+SET GENERATOR GEN_REMESAS_PROVEEDOR_ID TO 2000000000;
+SET GENERATOR GEN_TIENDA_WEB_ID TO 2000000000;
+SET GENERATOR GEN_TIPOS_IVA_ID TO 2000000000;
+SET GENERATOR GEN_UNIDADES_MEDIDA_ID TO 2000000000;
+SET GENERATOR GEN_USUARIOS_ID TO 2000000000;
diff --git a/Database/scripts/factuges_generadores_valdebernardo.sql b/Database/scripts/factuges_generadores_tienda_armarios.sql
similarity index 91%
rename from Database/scripts/factuges_generadores_valdebernardo.sql
rename to Database/scripts/factuges_generadores_tienda_armarios.sql
index 760d0f2..9d15e0d 100644
--- a/Database/scripts/factuges_generadores_valdebernardo.sql
+++ b/Database/scripts/factuges_generadores_tienda_armarios.sql
@@ -1,6 +1,5 @@
/* Los que empiezan en 1.000.000.000 */
-SET GENERATOR GEN_AGENTES_COMISIONES_ID TO 1000000000;
SET GENERATOR GEN_ALBARANES_CLI_DETALLES_ID TO 1000000000;
SET GENERATOR GEN_ALBARANES_CLI_ID TO 1000000000;
SET GENERATOR GEN_ALBARANES_PRO_DETALLES_ID TO 1000000000;
@@ -18,6 +17,9 @@ SET GENERATOR GEN_CONFIGURACION_ID TO 1000000000;
SET GENERATOR GEN_CONTACTOS_DATOS_BANCO_ID TO 1000000000;
SET GENERATOR GEN_CONTACTOS_DIR_ID TO 1000000000;
SET GENERATOR GEN_CONTACTOS_ID TO 1000000000;
+SET GENERATOR GEN_CONTACTOS_PERSONAL_ID TO 1000000000;
+SET GENERATOR GEN_CONTRATOS_CLI_DETALLE_ID TO 1000000000;
+SET GENERATOR GEN_CONTRATOS_CLI_ID TO 1000000000;
SET GENERATOR GEN_CONT_APUNTES_ID TO 1000000000;
SET GENERATOR GEN_CONT_ASIENTOS_ID TO 1000000000;
SET GENERATOR GEN_CONT_BALANCES_ID TO 1000000000;
@@ -34,6 +36,7 @@ SET GENERATOR GEN_EMPRESAS_TIENDAS_ID TO 1000000000;
SET GENERATOR GEN_EMPRESAS_USUARIOS_ID TO 1000000000;
SET GENERATOR GEN_FACTURAS_CLIENTE_ID TO 1000000000;
SET GENERATOR GEN_FACTURAS_PROVEEDOR_ID TO 1000000000;
+SET GENERATOR GEN_FACTURAS_PROV_CONTRATOS_ID TO 1000000000;
SET GENERATOR GEN_FACTURA_CLIENTE_DETALLES_ID TO 1000000000;
SET GENERATOR GEN_FACTURA_PROV_DETALLES_ID TO 1000000000;
SET GENERATOR GEN_FAMILIAS_ID TO 1000000000;
diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj
index e1875bd..68839a8 100644
--- a/Source/GUIBase/GUIBase.dproj
+++ b/Source/GUIBase/GUIBase.dproj
@@ -58,34 +58,34 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/GUIBase/GUIBase.res b/Source/GUIBase/GUIBase.res
index 8b251f3..1641339 100644
Binary files a/Source/GUIBase/GUIBase.res and b/Source/GUIBase/GUIBase.res differ
diff --git a/Source/Modulos/Contabilidad/Controller/uAsientosController.pas b/Source/Modulos/Contabilidad/Controller/uAsientosController.pas
index 9994131..9fbed57 100644
--- a/Source/Modulos/Contabilidad/Controller/uAsientosController.pas
+++ b/Source/Modulos/Contabilidad/Controller/uAsientosController.pas
@@ -22,6 +22,8 @@ type
function Guardar(AAsiento : IBizAsiento): Boolean;
procedure DescartarCambios(AAsiento : IBizAsiento);
procedure Puntear(ADiario: IBizDiario);
+ function AnadirApuntesEntrada(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean;
+ function AnadirApuntesSalida(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean;
end;
TAsientosController = class(TControllerBase, IAsientosController)
@@ -57,6 +59,8 @@ type
procedure Ver(AAsiento: IBizAsiento);
procedure Puntear(ADiario: IBizDiario);
function CerrarCajaBanco(IdSubcuenta:Integer): Boolean;
+ function AnadirApuntesEntrada(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean;
+ function AnadirApuntesSalida(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean;
end;
implementation
@@ -66,7 +70,7 @@ uses
uIEditorDiario, uIEditorExtractoMovimientos, uIEditorAsiento,
uDataModuleContabilidad, uDAInterfaces, uDataTableUtils, uDialogUtils,
uFactuGES_App, uBizEjercicios, uDateUtils, uROTypes, DateUtils, Controls, Windows,
- uApuntesController;
+ uApuntesController, uBizSubCuentas, uSubCuentasController;
{ TAsientosController }
@@ -93,6 +97,108 @@ begin
end;
end;
+function TAsientosController.AnadirApuntesEntrada(AAsiento : IBizAsiento;
+ const ADescripcion: String; const AImporte: Currency): Boolean;
+var
+ ASubCuenta : IBizSubCuenta;
+ AController : ISubCuentasController;
+
+begin
+ //Validamos los datos a insertar
+ if ((Length(ADescripcion) = 0)
+ or (AImporte = 0)) then
+ raise Exception.Create('Debe introducir una descripción y un importe para poder realizar la entrada o salida.');
+
+ if Assigned(AAsiento) then
+ begin
+ if not AAsiento.Apuntes.DataTable.Editing then
+ AAsiento.Apuntes.DataTable.Edit;
+
+ //La cuenta de destino o origen ya viene rellena por defecto
+ AAsiento.Apuntes.CONCEPTO := ADescripcion;
+ AAsiento.Apuntes.DEBE := AImporte;
+ AAsiento.Apuntes.DataTable.FieldByName(fld_ApuntesHABER).Clear;
+ AAsiento.Apuntes.Post;
+
+ //Si ya tiene 2 apuntes es una modificación y solo tenemos que editar
+ //si por el contrario solo tiene uno añadimos el apunte de cuadre
+ if (AAsiento.Apuntes.DataTable.RecordCount = 2) then
+ begin
+ AAsiento.Apuntes.DataTable.Next;
+ AAsiento.Apuntes.DataTable.Edit
+ end
+ else
+ AAsiento.Apuntes.Append;
+
+ try
+ AController := TSubCuentasController.Create;
+ ASubCuenta := AController.BuscarVentas;
+ ASubCuenta.Open;
+
+ AAsiento.Apuntes.ID_SUBCUENTA := ASubCuenta.ID;
+ AAsiento.Apuntes.REF_SUBCUENTA := ASubCuenta.REF_SUBCUENTA;
+ AAsiento.Apuntes.SUBCUENTA := ASubCuenta.DESCRIPCION;
+ AAsiento.Apuntes.CONCEPTO := ADescripcion;
+ AAsiento.Apuntes.DataTable.FieldByName(fld_ApuntesDEBE).Clear;
+ AAsiento.Apuntes.HABER := AImporte;
+ AAsiento.Apuntes.Post;
+ finally
+ AController := Nil;
+ ASubCuenta := Nil;
+ end;
+ end;
+end;
+
+function TAsientosController.AnadirApuntesSalida(AAsiento: IBizAsiento;
+ const ADescripcion: String; const AImporte: Currency): Boolean;
+var
+ ASubCuenta : IBizSubCuenta;
+ AController : ISubCuentasController;
+
+begin
+ //Validamos los datos a insertar
+ if ((Length(ADescripcion) = 0)
+ or (AImporte = 0)) then
+ raise Exception.Create('Debe introducir una descripción y un importe para poder realizar la entrada o salida.');
+
+ if Assigned(AAsiento) then
+ begin
+ if not AAsiento.Apuntes.DataTable.Editing then
+ AAsiento.Apuntes.DataTable.Edit;
+
+ //La cuenta de destino o origen ya viene rellena por defecto
+ AAsiento.Apuntes.CONCEPTO := ADescripcion;
+ AAsiento.Apuntes.HABER := AImporte;
+ AAsiento.Apuntes.DataTable.FieldByName(fld_ApuntesDEBE).Clear;
+ AAsiento.Apuntes.Post;
+
+ //Si ya tiene 2 apuntes es una modificación y solo tenemos que editar
+ //si por el contrario solo tiene uno añadimos el apunte de cuadre
+ if (AAsiento.Apuntes.DataTable.RecordCount = 2) then
+ begin
+ AAsiento.Apuntes.DataTable.Next;
+ AAsiento.Apuntes.DataTable.Edit
+ end
+ else
+ AAsiento.Apuntes.Append;
+ try
+ AController := TSubCuentasController.Create;
+ ASubCuenta := AController.BuscarCompras;
+ ASubCuenta.Open;
+ AAsiento.Apuntes.ID_SUBCUENTA := ASubCuenta.ID;
+ AAsiento.Apuntes.REF_SUBCUENTA := ASubCuenta.REF_SUBCUENTA;
+ AAsiento.Apuntes.SUBCUENTA := ASubCuenta.DESCRIPCION;
+ AAsiento.Apuntes.CONCEPTO := ADescripcion;
+ AAsiento.Apuntes.DataTable.FieldByName(fld_ApuntesHABER).Clear;
+ AAsiento.Apuntes.DEBE := AImporte;
+ AAsiento.Apuntes.Post;
+ finally
+ AController := Nil;
+ ASubCuenta := Nil;
+ end;
+ end;
+end;
+
procedure TAsientosController.AsignarDataModule;
begin
FDataModule := TDataModuleContabilidad.Create(Nil);
diff --git a/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas b/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas
index ce0a1b7..7dd3649 100644
--- a/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas
+++ b/Source/Modulos/Contabilidad/Controller/uSubCuentasController.pas
@@ -17,8 +17,8 @@ const
CTE_CUENTASPROVEEDOR = 400;
CTE_CUENTASCAJA = 570;
CTE_CUENTASBANCO = 572;
- CTE_CUENTASVENTA = 7;
- CTE_CUENTASCOMPRA = 6;
+ CTE_CUENTASVENTA = '7000000000'; //7;
+ CTE_CUENTASCOMPRA = '6000000000'; //6;
type
TEnumTipoSubCuenta = (tTodas, tClientes, tProveedores, tCompras, tVentas, tCajas);
@@ -27,6 +27,8 @@ type
['{94E5F2B6-64C8-4331-B9CB-3ED730478529}']
function BuscarTodos: IBizSubCuenta;
function Buscar(ID: Integer): IBizSubCuenta;
+ function BuscarVentas: IBizSubCuenta;
+ function BuscarCompras: IBizSubCuenta;
procedure VerTodos(ASubCuentas: IBizSubCuenta);
procedure Ver(ASubCuenta: IBizSubCuenta);
procedure Anadir(ASubCuenta : IBizSubCuenta);
@@ -46,7 +48,7 @@ type
procedure EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
function DarLista(Const TipoSubCuenta: TEnumTipoSubCuenta): TStringList;
- function Duplicar(ASubCuenta: IBizSubCuenta): IBizSubCuenta;
+ function Duplicar(ASubCuenta: IBizSubCuenta): IBizSubCuenta;
end;
TSubCuentasController = class(TControllerBase, ISubCuentasController)
@@ -211,7 +213,7 @@ begin
with Result.DataTable.DynamicWhere do
begin
// (REF_EPIGRAFE_PADRE = 6 compras)
- Condicion := NewBinaryExpression(NewField('', fld_SubCuentasREF_EPIGRAFE_PADRE), NewConstant(CTE_CUENTASCOMPRA, datInteger), dboEqual);
+ Condicion := NewBinaryExpression(NewField('', fld_SubCuentasREF_SUBCUENTA), NewConstant(CTE_CUENTASCOMPRA, datString), dboEqual);
if IsEmpty then
Expression := Condicion
@@ -289,7 +291,7 @@ begin
with Result.DataTable.DynamicWhere do
begin
// (REF_EPIGRAFE_PADRE = 7 ventas)
- Condicion := NewBinaryExpression(NewField('', fld_SubCuentasREF_EPIGRAFE_PADRE), NewConstant(CTE_CUENTASVENTA, datInteger), dboEqual);
+ Condicion := NewBinaryExpression(NewField('', fld_SubCuentasREF_SUBCUENTA), NewConstant(CTE_CUENTASVENTA, datString), dboEqual);
if IsEmpty then
Expression := Condicion
diff --git a/Source/Modulos/Contabilidad/Plugin/uPluginContabilidad.dfm b/Source/Modulos/Contabilidad/Plugin/uPluginContabilidad.dfm
index ceeb35e..16fa45b 100644
--- a/Source/Modulos/Contabilidad/Plugin/uPluginContabilidad.dfm
+++ b/Source/Modulos/Contabilidad/Plugin/uPluginContabilidad.dfm
@@ -649,7 +649,9 @@ object PluginContabilidad: TPluginContabilidad
object actSubCuentas: TAction
Category = 'Contabilidad'
Caption = 'Subcuentas'
+ Enabled = False
ImageIndex = 1
+ Visible = False
OnExecute = actSubCuentasExecute
OnUpdate = actSubCuentasUpdate
end
diff --git a/Source/Modulos/Contabilidad/Views/Contabilidad_view.dproj b/Source/Modulos/Contabilidad/Views/Contabilidad_view.dproj
index eafa37b..0a6e86e 100644
--- a/Source/Modulos/Contabilidad/Views/Contabilidad_view.dproj
+++ b/Source/Modulos/Contabilidad/Views/Contabilidad_view.dproj
@@ -48,11 +48,11 @@
MainSource
-
-
-
-
-
+
+
+
+
+
TFrame
diff --git a/Source/Modulos/Contabilidad/Views/Contabilidad_view.res b/Source/Modulos/Contabilidad/Views/Contabilidad_view.res
index 8b251f3..1641339 100644
Binary files a/Source/Modulos/Contabilidad/Views/Contabilidad_view.res and b/Source/Modulos/Contabilidad/Views/Contabilidad_view.res differ
diff --git a/Source/Modulos/Contabilidad/Views/uEditorAsiento.dfm b/Source/Modulos/Contabilidad/Views/uEditorAsiento.dfm
index e17cf33..ff147e0 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorAsiento.dfm
+++ b/Source/Modulos/Contabilidad/Views/uEditorAsiento.dfm
@@ -4,20 +4,20 @@ inherited fEditorAsiento: TfEditorAsiento
HorzScrollBar.Visible = False
VertScrollBar.Visible = False
Caption = 'Ficha de asiento'
- ClientHeight = 595
- ClientWidth = 869
+ ClientHeight = 373
+ ClientWidth = 504
Scaled = False
OnClose = CustomEditorClose
- ExplicitWidth = 877
- ExplicitHeight = 629
+ ExplicitWidth = 512
+ ExplicitHeight = 407
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
- Width = 869
+ Width = 504
Caption = 'Asiento'
- ExplicitWidth = 869
+ ExplicitWidth = 504
inherited Image1: TImage
- Left = 842
+ Left = 477
Picture.Data = {
0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000018
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
@@ -44,8 +44,8 @@ inherited fEditorAsiento: TfEditorAsiento
end
end
inherited TBXDock: TTBXDock
- Width = 869
- ExplicitWidth = 869
+ Width = 504
+ ExplicitWidth = 504
inherited tbxMain: TTBXToolbar
ExplicitWidth = 330
inherited TBXItem2: TTBXItem
@@ -63,7 +63,7 @@ inherited fEditorAsiento: TfEditorAsiento
end
inherited tbxMenu: TTBXToolbar
DockPos = 0
- ExplicitWidth = 869
+ ExplicitWidth = 504
inherited TBXSubmenuItem4: TTBXSubmenuItem
inherited TBXItem8: TTBXItem
Visible = False
@@ -97,30 +97,38 @@ inherited fEditorAsiento: TfEditorAsiento
end
end
end
+ inherited StatusBar: TJvStatusBar
+ Top = 354
+ Width = 504
+ Panels = <
+ item
+ Width = 200
+ end>
+ ExplicitTop = 354
+ ExplicitWidth = 504
+ end
inherited pgPaginas: TPageControl
- Width = 863
- Height = 494
- ExplicitLeft = 3
- ExplicitTop = 79
- ExplicitWidth = 863
- ExplicitHeight = 494
+ Width = 498
+ Height = 242
+ ExplicitWidth = 498
+ ExplicitHeight = 242
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
- ExplicitWidth = 855
- ExplicitHeight = 466
+ ExplicitWidth = 490
+ ExplicitHeight = 214
object dxLayoutControl1: TdxLayoutControl
Left = 0
Top = 0
- Width = 855
- Height = 466
+ Width = 490
+ Height = 214
Align = alClient
TabOrder = 0
TabStop = False
AutoContentSizes = [acsWidth, acsHeight]
DesignSize = (
- 855
- 466)
+ 490
+ 214)
object edtOrden: TcxDBSpinEdit
Left = 293
Top = 10
@@ -205,6 +213,10 @@ inherited fEditorAsiento: TfEditorAsiento
inherited Panel2: TPanel
Left = 627
ExplicitLeft = 627
+ inherited eDescuadre: TcxCurrencyEdit
+ Top = 3
+ ExplicitTop = 3
+ end
end
end
inherited cxGrid: TcxGrid
@@ -224,20 +236,6 @@ inherited fEditorAsiento: TfEditorAsiento
end>
end
end
- inherited ToolBar1: TToolBar
- inherited ToolButton1: TToolButton
- ExplicitWidth = 113
- end
- inherited ToolButton4: TToolButton
- ExplicitWidth = 113
- end
- inherited ToolButton2: TToolButton
- ExplicitWidth = 113
- end
- inherited ToolButton7: TToolButton
- ExplicitWidth = 113
- end
- end
end
object dxLayoutControl1Group_Root: TdxLayoutGroup
ShowCaption = False
@@ -276,31 +274,131 @@ inherited fEditorAsiento: TfEditorAsiento
end
end
end
+ object EntradaSalida: TTabSheet
+ Caption = 'Entrada/Salida'
+ ImageIndex = 1
+ object dxLayoutControl2: TdxLayoutControl
+ Left = 0
+ Top = 0
+ Width = 490
+ Height = 214
+ Align = alClient
+ TabOrder = 0
+ TabStop = False
+ AutoContentSizes = [acsWidth, acsHeight]
+ DesignSize = (
+ 490
+ 214)
+ object edtFecha2: TcxDBDateEdit
+ Left = 73
+ Top = 10
+ Anchors = [akLeft, akTop, akRight]
+ DataBinding.DataField = 'FECHA_ASIENTO'
+ DataBinding.DataSource = dsDataTable
+ Properties.UseLeftAlignmentOnEditing = False
+ Style.BorderColor = clWindowFrame
+ Style.BorderStyle = ebs3D
+ Style.Color = clInfoBk
+ Style.HotTrack = False
+ Style.LookAndFeel.NativeStyle = True
+ Style.LookAndFeel.SkinName = ''
+ Style.Shadow = False
+ Style.ButtonStyle = bts3D
+ Style.ButtonTransparency = ebtNone
+ Style.PopupBorderStyle = epbsFrame3D
+ StyleDisabled.LookAndFeel.NativeStyle = True
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.NativeStyle = True
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.NativeStyle = True
+ StyleHot.LookAndFeel.SkinName = ''
+ TabOrder = 0
+ Width = 200
+ end
+ object Tipo: TcxComboBox
+ Left = 358
+ Top = 10
+ Properties.ImmediatePost = True
+ Properties.Items.Strings = (
+ 'Entrada'
+ 'Salida')
+ TabOrder = 1
+ Text = 'Entrada'
+ Width = 121
+ end
+ object eDescripcion: TcxTextEdit
+ Left = 73
+ Top = 37
+ TabOrder = 2
+ Width = 121
+ end
+ object eImporte: TcxCurrencyEdit
+ Left = 73
+ Top = 64
+ Properties.AssignedValues.MinValue = True
+ Style.LookAndFeel.NativeStyle = True
+ StyleDisabled.LookAndFeel.NativeStyle = True
+ StyleFocused.LookAndFeel.NativeStyle = True
+ StyleHot.LookAndFeel.NativeStyle = True
+ TabOrder = 3
+ BiDiMode = bdLeftToRight
+ ParentBiDiMode = False
+ Width = 112
+ end
+ object dxLayoutGroup1: TdxLayoutGroup
+ ShowCaption = False
+ Hidden = True
+ ShowBorder = False
+ object dxLayoutControl2Group1: TdxLayoutGroup
+ ShowCaption = False
+ Hidden = True
+ LayoutDirection = ldHorizontal
+ ShowBorder = False
+ object dxLayoutControl2Item1: TdxLayoutItem
+ Caption = 'Fecha:'
+ Control = edtFecha2
+ ControlOptions.ShowBorder = False
+ end
+ object dxLayoutControl2Item2: TdxLayoutItem
+ Caption = 'Entrada/Salida:'
+ Control = Tipo
+ ControlOptions.ShowBorder = False
+ end
+ end
+ object dxLayoutControl2Item3: TdxLayoutItem
+ Caption = 'Descripci'#243'n:'
+ Control = eDescripcion
+ ControlOptions.ShowBorder = False
+ end
+ object dxLayoutControl2Item4: TdxLayoutItem
+ Caption = 'Importe:'
+ Control = eImporte
+ ControlOptions.ShowBorder = False
+ end
+ end
+ end
+ end
end
- inherited StatusBar: TJvStatusBar
- Top = 576
- Width = 869
- Panels = <
- item
- Width = 200
- end>
- ExplicitTop = 576
- ExplicitWidth = 869
+ inherited PnlComentario: TPanel
+ Width = 504
+ ExplicitWidth = 504
+ inherited lbComentario: TLabel
+ Width = 494
+ Height = 25
+ end
end
inherited EditorActionList: TActionList
Top = 128
end
- inherited SmallImages: TPngImageList
- Top = 112
- end
inherited dsDataTable: TDADataSource [6]
Left = 16
Top = 168
end
- inherited LargeImages: TPngImageList [7]
+ inherited LargeImages: TPngImageList
Top = 112
end
- inherited JvFormStorage: TJvFormStorage [8]
+ inherited SmallImages: TPngImageList [9]
+ Top = 112
end
inherited StatusBarImages: TPngImageList
Left = 24
diff --git a/Source/Modulos/Contabilidad/Views/uEditorAsiento.pas b/Source/Modulos/Contabilidad/Views/uEditorAsiento.pas
index dfe792c..412dae0 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorAsiento.pas
+++ b/Source/Modulos/Contabilidad/Views/uEditorAsiento.pas
@@ -16,7 +16,7 @@ uses
JvStatusBar, dxLayoutLookAndFeels, uDAInterfaces, uViewDetallesGenerico,
uViewApuntes, cxDropDownEdit, cxCalendar, cxDBEdit, dxLayoutControl,
cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxSpinEdit, cxControls, DBCtrls,
- dxGDIPlusClasses;
+ dxGDIPlusClasses, cxGraphics, cxCurrencyEdit;
type
TfEditorAsiento = class(TfEditorDBItem, IEditorAsiento)
@@ -32,6 +32,18 @@ type
dxLayoutControl1Group3: TdxLayoutGroup;
dxLayoutControl1Item1: TdxLayoutItem;
frViewApuntes1: TfrViewApuntes;
+ EntradaSalida: TTabSheet;
+ dxLayoutControl2: TdxLayoutControl;
+ dxLayoutGroup1: TdxLayoutGroup;
+ dxLayoutControl2Item1: TdxLayoutItem;
+ edtFecha2: TcxDBDateEdit;
+ Tipo: TcxComboBox;
+ dxLayoutControl2Item2: TdxLayoutItem;
+ eDescripcion: TcxTextEdit;
+ dxLayoutControl2Item3: TdxLayoutItem;
+ dxLayoutControl2Group1: TdxLayoutGroup;
+ dxLayoutControl2Item4: TdxLayoutItem;
+ eImporte: TcxCurrencyEdit;
procedure FormShow(Sender: TObject);
procedure dsDataTableDataChange(Sender: TObject; Field: TField);
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
@@ -68,7 +80,7 @@ implementation
{$R *.dfm}
uses
- uCustomEditor, uDataModuleBase, uFactuGES_App;
+ uCustomEditor, uDataModuleBase, uFactuGES_App, schContabilidadClient_Intf;
function ShowEditorAsiento (ABizObject : TDADataTableRules): TModalResult;
var
@@ -106,6 +118,12 @@ end;
procedure TfEditorAsiento.GuardarInterno;
begin
inherited;
+
+ if Tipo.Text = 'Entrada' then
+ FController.AnadirApuntesEntrada(FAsiento, eDescripcion.Text, eImporte.Value)
+ else
+ FController.AnadirApuntesSalida(FAsiento, eDescripcion.Text, eImporte.Value);
+
FController.Guardar(FAsiento);
Modified := False;
end;
@@ -172,15 +190,31 @@ begin
raise Exception.Create('No hay ningún asiento asignado');
Asiento.DataTable.Active := True;
+ if not Asiento.EsNuevo then
+ begin
+ Asiento.Apuntes.First;
+ eDescripcion.Text := Asiento.Apuntes.CONCEPTO;
+ if Asiento.Apuntes.DataTable.FieldByName(fld_ApuntesDEBE).IsNull then
+ begin
+ Tipo.ItemIndex := 1;
+ eImporte.Value := Asiento.Apuntes.HABER;
+ end
+ else
+ begin
+ Tipo.ItemIndex := 0;
+ eImporte.Value := Asiento.Apuntes.DEBE;
+ end;
+ end;
//Al insertar el orden se asigna automaticamente en el servidor, luego se podrá modificar
- if Asiento.EsNuevo then
+{ if Asiento.EsNuevo then
lcOrden.Visible := False
else
lcOrden.Visible := True;
+}
//En el caso de tener apuntes el asiento nos posicionaremos siempre el la columna concepto del ultimo apunte
- frViewApuntes1.GotoLast;
+// frViewApuntes1.GotoLast;
end;
destructor TfEditorAsiento.Destroy;
@@ -208,7 +242,7 @@ end;
constructor TfEditorAsiento.Create(AOwner: TComponent);
begin
inherited;
- pgPaginas.ActivePageIndex := 0;
+ pgPaginas.ActivePageIndex := 1;
// AsignarVista;
end;
diff --git a/Source/Modulos/Contabilidad/Views/uEditorDiario.dfm b/Source/Modulos/Contabilidad/Views/uEditorDiario.dfm
index f211a1b..08c712e 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorDiario.dfm
+++ b/Source/Modulos/Contabilidad/Views/uEditorDiario.dfm
@@ -2,11 +2,15 @@ inherited fEditorDiario: TfEditorDiario
Left = 489
Top = 325
Caption = 'Libro de diario'
+ ClientWidth = 593
+ ExplicitWidth = 601
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
+ Width = 593
Caption = 'Libro de diario'
inherited Image1: TImage
+ Left = 566
Picture.Data = {
0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000018
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
@@ -31,8 +35,9 @@ inherited fEditorDiario: TfEditorDiario
end
end
inherited TBXDock: TTBXDock
+ Width = 593
inherited tbxMain: TTBXToolbar
- ExplicitWidth = 543
+ ExplicitWidth = 561
end
inherited tbxFiltro: TTBXToolbar
ExplicitWidth = 269
@@ -43,6 +48,9 @@ inherited fEditorDiario: TfEditorDiario
Visible = False
end
end
+ inherited tbxMenu: TTBXToolbar
+ ExplicitWidth = 593
+ end
inherited TBXTMain2: TTBXToolbar
Left = 275
DockPos = 275
@@ -54,10 +62,13 @@ inherited fEditorDiario: TfEditorDiario
end
end
end
+ inherited StatusBar: TJvStatusBar
+ Width = 593
+ end
inline frViewDiario1: TfrViewDiario [3]
Left = 0
Top = 102
- Width = 543
+ Width = 593
Height = 323
Align = alClient
Font.Charset = DEFAULT_CHARSET
@@ -72,7 +83,7 @@ inherited fEditorDiario: TfEditorDiario
ExplicitWidth = 543
ExplicitHeight = 323
inherited cxGrid: TcxGrid
- Width = 543
+ Width = 593
Height = 195
ExplicitWidth = 543
ExplicitHeight = 195
@@ -102,12 +113,12 @@ inherited fEditorDiario: TfEditorDiario
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
- Width = 543
+ Width = 593
ExplicitWidth = 543
inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 543
inherited dxLayoutControl1: TdxLayoutControl
- Width = 543
+ Width = 593
ExplicitWidth = 543
inherited txtFiltroTodo: TcxTextEdit
Style.LookAndFeel.SkinName = ''
@@ -126,21 +137,21 @@ inherited fEditorDiario: TfEditorDiario
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
- Left = 337
+ Left = 367
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 337
+ ExplicitLeft = 367
ExplicitWidth = 121
Width = 121
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
- Width = 543
+ Width = 593
ExplicitWidth = 543
inherited tbxBotones: TTBXToolbar
- Width = 533
+ Width = 583
ExplicitWidth = 533
end
end
@@ -151,10 +162,10 @@ inherited fEditorDiario: TfEditorDiario
ExplicitTop = 297
ExplicitWidth = 543
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
- Width = 543
+ Width = 593
ExplicitWidth = 543
inherited TBXToolbar1: TTBXToolbar
- Width = 533
+ Width = 583
ExplicitWidth = 533
end
end
diff --git a/Source/Modulos/Contabilidad/Views/uEditorExtractoMovimientos.dfm b/Source/Modulos/Contabilidad/Views/uEditorExtractoMovimientos.dfm
index 934ae5f..c6473cc 100644
--- a/Source/Modulos/Contabilidad/Views/uEditorExtractoMovimientos.dfm
+++ b/Source/Modulos/Contabilidad/Views/uEditorExtractoMovimientos.dfm
@@ -42,7 +42,7 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
Width = 774
ExplicitWidth = 774
inherited tbxMain: TTBXToolbar
- ExplicitWidth = 704
+ ExplicitWidth = 561
end
inherited tbxFiltro: TTBXToolbar
inherited tbxEditFiltro: TTBXEditItem
@@ -53,9 +53,11 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
ExplicitWidth = 774
end
inherited TBXTMain2: TTBXToolbar
- DockPos = 275
+ Left = 343
+ DockPos = 343
Visible = True
- ExplicitWidth = 246
+ ExplicitLeft = 343
+ ExplicitWidth = 77
object TBXItem38: TTBXItem
Action = actPuntear
DisplayMode = nbdmImageAndText
@@ -221,7 +223,9 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
end
object actPuntear: TAction
Caption = 'Puntear/Despuntear asiento'
+ Enabled = False
ImageIndex = 24
+ Visible = False
OnExecute = actPuntearExecute
OnUpdate = actPuntearUpdate
end
diff --git a/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.dfm b/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.dfm
index ed832b3..4f956c8 100644
--- a/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.dfm
+++ b/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.dfm
@@ -127,15 +127,27 @@ inherited frViewExtractoMovimientos: TfrViewExtractoMovimientos
inherited TBXDockablePanel1: TTBXDockablePanel
inherited dxLayoutControl1: TdxLayoutControl
inherited txtFiltroTodo: TcxTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 242
Width = 242
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 346
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 346
ExplicitWidth = 198
Width = 198
diff --git a/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.pas b/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.pas
index 323cca5..6fbead8 100644
--- a/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.pas
+++ b/Source/Modulos/Contabilidad/Views/uViewExtractoMovimientos.pas
@@ -14,7 +14,8 @@ uses
dxPSEdgePatterns, dxPSCore, dxPScxCommon, dxPScxGrid6Lnk,
cxGridCustomPopupMenu, cxGridPopupMenu, uViewFiltroBase, TB2Item, TBX,
TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, uDAInterfaces, cxCalendar,
- cxImageComboBox, cxTextEdit, cxCurrencyEdit, uBizSubCuentas, uAsientosController;
+ cxImageComboBox, cxTextEdit, cxCurrencyEdit, uBizSubCuentas, uAsientosController,
+ uCustomView, uViewBase;
type
IViewExtractoMovimientos = interface(IViewGrid)