Continuación de subida de contabilidad con asientos y apuntes sin funcionar.

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@57 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
roberto 2007-12-12 19:48:05 +00:00
parent 0fda171625
commit cac301c1e1
53 changed files with 4669 additions and 968 deletions

View File

@ -63,7 +63,7 @@ contains
uCuentasController in 'uCuentasController.pas',
uSubCuentasController in 'uSubCuentasController.pas',
uIEditorAsiento in 'View\uIEditorAsiento.pas',
uIEditorAsientos in 'View\uIEditorAsientos.pas',
uIEditorDiario in 'View\uIEditorDiario.pas',
uIEditorCuenta in 'View\uIEditorCuenta.pas',
uIEditorCuentas in 'View\uIEditorCuentas.pas',
uIEditorSubCuenta in 'View\uIEditorSubCuenta.pas',
@ -71,6 +71,9 @@ contains
uIEditorElegirEpigrafes in 'View\uIEditorElegirEpigrafes.pas',
uIEditorElegirBalances in 'View\uIEditorElegirBalances.pas',
uIEditorElegirCuentasEspeciales in 'View\uIEditorElegirCuentasEspeciales.pas',
uIEditorElegirCuentas in 'View\uIEditorElegirCuentas.pas';
uIEditorElegirCuentas in 'View\uIEditorElegirCuentas.pas',
uApuntesController in 'uApuntesController.pas',
uIEditorApunte in 'View\uIEditorApunte.pas',
uIEditorElegirSubCuentas in 'View\uIEditorElegirSubCuentas.pas';
end.

View File

@ -48,6 +48,7 @@
<DelphiCompile Include="Contabilidad_controller.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="uApuntesController.pas" />
<DCCReference Include="uAsientosController.pas" />
<DCCReference Include="uBalancesController.pas" />
<DCCReference Include="uCuentasController.pas" />
@ -71,18 +72,20 @@
<DCCReference Include="View\GUISDK_D11.dcp" />
<DCCReference Include="View\RemObjects_Core_D11.dcp" />
<DCCReference Include="View\rtl.dcp" />
<DCCReference Include="View\uIEditorApunte.pas" />
<DCCReference Include="View\uIEditorAsiento.pas" />
<DCCReference Include="View\uIEditorAsientos.pas" />
<DCCReference Include="View\uIEditorBalance.pas" />
<DCCReference Include="View\uIEditorBalances.pas" />
<DCCReference Include="View\uIEditorCuenta.pas" />
<DCCReference Include="View\uIEditorCuentaEspecial.pas" />
<DCCReference Include="View\uIEditorCuentas.pas" />
<DCCReference Include="View\uIEditorCuentasEspeciales.pas" />
<DCCReference Include="View\uIEditorDiario.pas" />
<DCCReference Include="View\uIEditorElegirBalances.pas" />
<DCCReference Include="View\uIEditorElegirCuentas.pas" />
<DCCReference Include="View\uIEditorElegirCuentasEspeciales.pas" />
<DCCReference Include="View\uIEditorElegirEpigrafes.pas" />
<DCCReference Include="View\uIEditorElegirSubCuentas.pas" />
<DCCReference Include="View\uIEditorEpigrafe.pas" />
<DCCReference Include="View\uIEditorEpigrafes.pas" />
<DCCReference Include="View\uIEditorSubCuenta.pas" />

View File

@ -0,0 +1,26 @@
unit uIEditorApunte;
interface
uses
uBizApuntes, uApuntesController;
type
IEditorApunte = interface
['{60744169-A32B-4AC7-ADEC-4F6B2C7D00EA}']
// function GetController : IApuntesController;
// procedure SetController (const Value : IApuntesController);
// property Controller : IApuntesController read GetController write SetController;
function GetApunte: IBizApunte;
procedure SetApunte(const Value: IBizApunte);
property Apunte: IBizApunte read GetApunte write SetApunte;
function ShowModal : Integer;
procedure Release;
end;
implementation
end.

View File

@ -1,23 +0,0 @@
unit uIEditorAsientos;
interface
uses
uEditorGridBase, uBizAsientos, uAsientosController;
type
IEditorAsientos = interface (IEditorGridBase)
['{47A77BA9-3845-469B-A790-81F3C6E0F134}']
function GetController : IAsientosController;
procedure SetController (const Value : IAsientosController);
property Controller : IAsientosController read GetController write SetController;
function GetAsientos: IBizAsiento;
procedure SetAsientos(const Value: IBizAsiento);
property Asientos: IBizAsiento read GetAsientos write SetAsientos;
end;
implementation
end.

View File

@ -0,0 +1,23 @@
unit uIEditorDiario;
interface
uses
uEditorGridBase, uBizDiario, uAsientosController;
type
IEditorDiario = interface (IEditorGridBase)
['{47A77BA9-3845-469B-A790-81F3C6E0F134}']
function GetController : IAsientosController;
procedure SetController (const Value : IAsientosController);
property Controller : IAsientosController read GetController write SetController;
function GetDiario: IBizDiario;
procedure SetDiario(const Value: IBizDiario);
property Diario: IBizDiario read GetDiario write SetDiario;
end;
implementation
end.

View File

@ -0,0 +1,26 @@
unit uIEditorElegirSubCuentas;
interface
uses
uIEditorSubCuentas, uBizSubCuentas, uGUIBase;
type
IEditorElegirSubCuentas = interface(IEditorSubCuentas)
['{4A5003AE-BF4E-466A-9C9D-FECDD69454D2}']
function GetSubCuentasSeleccionados: IBizSubCuenta;
property SubCuentasSeleccionados: IBizSubCuenta read GetSubCuentasSeleccionados;
procedure SetMultiSelect (AValue : Boolean);
function GetMultiSelect : Boolean;
property MultiSelect : Boolean read GetMultiSelect write SetMultiSelect;
procedure SetMensaje (const AValue: String);
function GetMensaje: String;
property Mensaje : String read GetMensaje write SetMensaje;
end;
implementation
end.

View File

@ -0,0 +1,363 @@
unit uApuntesController;
interface
uses
Classes, SysUtils, uDADataTable, uControllerBase,
uBizApuntes, uIDataModuleContabilidad;
type
IApuntesController = interface(IObservador)
['{94E5F2B6-64C8-4331-B9CB-3ED730478529}']
// function BuscarTodos: IBizApunte;
// function Buscar(const ID: Integer): IBizApunte;
// procedure VerTodos(AApuntes: IBizApunte);
procedure Anadir(AApunte : IBizApunte);
procedure Ver(AApunte: IBizApunte);
// function Anadir: IBizApunte;
function Eliminar(AApunte : IBizApunte): Boolean;
function Guardar(AApunte : IBizApunte): Boolean;
procedure DescartarCambios(AApunte : IBizApunte);
function ValidarApunte(AApunte: IBizApunte): Boolean;
procedure ElegirSubCuenta(AApunte: IBizApunte);
procedure AsignarDEBE(AApunte: IBizApunte);
procedure AsignarHABER(AApunte: IBizApunte);
end;
TApuntesController = class(TObservador, IApuntesController)
protected
FDataModule : IDataModuleContabilidad;
procedure RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable); override;
function CreateEditor(const AName : String; const IID: TGUID; out Intf): Boolean;
procedure AsignarDataModule;
procedure FiltrarEjercicio(AApunte: IBizApunte);
public
constructor Create; override;
destructor Destroy; override;
function ValidarApunte(AApunte: IBizApunte): Boolean;
procedure Anadir(AApunte : IBizApunte);
function Eliminar(AApunte : IBizApunte): Boolean;
function Guardar(AApunte : IBizApunte): Boolean; virtual;
procedure DescartarCambios(AApunte : IBizApunte); virtual;
// function Anadir: IBizApunte;
// function BuscarTodos: IBizApunte;
// function Buscar(const ID: Integer): IBizApunte;
// procedure VerTodos(AApuntes: IBizApunte);
procedure Ver(AApunte: IBizApunte);
procedure ElegirSubCuenta(AApunte: IBizApunte);
procedure AsignarDEBE(AApunte: IBizApunte);
procedure AsignarHABER(AApunte: IBizApunte);
end;
implementation
uses
cxControls, DB, uEditorRegistryUtils, schContabilidadClient_Intf,
uBizSubCuentas, uSubCuentasController,
uIEditorApunte, uDataModuleContabilidad,
uDAInterfaces, uDataTableUtils, uDialogUtils, uFactuGES_App,
uDateUtils, uROTypes, DateUtils, Controls, Windows;
{ TApuntesController }
{
function TApuntesController.Anadir: IBizApunte;
var
AApunte : IBizApunte;
begin
AApunte := FDataModule.GetApunteItem(ID_NULO);
AApunte.DataTable.Active := True;
AApunte.Insert;
Result := AApunte;
end;
}
procedure TApuntesController.Anadir(AApunte: IBizApunte);
begin
AApunte.Insert;
end;
procedure TApuntesController.AsignarDataModule;
begin
FDataModule := TDataModuleContabilidad.Create(Nil);
end;
procedure TApuntesController.AsignarDEBE(AApunte: IBizApunte);
begin
if Assigned(AApunte) then
begin
if not AApunte.DEBEIsNull then
begin
if not AApunte.DataTable.Editing then
AApunte.DataTable.Edit;
AApunte.HABERIsNull := True;
AApunte.DataTable.Post;
// RecalcularAsiento;
end;
end;
end;
procedure TApuntesController.AsignarHABER(AApunte: IBizApunte);
begin
if Assigned(AApunte) then
begin
if not AApunte.HABERIsNull then
begin
if not AApunte.DataTable.Editing then
AApunte.DataTable.Edit;
AApunte.DEBEIsNull := True;
AApunte.DataTable.Post;
// RecalcularAsiento;
end;
end;
end;
{
function TApuntesController.Buscar(const ID: Integer): IBizApunte;
begin
Result := FDataModule.GetApunteItem(ID);
end;
}
{
function TApuntesController.BuscarTodos: IBizApunte;
begin
Result := FDataModule.GetApunteItems;
FiltrarEjercicio(Result);
end;
}
constructor TApuntesController.Create;
begin
inherited;
AsignarDataModule;
end;
function TApuntesController.CreateEditor(const AName: String; const IID: TGUID; out Intf): Boolean;
begin
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
end;
procedure TApuntesController.DescartarCambios(AApunte: IBizApunte);
begin
if not Assigned(AApunte) then
raise Exception.Create ('Apunte no asignado');
ShowHourglassCursor;
try
if (AApunte.State in dsEditModes) then
AApunte.Cancel;
AApunte.DataTable.CancelUpdates;
finally
HideHourglassCursor;
end;
end;
destructor TApuntesController.Destroy;
begin
FDataModule:= NIL;
inherited;
end;
function TApuntesController.ValidarApunte(AApunte: IBizApunte): Boolean;
begin
Result := False;
if not Assigned(AApunte) then
raise Exception.Create ('Apuntes no asignados');
//Tambien hacemos post de sus tablas hija
if (AApunte.DataTable.State in dsEditModes) then
AApunte.DataTable.Post;
if (AApunte.DataTable.RecordCount = 0) then
raise Exception.Create('El asiento debe tener algún apunte');
AApunte.DataTable.DisableControls;
AApunte.DataTable.First;
while not AApunte.DataTable.EOF do
begin
if AApunte.ID_SUBCUENTAIsNull then
begin
AApunte.DataTable.EnableControls;
raise Exception.Create('Todo apunte debe tener una subcuenta asociada');
end;
AApunte.DataTable.Next;
end;
AApunte.DataTable.EnableControls;
Result := True;
{
if not Assigned(AApunte) then
raise Exception.Create ('Apunte no asignado');
if (AApunte.DataTable.State in dsEditModes) then
AApunte.DataTable.Post;
//Tambien hacemos post de sus tablas hija
if (AApunte.Apuntes.DataTable.State in dsEditModes) then
AApunte.Apuntes.DataTable.Post;
if (AApunte.Apuntes.DataTable.RecordCount = 0) then
raise Exception.Create('El Apunte debe tener algún apunte');
// if Length(AApunte.CONCEPTO) = 0 then
// raise Exception.Create('Debe indicar un concepto para este Apunte.');
}
Result := True;
end;
procedure TApuntesController.Ver(AApunte: IBizApunte);
var
AEditor : IEditorApunte;
begin
AEditor := NIL;
ShowHourglassCursor;
try
CreateEditor('EditorApunte', IEditorApunte, AEditor);
if Assigned(AEditor) then
with AEditor do
begin
// Controller := Self; //OJO ORDEN MUY IMPORTANTE
Apunte := AApunte;
ShowModal;
Release;
end;
finally
AEditor := NIL;
HideHourglassCursor;
end;
end;
{
procedure TApuntesController.VerTodos(AApuntes: IBizApunte);
var
AEditor : IEditorApuntes;
begin
AEditor := NIL;
ShowHourglassCursor;
try
CreateEditor('EditorApuntes', IEditorApuntes, AEditor);
if Assigned(AEditor) then
with AEditor do
begin
Controller := Self; //OJO ORDEN MUY IMPORTANTE
Apuntes := AApuntes;
ShowEmbedded;
end;
finally
AEditor := NIL;
HideHourglassCursor;
end;
end;
}
procedure TApuntesController.ElegirSubCuenta(AApunte: IBizApunte);
var
ASubCuenta : IBizSubCuenta;
AController : ISubCuentasController;
begin
inherited;
try
AController := TSubCuentasController.Create;
ASubCuenta := (AController.ElegirSubCuenta(AController.BuscarTodos, 'ddddddd', False) as IBizSubCuenta);
if Assigned(ASubCuenta) then
begin
if Assigned(AApunte) then
begin
if not AApunte.DataTable.Editing then
AApunte.DataTable.Edit;
AApunte.ID_SUBCUENTA := ASubCuenta.ID;
AApunte.REF_SUBCUENTA := ASubCuenta.REF_SUBCUENTA;
AApunte.SUBCUENTA := ASubCuenta.DESCRIPCION;
AApunte.Post;
end;
end;
finally
AController := Nil;
ASubCuenta := Nil;
end;
end;
function TApuntesController.Eliminar(AApunte: IBizApunte): Boolean;
begin
Result := False;
if not Assigned(AApunte) then
raise Exception.Create ('Apunte no asignado');
ShowHourglassCursor;
try
if (AApunte.State in dsEditModes) then
AApunte.Cancel;
AApunte.Delete;
AApunte.DataTable.ApplyUpdates;
HideHourglassCursor;
Result := True;
finally
HideHourglassCursor;
end;
end;
procedure TApuntesController.FiltrarEjercicio(AApunte: IBizApunte);
var
Condicion: TDAWhereExpression;
begin
if AApunte.DataTable.Active then
AApunte.DataTable.Active := False;
// Filtrar los Apuntes por la empresa activa
with AApunte.DataTable.DynamicWhere do
begin
// (ID_EJERCICIO = ID)
Condicion := NewBinaryExpression(NewField('', fld_DiarioID_EJERCICIO), NewConstant(AppFactuGES.EjercicioActivo.ID, datInteger), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
procedure TApuntesController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable);
begin
inherited;
//
end;
function TApuntesController.Guardar(AApunte: IBizApunte): Boolean;
begin
Result := True;
{
if ValidarApunte(AApunte) then
begin
ShowHourglassCursor;
try
AApunte.DataTable.ApplyUpdates;
Result := True;
finally
HideHourglassCursor;
end;
end;
}
if (AApunte.DataTable.State in dsEditModes) then
AApunte.DataTable.Post;
end;
end.

View File

@ -5,15 +5,15 @@ interface
uses
Classes, SysUtils, uDADataTable, uControllerBase,
uBizAsientos, uIDataModuleContabilidad;
uBizAsientos, uBizDiario, uIDataModuleContabilidad;
type
IAsientosController = interface(IObservador)
['{94E5F2B6-64C8-4331-B9CB-3ED730478529}']
function BuscarTodos: IBizAsiento;
function Buscar(ID: Integer): IBizAsiento;
procedure VerTodos(AAsientos: IBizAsiento);
function BuscarDiario: IBizDiario;
function Buscar(const ID: Integer): IBizAsiento;
procedure VerDiario(ADiario: IBizDiario);
procedure Ver(AAsiento: IBizAsiento);
procedure Anadir(AAsiento : IBizAsiento);
function Anadir: IBizAsiento;
function Eliminar(AAsiento : IBizAsiento): Boolean;
function Guardar(AAsiento : IBizAsiento): Boolean;
procedure DescartarCambios(AAsiento : IBizAsiento);
@ -28,7 +28,7 @@ type
function ValidarAsiento(AAsiento: IBizAsiento): Boolean;
procedure AsignarDataModule;
procedure FiltrarAsiento(AAsiento: IBizAsiento);
procedure FiltrarEjercicio(ADiario: IBizDiario);
public
constructor Create; override;
@ -37,10 +37,10 @@ type
function Eliminar(AAsiento : IBizAsiento): Boolean;
function Guardar(AAsiento : IBizAsiento): Boolean; virtual;
procedure DescartarCambios(AAsiento : IBizAsiento); virtual;
procedure Anadir(AAsiento : IBizAsiento);
function BuscarTodos: IBizAsiento;
function Buscar(ID: Integer): IBizAsiento;
procedure VerTodos(AAsientos: IBizAsiento);
function Anadir: IBizAsiento;
function BuscarDiario: IBizDiario;
function Buscar(const ID: Integer): IBizAsiento;
procedure VerDiario(ADiario: IBizDiario);
procedure Ver(AAsiento: IBizAsiento);
end;
@ -48,15 +48,20 @@ implementation
uses
cxControls, DB, uEditorRegistryUtils, schContabilidadClient_Intf,
uIEditorAsientos, uIEditorAsiento, uDataModuleContabilidad,
uIEditorDiario, uIEditorAsiento, uDataModuleContabilidad,
uDAInterfaces, uDataTableUtils, uDialogUtils, uFactuGES_App,
uDateUtils, uROTypes, DateUtils, Controls, Windows;
uDateUtils, uROTypes, DateUtils, Controls, Windows, uApuntesController;
{ TAsientosController }
procedure TAsientosController.Anadir(AAsiento: IBizAsiento);
function TAsientosController.Anadir: IBizAsiento;
var
AAsiento : IBizAsiento;
begin
AAsiento := FDataModule.GetAsientoItem(ID_NULO);
AAsiento.DataTable.Active := True;
AAsiento.Insert;
Result := AAsiento;
end;
procedure TAsientosController.AsignarDataModule;
@ -64,34 +69,15 @@ begin
FDataModule := TDataModuleContabilidad.Create(Nil);
end;
function TAsientosController.Buscar(ID: Integer): IBizAsiento;
var
Condicion: TDAWhereExpression;
function TAsientosController.Buscar(const ID: Integer): IBizAsiento;
begin
ShowHourglassCursor;
try
Result := BuscarTodos;
with Result.DataTable.DynamicWhere do
begin
// (ID = :ID)
Condicion := NewBinaryExpression(NewField('', fld_AsientosID), NewConstant(ID, datInteger), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
finally
HideHourglassCursor;
end;
Result := FDataModule.GetAsientoItem(ID);
end;
function TAsientosController.BuscarTodos: IBizAsiento;
function TAsientosController.BuscarDiario: IBizDiario;
begin
Result := FDataModule.GetAsientoItems;
FiltrarAsiento(Result);
Result := FDataModule.GetDiarioItems;
FiltrarEjercicio(Result);
end;
constructor TAsientosController.Create;
@ -137,6 +123,10 @@ begin
if (AAsiento.DataTable.State in dsEditModes) then
AAsiento.DataTable.Post;
//Tambien validamos los detalles del asiento
with TApuntesController.Create do
ValidarApunte(AAsiento.Apuntes);
// if Length(AAsiento.CONCEPTO) = 0 then
// raise Exception.Create('Debe indicar un concepto para este Asiento.');
@ -165,19 +155,19 @@ begin
end;
end;
procedure TAsientosController.VerTodos(AAsientos: IBizAsiento);
procedure TAsientosController.VerDiario(ADiario: IBizDiario);
var
AEditor : IEditorAsientos;
AEditor : IEditorDiario;
begin
AEditor := NIL;
ShowHourglassCursor;
try
CreateEditor('EditorAsientos', IEditorAsientos, AEditor);
CreateEditor('EditorDiario', IEditorDiario, AEditor);
if Assigned(AEditor) then
with AEditor do
begin
Controller := Self; //OJO ORDEN MUY IMPORTANTE
Asientos := AAsientos;
Diario := ADiario;
ShowEmbedded;
end;
finally
@ -207,25 +197,24 @@ begin
end;
end;
procedure TAsientosController.FiltrarAsiento(AAsiento: IBizAsiento);
procedure TAsientosController.FiltrarEjercicio(ADiario: IBizDiario);
var
Condicion: TDAWhereExpression;
begin
if AAsiento.DataTable.Active then
AAsiento.DataTable.Active := False;
if ADiario.DataTable.Active then
ADiario.DataTable.Active := False;
// Filtrar los Asientos actuales por Asiento activo
{ with AAsiento.DataTable.DynamicWhere do
// Filtrar los asientos por la empresa activa
with ADiario.DataTable.DynamicWhere do
begin
// (ID_Asiento = ID)
Condicion := NewBinaryExpression(NewField('', fld_AsientosID_Asiento), NewConstant(AppFactuGES.AsientoActivo.ID, datInteger), dboEqual);
// (ID_EJERCICIO = ID)
Condicion := NewBinaryExpression(NewField('', fld_DiarioID_EJERCICIO), NewConstant(AppFactuGES.EjercicioActivo.ID, datInteger), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
}
end;
procedure TAsientosController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable);
@ -238,11 +227,19 @@ function TAsientosController.Guardar(AAsiento: IBizAsiento): Boolean;
begin
Result := False;
if not Assigned(AAsiento) then
raise Exception.Create ('Factura no asignada');
if ValidarAsiento(AAsiento) then
begin
ShowHourglassCursor;
// Asegurarnos de que todos los importes están bien.
// RecalcularImportes(AFactura);
try
AAsiento.DataTable.ApplyUpdates;
Result := True;
finally
HideHourglassCursor;

View File

@ -14,12 +14,14 @@ type
procedure VerTodos(ASubCuentas: IBizSubCuenta);
procedure Ver(ASubCuenta: IBizSubCuenta);
procedure Anadir(ASubCuenta : IBizSubCuenta);
function Eliminar(ASubCuenta : IBizSubCuenta): Boolean;
function Eliminar(ASubCuenta : IBizSubCuenta): Boolean;
function Guardar(ASubCuenta : IBizSubCuenta): Boolean;
procedure DescartarCambios(ASubCuenta : IBizSubCuenta);
function Localizar(ASubCuentas: IBizSubCuenta; ADescripcion:String): Boolean;
function DarListaSubCuentas: TStringList;
function ExtraerSeleccionados(ASubCuentas: IBizSubCuenta) : IBizSubCuenta;
function ElegirSubCuenta(ASubCuentas : IBizSubCuenta; AMensaje: String; AMultiSelect: Boolean): IBizSubCuenta;
procedure ElegirCuenta(ASubCuenta: IBizSubCuenta);
end;
@ -32,7 +34,7 @@ type
function ValidarSubCuenta(ASubCuenta: IBizSubCuenta): Boolean;
procedure AsignarDataModule;
procedure FiltrarSubCuenta(ASubCuenta: IBizSubCuenta);
procedure FiltrarEjercicio(ASubCuenta: IBizSubCuenta);
public
constructor Create; override;
@ -49,14 +51,17 @@ type
function Localizar(ASubCuentas: IBizSubCuenta; ADescripcion:String): Boolean;
function DarListaSubCuentas: TStringList;
procedure ElegirCuenta(ASubCuenta: IBizSubCuenta);
function ExtraerSeleccionados(ASubCuentas: IBizSubCuenta) : IBizSubCuenta;
function ElegirSubCuenta(ASubCuentas : IBizSubCuenta; AMensaje: String; AMultiSelect: Boolean): IBizSubCuenta;
procedure ElegirCuenta(ASubCuenta: IBizSubCuenta);
end;
implementation
uses
cxControls, DB, uEditorRegistryUtils, schContabilidadClient_Intf,
uIEditorSubCuentas, uIEditorSubCuenta, uDataModuleContabilidad,
uIEditorSubCuentas, uIEditorSubCuenta, uIEditorElegirSubCuentas, uDataModuleContabilidad,
uBizCuentas, uCuentasController,
uDAInterfaces, uDataTableUtils, uDialogUtils, uFactuGES_App,
uDateUtils, uROTypes, DateUtils, Controls, Windows;
@ -100,7 +105,7 @@ end;
function TSubCuentasController.BuscarTodos: IBizSubCuenta;
begin
Result := FDataModule.GetSubCuentaItems;
FiltrarSubCuenta(Result);
FiltrarEjercicio(Result);
end;
constructor TSubCuentasController.Create;
@ -245,6 +250,28 @@ begin
end;
end;
function TSubCuentasController.ElegirSubCuenta(ASubCuentas: IBizSubCuenta; AMensaje: String; AMultiSelect: Boolean): IBizSubCuenta;
var
AEditor : IEditorElegirSubCuentas;
begin
Result := NIL;
CreateEditor('EditorElegirSubCuentas', IEditorElegirSubCuentas, AEditor);
try
with AEditor do
begin
SubCuentas := ASubCuentas;
Controller := Self;
Mensaje := AMensaje;
if IsPositiveResult(ShowModal) then
Result := SubCuentasSeleccionados;
Release;
end;
finally
AEditor := NIL;
end;
end;
function TSubCuentasController.Eliminar(ASubCuenta: IBizSubCuenta): Boolean;
begin
Result := False;
@ -266,7 +293,16 @@ begin
end;
end;
procedure TSubCuentasController.FiltrarSubCuenta(ASubCuenta: IBizSubCuenta);
function TSubCuentasController.ExtraerSeleccionados(ASubCuentas: IBizSubCuenta): IBizSubCuenta;
var
ASeleccionados : IBizSubCuenta;
begin
ASeleccionados := Self.Buscar(ID_NULO);
CopyDataTableDA3(ASubCuentas.DataTable, ASeleccionados.DataTable, True);
Result := ASeleccionados;
end;
procedure TSubCuentasController.FiltrarEjercicio(ASubCuenta: IBizSubCuenta);
var
Condicion: TDAWhereExpression;
begin
@ -276,7 +312,7 @@ begin
// Filtrar los SubCuentas actuales por SubCuenta activo
with ASubCuenta.DataTable.DynamicWhere do
begin
// (ID_SubCuenta = ID)
// (ID_Ejercicio = ID)
Condicion := NewBinaryExpression(NewField('', fld_SubCuentasID_Ejercicio), NewConstant(AppFactuGES.EjercicioActivo.ID, datInteger), dboEqual);
if IsEmpty then

View File

@ -210,45 +210,6 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
Left = 232
Top = 176
end
object tbl_Asientos: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_CONT_ASIENTOS_ID'
Required = True
DictionaryEntry = 'Asientos_ID'
InPrimaryKey = True
end
item
Name = 'FECHA_ASIENTO'
DataType = datDateTime
DisplayLabel = 'Asientos_FECHA_ASIENTO'
DictionaryEntry = 'Asientos_FECHA_ASIENTO'
end
item
Name = 'ORDEN'
DataType = datInteger
DisplayLabel = 'Asientos_ORDEN'
DictionaryEntry = 'Asientos_ORDEN'
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Contabilidad
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Asientos'
IndexDefs = <>
Left = 400
Top = 376
end
object ds_Asientos: TDADataSource
DataSet = tbl_Asientos.Dataset
DataTable = tbl_Asientos
Left = 400
Top = 320
end
object tbl_Cuentas: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
@ -257,7 +218,6 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
DataType = datAutoInc
GeneratorName = 'GEN_CONT_CUENTAS_ID'
Required = True
ServerAutoRefresh = True
DictionaryEntry = 'Cuentas_ID'
InPrimaryKey = True
end
@ -431,43 +391,6 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
DisplayLabel = 'Apuntes_ID_ASIENTO'
DictionaryEntry = 'Apuntes_ID_ASIENTO'
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 255
DisplayLabel = 'Apuntes_CONCEPTO'
DictionaryEntry = 'Apuntes_CONCEPTO'
end
item
Name = 'PUNTEADO'
DataType = datSmallInt
DisplayLabel = 'Apuntes_PUNTEADO'
DictionaryEntry = 'Apuntes_PUNTEADO'
end
item
Name = 'DEBE'
DataType = datCurrency
DisplayLabel = 'Apuntes_DEBE'
DictionaryEntry = 'Apuntes_DEBE'
end
item
Name = 'HABER'
DataType = datCurrency
DisplayLabel = 'Apuntes_HABER'
DictionaryEntry = 'Apuntes_HABER'
end
item
Name = 'ID_FACTURA'
DataType = datInteger
DisplayLabel = 'Apuntes_ID_FACTURA'
DictionaryEntry = 'Apuntes_ID_FACTURA'
end
item
Name = 'ID_RECIBO'
DataType = datInteger
DisplayLabel = 'Apuntes_ID_RECIBO'
DictionaryEntry = 'Apuntes_ID_RECIBO'
end
item
Name = 'ID_SUBCUENTA'
DataType = datInteger
@ -487,6 +410,36 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
Size = 255
DisplayLabel = 'Apuntes_SUBCUENTA'
DictionaryEntry = 'Apuntes_SUBCUENTA'
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 255
DisplayLabel = 'Apuntes_CONCEPTO'
DictionaryEntry = 'Apuntes_CONCEPTO'
end
item
Name = 'DOCUMENTO'
DataType = datString
Size = 255
end
item
Name = 'DEBE'
DataType = datCurrency
DisplayLabel = 'Apuntes_DEBE'
DictionaryEntry = 'Apuntes_DEBE'
end
item
Name = 'HABER'
DataType = datCurrency
DisplayLabel = 'Apuntes_HABER'
DictionaryEntry = 'Apuntes_HABER'
end
item
Name = 'PUNTEADO'
DataType = datSmallInt
DisplayLabel = 'Apuntes_PUNTEADO'
DictionaryEntry = 'Apuntes_PUNTEADO'
end>
Params = <>
MasterMappingMode = mmWhere
@ -499,14 +452,53 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Apuntes'
IndexDefs = <>
Left = 320
Top = 376
Left = 384
Top = 360
end
object ds_Apuntes: TDADataSource
DataSet = tbl_Apuntes.Dataset
DataTable = tbl_Apuntes
Left = 320
Top = 320
Left = 392
Top = 304
end
object tbl_Asientos: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_CONT_ASIENTOS_ID'
Required = True
DictionaryEntry = 'Asientos_ID'
InPrimaryKey = True
end
item
Name = 'FECHA_ASIENTO'
DataType = datDateTime
DisplayLabel = 'Asientos_FECHA_ASIENTO'
DictionaryEntry = 'Asientos_FECHA_ASIENTO'
end
item
Name = 'ORDEN'
DataType = datInteger
DisplayLabel = 'Asientos_ORDEN'
DictionaryEntry = 'Asientos_ORDEN'
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Contabilidad
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Asientos'
IndexDefs = <>
Left = 232
Top = 352
end
object ds_Asientos: TDADataSource
DataSet = tbl_Asientos.Dataset
DataTable = tbl_Asientos
Left = 232
Top = 304
end
object tbl_Diario: TDAMemDataTable
RemoteUpdatesOptions = []
@ -533,15 +525,24 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
DataType = datInteger
end
item
Name = 'SUBCUENTA'
Name = 'REF_SUBCUENTA'
DataType = datString
Size = 15
end
item
Name = 'ID_EJERCICIO'
DataType = datInteger
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 255
end
item
Name = 'DOCUMENTO'
DataType = datString
Size = 255
end
item
Name = 'DEBE'
DataType = datCurrency
@ -561,13 +562,13 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Diario'
IndexDefs = <>
Left = 248
Top = 376
Left = 80
Top = 360
end
object ds_Diario: TDADataSource
DataSet = tbl_Diario.Dataset
DataTable = tbl_Diario
Left = 248
Top = 320
Left = 80
Top = 312
end
end

View File

@ -9,8 +9,8 @@ uses
uBizBalances, uBizCuentasEspeciales, uBizEpigrafes, uDARemoteDataAdapter,
uDADataStreamer, uDAInterfaces, uRODynamicRequest, uBizCuentas, uBizSubCuentas,
uBizAsientos, uDABin2DataStreamer, uDAMemDataTable, uIDataModuleContabilidad,
uDataModuleBase;
uDataModuleBase, uBizApuntes, uBizDiario;
type
TDataModuleContabilidad = class(TDataModuleBase, IDataModuleContabilidad)
RORemoteService: TRORemoteService;
@ -22,22 +22,27 @@ type
ds_CuentasEspeciales: TDADataSource;
tbl_Epigrafes: TDAMemDataTable;
ds_Epigrafes: TDADataSource;
tbl_Asientos: TDAMemDataTable;
ds_Asientos: TDADataSource;
tbl_Cuentas: TDAMemDataTable;
ds_Cuentas: TDADataSource;
tbl_SubCuentas: TDAMemDataTable;
ds_SubCuentas: TDADataSource;
tbl_Apuntes: TDAMemDataTable;
ds_Apuntes: TDADataSource;
tbl_Asientos: TDAMemDataTable;
ds_Asientos: TDADataSource;
tbl_Diario: TDAMemDataTable;
ds_Diario: TDADataSource;
procedure DAClientDataModuleCreate(Sender: TObject);
private
function _GetApuntes : IBizApunte;
public
function GetEpigrafeItems: IBizEpigrafe;
function GetCuentaItems: IBizCuenta;
function GetSubCuentaItems: IBizSubCuenta;
function GetAsientoItems: IBizAsiento;
function GetDiarioItems: IBizDiario;
function GetAsientoItem(const ID : Integer): IBizAsiento;
function GetCuentaEspecialItems: IBizCuentaEspecial;
function GetBalanceItems: IBizBalance;
end;
@ -58,15 +63,49 @@ begin
RORemoteService.Message := dmConexion.Message;
end;
function TDataModuleContabilidad.GetAsientoItems: IBizAsiento;
function TDataModuleContabilidad.GetAsientoItem(const ID: Integer): IBizAsiento;
var
AAsiento : TDAMemDataTable;
Condicion: TDAWhereExpression;
begin
ShowHourglassCursor;
try
AAsiento := CloneDataTable(tbl_Asientos);
AAsiento.BusinessRulesID := BIZ_CLIENT_ASIENTO;
with TBizAsiento(AAsiento.BusinessEventsObj) do
begin
Apuntes := _GetApuntes;
end;
//Filtramos por el ID del asiento
with AAsiento.DynamicWhere do
begin
// (ID = :ID)
Condicion := NewBinaryExpression(NewField('', fld_AsientosID), NewConstant(ID, datInteger), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
Result := (AAsiento as IBizAsiento);
finally
HideHourglassCursor;
end;
end;
function TDataModuleContabilidad.GetDiarioItems: IBizDiario;
var
ADiario : TDAMemDataTable;
begin
ShowHourglassCursor;
try
ADiario := CloneDataTable(tbl_Diario);
ADiario.BusinessRulesID := BIZ_CLIENT_ASIENTO;
Result := (ADiario as IBizAsiento);
ADiario.BusinessRulesID := BIZ_CLIENT_DIARIO;
Result := (ADiario as IBizDiario);
finally
HideHourglassCursor;
end;
@ -142,4 +181,22 @@ begin
end;
end;
function TDataModuleContabilidad._GetApuntes: IBizApunte;
var
AApuntes : TDAMemDataTable;
begin
ShowHourglassCursor;
try
AApuntes := CloneDataTable(tbl_Apuntes);
with AApuntes do
begin
BusinessRulesID := BIZ_CLIENT_APUNTE;
DetailOptions := DetailOptions - [dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates];
end;
Result := (AApuntes as IBizApunte);
finally
HideHourglassCursor;
end;
end;
end.

View File

@ -45,6 +45,8 @@ contains
uIDataModuleContabilidad in 'Data\uIDataModuleContabilidad.pas',
uBizCuentas in 'uBizCuentas.pas',
uBizSubCuentas in 'uBizSubCuentas.pas',
uBizAsientos in 'uBizAsientos.pas';
uBizAsientos in 'uBizAsientos.pas',
uBizApuntes in 'uBizApuntes.pas',
uBizDiario in 'uBizDiario.pas';
end.

View File

@ -58,10 +58,12 @@
<DCCReference Include="RemObjects_Core_D11.dcp" />
<DCCReference Include="rtl.dcp" />
<DCCReference Include="schContabilidadClient_Intf.pas" />
<DCCReference Include="uBizApuntes.pas" />
<DCCReference Include="uBizAsientos.pas" />
<DCCReference Include="uBizBalances.pas" />
<DCCReference Include="uBizCuentas.pas" />
<DCCReference Include="uBizCuentasEspeciales.pas" />
<DCCReference Include="uBizDiario.pas" />
<DCCReference Include="uBizEpigrafes.pas" />
<DCCReference Include="uBizSubCuentas.pas" />
<DCCReference Include="vcl.dcp" />

View File

@ -1,54 +0,0 @@
unit uBizEpigrafes;
interface
uses
uDAInterfaces, uDADataTable, schContabilidadClient_Intf;
const
BIZ_CLIENT_Epigrafe = 'Client.Epigrafe';
type
IBizEpigrafe = interface(IEpigrafes)
['{F79E3238-1E0D-4FB6-9AF7-E5703619B067}']
function EsNuevo : Boolean;
end;
TBizEpigrafe = class(TEpigrafesDataTableRules, IBizEpigrafe)
protected
procedure OnNewRecord(Sender: TDADataTable); override;
public
procedure IniciarValoresEpigrafeNueva;
function EsNuevo : Boolean;
end;
implementation
{ TBizEpigrafe }
uses
SysUtils, uDataTableUtils, uFactuGES_App;
function TBizEpigrafe.EsNuevo: Boolean;
begin
Result := (ID < 0);
end;
procedure TBizEpigrafe.IniciarValoresEpigrafeNueva;
begin
ID_EJERCICIO := 5//AppFactuGES.EmpresaActiva.EjercicioActivo.ID;
end;
procedure TBizEpigrafe.OnNewRecord(Sender: TDADataTable);
begin
inherited;
IniciarValoresEpigrafeNueva;
end;
initialization
RegisterDataTableRules(BIZ_CLIENT_Epigrafe, TBizEpigrafe);
finalization
end.

View File

@ -4,7 +4,7 @@ interface
uses
uBizEpigrafes, uBizCuentasEspeciales, uBizBalances, uBizCuentas, uBizSubCuentas,
uBizAsientos;
uBizAsientos, uBizDiario;
type
IDataModuleContabilidad = interface(IInterface)
@ -14,7 +14,8 @@ type
function GetBalanceItems: IBizBalance;
function GetCuentaItems: IBizCuenta;
function GetSubCuentaItems: IBizSubCuenta;
function GetAsientoItems: IBizAsiento;
function GetDiarioItems: IBizDiario;
function GetAsientoItem(const ID : Integer): IBizAsiento;
end;
implementation

View File

@ -9,14 +9,14 @@ const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_Diario = '{3409D6DE-0E2C-4FE2-B650-45E00DF80EE5}';
RID_Apuntes = '{C70C8870-6678-4D06-9E9D-6EB0266F986E}';
RID_Asientos = '{E8092AA1-28BD-4DB3-8228-916A3085115E}';
RID_SubCuentas = '{226486A6-603F-42C0-98E4-7FE35246D8F8}';
RID_Cuentas = '{4590BD03-35E1-45C8-97DC-C29DE96B7E81}';
RID_CuentasEspeciales = '{56AE80C0-694D-4313-A9C1-72FA790AB723}';
RID_Epigrafes = '{4AB2F189-B670-4382-9DA3-BF5C129C5D0F}';
RID_Balances = '{243FD877-5DEA-442B-8453-7E0E299D4A56}';
RID_Diario = '{F8FC5CA9-331F-486F-9871-319995DD3249}';
RID_Apuntes = '{F251002F-B2D8-409E-8F3A-937C3E8A3EAF}';
RID_Asientos = '{ABF74F2C-466F-40A2-A0FC-989AF68E4FDF}';
RID_SubCuentas = '{5A8B5FF1-8059-4AA1-B05B-10E7E8BA7781}';
RID_Cuentas = '{78FCB4FD-3C1A-4ED5-95E7-340A16B22AF3}';
RID_CuentasEspeciales = '{0A4B13A1-A9E9-4B7C-8371-5333AA285B9D}';
RID_Epigrafes = '{F928AEAF-1435-4B5E-9712-CC542FD2C7E0}';
RID_Balances = '{AAB37106-495B-4CD3-BD03-B16FC0857A9D}';
{ Data table names }
nme_Diario = 'Diario';
@ -34,8 +34,10 @@ const
fld_DiarioORDEN_ASIENTO = 'ORDEN_ASIENTO';
fld_DiarioFECHA_ASIENTO = 'FECHA_ASIENTO';
fld_DiarioID_SUBCUENTA = 'ID_SUBCUENTA';
fld_DiarioSUBCUENTA = 'SUBCUENTA';
fld_DiarioREF_SUBCUENTA = 'REF_SUBCUENTA';
fld_DiarioID_EJERCICIO = 'ID_EJERCICIO';
fld_DiarioCONCEPTO = 'CONCEPTO';
fld_DiarioDOCUMENTO = 'DOCUMENTO';
fld_DiarioDEBE = 'DEBE';
fld_DiarioHABER = 'HABER';
fld_DiarioPUNTEADO = 'PUNTEADO';
@ -46,37 +48,37 @@ const
idx_DiarioORDEN_ASIENTO = 2;
idx_DiarioFECHA_ASIENTO = 3;
idx_DiarioID_SUBCUENTA = 4;
idx_DiarioSUBCUENTA = 5;
idx_DiarioCONCEPTO = 6;
idx_DiarioDEBE = 7;
idx_DiarioHABER = 8;
idx_DiarioPUNTEADO = 9;
idx_DiarioREF_SUBCUENTA = 5;
idx_DiarioID_EJERCICIO = 6;
idx_DiarioCONCEPTO = 7;
idx_DiarioDOCUMENTO = 8;
idx_DiarioDEBE = 9;
idx_DiarioHABER = 10;
idx_DiarioPUNTEADO = 11;
{ Apuntes fields }
fld_ApuntesID = 'ID';
fld_ApuntesID_ASIENTO = 'ID_ASIENTO';
fld_ApuntesCONCEPTO = 'CONCEPTO';
fld_ApuntesPUNTEADO = 'PUNTEADO';
fld_ApuntesDEBE = 'DEBE';
fld_ApuntesHABER = 'HABER';
fld_ApuntesID_FACTURA = 'ID_FACTURA';
fld_ApuntesID_RECIBO = 'ID_RECIBO';
fld_ApuntesID_SUBCUENTA = 'ID_SUBCUENTA';
fld_ApuntesREF_SUBCUENTA = 'REF_SUBCUENTA';
fld_ApuntesSUBCUENTA = 'SUBCUENTA';
fld_ApuntesCONCEPTO = 'CONCEPTO';
fld_ApuntesDOCUMENTO = 'DOCUMENTO';
fld_ApuntesDEBE = 'DEBE';
fld_ApuntesHABER = 'HABER';
fld_ApuntesPUNTEADO = 'PUNTEADO';
{ Apuntes field indexes }
idx_ApuntesID = 0;
idx_ApuntesID_ASIENTO = 1;
idx_ApuntesCONCEPTO = 2;
idx_ApuntesPUNTEADO = 3;
idx_ApuntesDEBE = 4;
idx_ApuntesHABER = 5;
idx_ApuntesID_FACTURA = 6;
idx_ApuntesID_RECIBO = 7;
idx_ApuntesID_SUBCUENTA = 8;
idx_ApuntesREF_SUBCUENTA = 9;
idx_ApuntesSUBCUENTA = 10;
idx_ApuntesID_SUBCUENTA = 2;
idx_ApuntesREF_SUBCUENTA = 3;
idx_ApuntesSUBCUENTA = 4;
idx_ApuntesCONCEPTO = 5;
idx_ApuntesDOCUMENTO = 6;
idx_ApuntesDEBE = 7;
idx_ApuntesHABER = 8;
idx_ApuntesPUNTEADO = 9;
{ Asientos fields }
fld_AsientosID = 'ID';
@ -185,7 +187,7 @@ const
type
{ IDiario }
IDiario = interface(IDAStronglyTypedDataTable)
['{E757E9E3-8BCB-446D-A826-EB1B1175DC36}']
['{A0CF9A52-C426-4396-A961-FF7BAD3FB4C0}']
{ Property getters and setters }
function GetID_APUNTEValue: Integer;
procedure SetID_APUNTEValue(const aValue: Integer);
@ -207,14 +209,22 @@ type
procedure SetID_SUBCUENTAValue(const aValue: Integer);
function GetID_SUBCUENTAIsNull: Boolean;
procedure SetID_SUBCUENTAIsNull(const aValue: Boolean);
function GetSUBCUENTAValue: String;
procedure SetSUBCUENTAValue(const aValue: String);
function GetSUBCUENTAIsNull: Boolean;
procedure SetSUBCUENTAIsNull(const aValue: Boolean);
function GetREF_SUBCUENTAValue: String;
procedure SetREF_SUBCUENTAValue(const aValue: String);
function GetREF_SUBCUENTAIsNull: Boolean;
procedure SetREF_SUBCUENTAIsNull(const aValue: Boolean);
function GetID_EJERCICIOValue: Integer;
procedure SetID_EJERCICIOValue(const aValue: Integer);
function GetID_EJERCICIOIsNull: Boolean;
procedure SetID_EJERCICIOIsNull(const aValue: Boolean);
function GetCONCEPTOValue: String;
procedure SetCONCEPTOValue(const aValue: String);
function GetCONCEPTOIsNull: Boolean;
procedure SetCONCEPTOIsNull(const aValue: Boolean);
function GetDOCUMENTOValue: String;
procedure SetDOCUMENTOValue(const aValue: String);
function GetDOCUMENTOIsNull: Boolean;
procedure SetDOCUMENTOIsNull(const aValue: Boolean);
function GetDEBEValue: Currency;
procedure SetDEBEValue(const aValue: Currency);
function GetDEBEIsNull: Boolean;
@ -240,10 +250,14 @@ type
property FECHA_ASIENTOIsNull: Boolean read GetFECHA_ASIENTOIsNull write SetFECHA_ASIENTOIsNull;
property ID_SUBCUENTA: Integer read GetID_SUBCUENTAValue write SetID_SUBCUENTAValue;
property ID_SUBCUENTAIsNull: Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
property SUBCUENTA: String read GetSUBCUENTAValue write SetSUBCUENTAValue;
property SUBCUENTAIsNull: Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
property REF_SUBCUENTA: String read GetREF_SUBCUENTAValue write SetREF_SUBCUENTAValue;
property REF_SUBCUENTAIsNull: Boolean read GetREF_SUBCUENTAIsNull write SetREF_SUBCUENTAIsNull;
property ID_EJERCICIO: Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue;
property ID_EJERCICIOIsNull: Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
property CONCEPTO: String read GetCONCEPTOValue write SetCONCEPTOValue;
property CONCEPTOIsNull: Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull;
property DOCUMENTO: String read GetDOCUMENTOValue write SetDOCUMENTOValue;
property DOCUMENTOIsNull: Boolean read GetDOCUMENTOIsNull write SetDOCUMENTOIsNull;
property DEBE: Currency read GetDEBEValue write SetDEBEValue;
property DEBEIsNull: Boolean read GetDEBEIsNull write SetDEBEIsNull;
property HABER: Currency read GetHABERValue write SetHABERValue;
@ -277,14 +291,22 @@ type
procedure SetID_SUBCUENTAValue(const aValue: Integer); virtual;
function GetID_SUBCUENTAIsNull: Boolean; virtual;
procedure SetID_SUBCUENTAIsNull(const aValue: Boolean); virtual;
function GetSUBCUENTAValue: String; virtual;
procedure SetSUBCUENTAValue(const aValue: String); virtual;
function GetSUBCUENTAIsNull: Boolean; virtual;
procedure SetSUBCUENTAIsNull(const aValue: Boolean); virtual;
function GetREF_SUBCUENTAValue: String; virtual;
procedure SetREF_SUBCUENTAValue(const aValue: String); virtual;
function GetREF_SUBCUENTAIsNull: Boolean; virtual;
procedure SetREF_SUBCUENTAIsNull(const aValue: Boolean); virtual;
function GetID_EJERCICIOValue: Integer; virtual;
procedure SetID_EJERCICIOValue(const aValue: Integer); virtual;
function GetID_EJERCICIOIsNull: Boolean; virtual;
procedure SetID_EJERCICIOIsNull(const aValue: Boolean); virtual;
function GetCONCEPTOValue: String; virtual;
procedure SetCONCEPTOValue(const aValue: String); virtual;
function GetCONCEPTOIsNull: Boolean; virtual;
procedure SetCONCEPTOIsNull(const aValue: Boolean); virtual;
function GetDOCUMENTOValue: String; virtual;
procedure SetDOCUMENTOValue(const aValue: String); virtual;
function GetDOCUMENTOIsNull: Boolean; virtual;
procedure SetDOCUMENTOIsNull(const aValue: Boolean); virtual;
function GetDEBEValue: Currency; virtual;
procedure SetDEBEValue(const aValue: Currency); virtual;
function GetDEBEIsNull: Boolean; virtual;
@ -309,10 +331,14 @@ type
property FECHA_ASIENTOIsNull: Boolean read GetFECHA_ASIENTOIsNull write SetFECHA_ASIENTOIsNull;
property ID_SUBCUENTA: Integer read GetID_SUBCUENTAValue write SetID_SUBCUENTAValue;
property ID_SUBCUENTAIsNull: Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
property SUBCUENTA: String read GetSUBCUENTAValue write SetSUBCUENTAValue;
property SUBCUENTAIsNull: Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
property REF_SUBCUENTA: String read GetREF_SUBCUENTAValue write SetREF_SUBCUENTAValue;
property REF_SUBCUENTAIsNull: Boolean read GetREF_SUBCUENTAIsNull write SetREF_SUBCUENTAIsNull;
property ID_EJERCICIO: Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue;
property ID_EJERCICIOIsNull: Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
property CONCEPTO: String read GetCONCEPTOValue write SetCONCEPTOValue;
property CONCEPTOIsNull: Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull;
property DOCUMENTO: String read GetDOCUMENTOValue write SetDOCUMENTOValue;
property DOCUMENTOIsNull: Boolean read GetDOCUMENTOIsNull write SetDOCUMENTOIsNull;
property DEBE: Currency read GetDEBEValue write SetDEBEValue;
property DEBEIsNull: Boolean read GetDEBEIsNull write SetDEBEIsNull;
property HABER: Currency read GetHABERValue write SetHABERValue;
@ -328,7 +354,7 @@ type
{ IApuntes }
IApuntes = interface(IDAStronglyTypedDataTable)
['{CF29AC79-C564-4DDC-8CA6-2EE5FA7D14BE}']
['{51E8C72F-072E-4C62-B2C3-50FA1FA437A6}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -338,30 +364,6 @@ type
procedure SetID_ASIENTOValue(const aValue: Integer);
function GetID_ASIENTOIsNull: Boolean;
procedure SetID_ASIENTOIsNull(const aValue: Boolean);
function GetCONCEPTOValue: String;
procedure SetCONCEPTOValue(const aValue: String);
function GetCONCEPTOIsNull: Boolean;
procedure SetCONCEPTOIsNull(const aValue: Boolean);
function GetPUNTEADOValue: SmallInt;
procedure SetPUNTEADOValue(const aValue: SmallInt);
function GetPUNTEADOIsNull: Boolean;
procedure SetPUNTEADOIsNull(const aValue: Boolean);
function GetDEBEValue: Currency;
procedure SetDEBEValue(const aValue: Currency);
function GetDEBEIsNull: Boolean;
procedure SetDEBEIsNull(const aValue: Boolean);
function GetHABERValue: Currency;
procedure SetHABERValue(const aValue: Currency);
function GetHABERIsNull: Boolean;
procedure SetHABERIsNull(const aValue: Boolean);
function GetID_FACTURAValue: Integer;
procedure SetID_FACTURAValue(const aValue: Integer);
function GetID_FACTURAIsNull: Boolean;
procedure SetID_FACTURAIsNull(const aValue: Boolean);
function GetID_RECIBOValue: Integer;
procedure SetID_RECIBOValue(const aValue: Integer);
function GetID_RECIBOIsNull: Boolean;
procedure SetID_RECIBOIsNull(const aValue: Boolean);
function GetID_SUBCUENTAValue: Integer;
procedure SetID_SUBCUENTAValue(const aValue: Integer);
function GetID_SUBCUENTAIsNull: Boolean;
@ -374,6 +376,26 @@ type
procedure SetSUBCUENTAValue(const aValue: String);
function GetSUBCUENTAIsNull: Boolean;
procedure SetSUBCUENTAIsNull(const aValue: Boolean);
function GetCONCEPTOValue: String;
procedure SetCONCEPTOValue(const aValue: String);
function GetCONCEPTOIsNull: Boolean;
procedure SetCONCEPTOIsNull(const aValue: Boolean);
function GetDOCUMENTOValue: String;
procedure SetDOCUMENTOValue(const aValue: String);
function GetDOCUMENTOIsNull: Boolean;
procedure SetDOCUMENTOIsNull(const aValue: Boolean);
function GetDEBEValue: Currency;
procedure SetDEBEValue(const aValue: Currency);
function GetDEBEIsNull: Boolean;
procedure SetDEBEIsNull(const aValue: Boolean);
function GetHABERValue: Currency;
procedure SetHABERValue(const aValue: Currency);
function GetHABERIsNull: Boolean;
procedure SetHABERIsNull(const aValue: Boolean);
function GetPUNTEADOValue: SmallInt;
procedure SetPUNTEADOValue(const aValue: SmallInt);
function GetPUNTEADOIsNull: Boolean;
procedure SetPUNTEADOIsNull(const aValue: Boolean);
{ Properties }
@ -381,24 +403,22 @@ type
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property ID_ASIENTO: Integer read GetID_ASIENTOValue write SetID_ASIENTOValue;
property ID_ASIENTOIsNull: Boolean read GetID_ASIENTOIsNull write SetID_ASIENTOIsNull;
property CONCEPTO: String read GetCONCEPTOValue write SetCONCEPTOValue;
property CONCEPTOIsNull: Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull;
property PUNTEADO: SmallInt read GetPUNTEADOValue write SetPUNTEADOValue;
property PUNTEADOIsNull: Boolean read GetPUNTEADOIsNull write SetPUNTEADOIsNull;
property DEBE: Currency read GetDEBEValue write SetDEBEValue;
property DEBEIsNull: Boolean read GetDEBEIsNull write SetDEBEIsNull;
property HABER: Currency read GetHABERValue write SetHABERValue;
property HABERIsNull: Boolean read GetHABERIsNull write SetHABERIsNull;
property ID_FACTURA: Integer read GetID_FACTURAValue write SetID_FACTURAValue;
property ID_FACTURAIsNull: Boolean read GetID_FACTURAIsNull write SetID_FACTURAIsNull;
property ID_RECIBO: Integer read GetID_RECIBOValue write SetID_RECIBOValue;
property ID_RECIBOIsNull: Boolean read GetID_RECIBOIsNull write SetID_RECIBOIsNull;
property ID_SUBCUENTA: Integer read GetID_SUBCUENTAValue write SetID_SUBCUENTAValue;
property ID_SUBCUENTAIsNull: Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
property REF_SUBCUENTA: String read GetREF_SUBCUENTAValue write SetREF_SUBCUENTAValue;
property REF_SUBCUENTAIsNull: Boolean read GetREF_SUBCUENTAIsNull write SetREF_SUBCUENTAIsNull;
property SUBCUENTA: String read GetSUBCUENTAValue write SetSUBCUENTAValue;
property SUBCUENTAIsNull: Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
property CONCEPTO: String read GetCONCEPTOValue write SetCONCEPTOValue;
property CONCEPTOIsNull: Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull;
property DOCUMENTO: String read GetDOCUMENTOValue write SetDOCUMENTOValue;
property DOCUMENTOIsNull: Boolean read GetDOCUMENTOIsNull write SetDOCUMENTOIsNull;
property DEBE: Currency read GetDEBEValue write SetDEBEValue;
property DEBEIsNull: Boolean read GetDEBEIsNull write SetDEBEIsNull;
property HABER: Currency read GetHABERValue write SetHABERValue;
property HABERIsNull: Boolean read GetHABERIsNull write SetHABERIsNull;
property PUNTEADO: SmallInt read GetPUNTEADOValue write SetPUNTEADOValue;
property PUNTEADOIsNull: Boolean read GetPUNTEADOIsNull write SetPUNTEADOIsNull;
end;
{ TApuntesDataTableRules }
@ -414,30 +434,6 @@ type
procedure SetID_ASIENTOValue(const aValue: Integer); virtual;
function GetID_ASIENTOIsNull: Boolean; virtual;
procedure SetID_ASIENTOIsNull(const aValue: Boolean); virtual;
function GetCONCEPTOValue: String; virtual;
procedure SetCONCEPTOValue(const aValue: String); virtual;
function GetCONCEPTOIsNull: Boolean; virtual;
procedure SetCONCEPTOIsNull(const aValue: Boolean); virtual;
function GetPUNTEADOValue: SmallInt; virtual;
procedure SetPUNTEADOValue(const aValue: SmallInt); virtual;
function GetPUNTEADOIsNull: Boolean; virtual;
procedure SetPUNTEADOIsNull(const aValue: Boolean); virtual;
function GetDEBEValue: Currency; virtual;
procedure SetDEBEValue(const aValue: Currency); virtual;
function GetDEBEIsNull: Boolean; virtual;
procedure SetDEBEIsNull(const aValue: Boolean); virtual;
function GetHABERValue: Currency; virtual;
procedure SetHABERValue(const aValue: Currency); virtual;
function GetHABERIsNull: Boolean; virtual;
procedure SetHABERIsNull(const aValue: Boolean); virtual;
function GetID_FACTURAValue: Integer; virtual;
procedure SetID_FACTURAValue(const aValue: Integer); virtual;
function GetID_FACTURAIsNull: Boolean; virtual;
procedure SetID_FACTURAIsNull(const aValue: Boolean); virtual;
function GetID_RECIBOValue: Integer; virtual;
procedure SetID_RECIBOValue(const aValue: Integer); virtual;
function GetID_RECIBOIsNull: Boolean; virtual;
procedure SetID_RECIBOIsNull(const aValue: Boolean); virtual;
function GetID_SUBCUENTAValue: Integer; virtual;
procedure SetID_SUBCUENTAValue(const aValue: Integer); virtual;
function GetID_SUBCUENTAIsNull: Boolean; virtual;
@ -450,30 +446,48 @@ type
procedure SetSUBCUENTAValue(const aValue: String); virtual;
function GetSUBCUENTAIsNull: Boolean; virtual;
procedure SetSUBCUENTAIsNull(const aValue: Boolean); virtual;
function GetCONCEPTOValue: String; virtual;
procedure SetCONCEPTOValue(const aValue: String); virtual;
function GetCONCEPTOIsNull: Boolean; virtual;
procedure SetCONCEPTOIsNull(const aValue: Boolean); virtual;
function GetDOCUMENTOValue: String; virtual;
procedure SetDOCUMENTOValue(const aValue: String); virtual;
function GetDOCUMENTOIsNull: Boolean; virtual;
procedure SetDOCUMENTOIsNull(const aValue: Boolean); virtual;
function GetDEBEValue: Currency; virtual;
procedure SetDEBEValue(const aValue: Currency); virtual;
function GetDEBEIsNull: Boolean; virtual;
procedure SetDEBEIsNull(const aValue: Boolean); virtual;
function GetHABERValue: Currency; virtual;
procedure SetHABERValue(const aValue: Currency); virtual;
function GetHABERIsNull: Boolean; virtual;
procedure SetHABERIsNull(const aValue: Boolean); virtual;
function GetPUNTEADOValue: SmallInt; virtual;
procedure SetPUNTEADOValue(const aValue: SmallInt); virtual;
function GetPUNTEADOIsNull: Boolean; virtual;
procedure SetPUNTEADOIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property ID_ASIENTO: Integer read GetID_ASIENTOValue write SetID_ASIENTOValue;
property ID_ASIENTOIsNull: Boolean read GetID_ASIENTOIsNull write SetID_ASIENTOIsNull;
property CONCEPTO: String read GetCONCEPTOValue write SetCONCEPTOValue;
property CONCEPTOIsNull: Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull;
property PUNTEADO: SmallInt read GetPUNTEADOValue write SetPUNTEADOValue;
property PUNTEADOIsNull: Boolean read GetPUNTEADOIsNull write SetPUNTEADOIsNull;
property DEBE: Currency read GetDEBEValue write SetDEBEValue;
property DEBEIsNull: Boolean read GetDEBEIsNull write SetDEBEIsNull;
property HABER: Currency read GetHABERValue write SetHABERValue;
property HABERIsNull: Boolean read GetHABERIsNull write SetHABERIsNull;
property ID_FACTURA: Integer read GetID_FACTURAValue write SetID_FACTURAValue;
property ID_FACTURAIsNull: Boolean read GetID_FACTURAIsNull write SetID_FACTURAIsNull;
property ID_RECIBO: Integer read GetID_RECIBOValue write SetID_RECIBOValue;
property ID_RECIBOIsNull: Boolean read GetID_RECIBOIsNull write SetID_RECIBOIsNull;
property ID_SUBCUENTA: Integer read GetID_SUBCUENTAValue write SetID_SUBCUENTAValue;
property ID_SUBCUENTAIsNull: Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
property REF_SUBCUENTA: String read GetREF_SUBCUENTAValue write SetREF_SUBCUENTAValue;
property REF_SUBCUENTAIsNull: Boolean read GetREF_SUBCUENTAIsNull write SetREF_SUBCUENTAIsNull;
property SUBCUENTA: String read GetSUBCUENTAValue write SetSUBCUENTAValue;
property SUBCUENTAIsNull: Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
property CONCEPTO: String read GetCONCEPTOValue write SetCONCEPTOValue;
property CONCEPTOIsNull: Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull;
property DOCUMENTO: String read GetDOCUMENTOValue write SetDOCUMENTOValue;
property DOCUMENTOIsNull: Boolean read GetDOCUMENTOIsNull write SetDOCUMENTOIsNull;
property DEBE: Currency read GetDEBEValue write SetDEBEValue;
property DEBEIsNull: Boolean read GetDEBEIsNull write SetDEBEIsNull;
property HABER: Currency read GetHABERValue write SetHABERValue;
property HABERIsNull: Boolean read GetHABERIsNull write SetHABERIsNull;
property PUNTEADO: SmallInt read GetPUNTEADOValue write SetPUNTEADOValue;
property PUNTEADOIsNull: Boolean read GetPUNTEADOIsNull write SetPUNTEADOIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@ -483,7 +497,7 @@ type
{ IAsientos }
IAsientos = interface(IDAStronglyTypedDataTable)
['{F3E1D325-C066-4673-BC4A-89E65296F0C5}']
['{60A1BF8D-DDCC-48DC-9088-839CD788AC5B}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -542,7 +556,7 @@ type
{ ISubCuentas }
ISubCuentas = interface(IDAStronglyTypedDataTable)
['{D0FEC922-7886-4A37-B42B-AFB69420945B}']
['{3CE4DD12-1C80-4AFD-BE4B-5892BCA821AC}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -673,7 +687,7 @@ type
{ ICuentas }
ICuentas = interface(IDAStronglyTypedDataTable)
['{EEEB0A52-53FB-45B8-94DD-58CB8627F637}']
['{366FAC37-21A7-4BA3-8428-31AD7845301B}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -816,7 +830,7 @@ type
{ ICuentasEspeciales }
ICuentasEspeciales = interface(IDAStronglyTypedDataTable)
['{2E1CFF1A-E93A-478C-91AA-35905D38E54D}']
['{1E7CF1B8-76C6-4F5A-A504-C3D03AA97A72}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -875,7 +889,7 @@ type
{ IEpigrafes }
IEpigrafes = interface(IDAStronglyTypedDataTable)
['{580D7CFA-4B47-4B42-AB87-3CA51E617AE7}']
['{90A498D5-44D9-4F8D-AB9A-E3EE0F3C64BC}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -970,7 +984,7 @@ type
{ IBalances }
IBalances = interface(IDAStronglyTypedDataTable)
['{2BC59ABB-E93C-4C3C-BEB2-832904CCF81D}']
['{896BE912-E8F7-4F68-AE2C-7A8E3ACFC8CB}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -1219,25 +1233,46 @@ begin
DataTable.Fields[idx_DiarioID_SUBCUENTA].AsVariant := Null;
end;
function TDiarioDataTableRules.GetSUBCUENTAValue: String;
function TDiarioDataTableRules.GetREF_SUBCUENTAValue: String;
begin
result := DataTable.Fields[idx_DiarioSUBCUENTA].AsString;
result := DataTable.Fields[idx_DiarioREF_SUBCUENTA].AsString;
end;
procedure TDiarioDataTableRules.SetSUBCUENTAValue(const aValue: String);
procedure TDiarioDataTableRules.SetREF_SUBCUENTAValue(const aValue: String);
begin
DataTable.Fields[idx_DiarioSUBCUENTA].AsString := aValue;
DataTable.Fields[idx_DiarioREF_SUBCUENTA].AsString := aValue;
end;
function TDiarioDataTableRules.GetSUBCUENTAIsNull: boolean;
function TDiarioDataTableRules.GetREF_SUBCUENTAIsNull: boolean;
begin
result := DataTable.Fields[idx_DiarioSUBCUENTA].IsNull;
result := DataTable.Fields[idx_DiarioREF_SUBCUENTA].IsNull;
end;
procedure TDiarioDataTableRules.SetSUBCUENTAIsNull(const aValue: Boolean);
procedure TDiarioDataTableRules.SetREF_SUBCUENTAIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_DiarioSUBCUENTA].AsVariant := Null;
DataTable.Fields[idx_DiarioREF_SUBCUENTA].AsVariant := Null;
end;
function TDiarioDataTableRules.GetID_EJERCICIOValue: Integer;
begin
result := DataTable.Fields[idx_DiarioID_EJERCICIO].AsInteger;
end;
procedure TDiarioDataTableRules.SetID_EJERCICIOValue(const aValue: Integer);
begin
DataTable.Fields[idx_DiarioID_EJERCICIO].AsInteger := aValue;
end;
function TDiarioDataTableRules.GetID_EJERCICIOIsNull: boolean;
begin
result := DataTable.Fields[idx_DiarioID_EJERCICIO].IsNull;
end;
procedure TDiarioDataTableRules.SetID_EJERCICIOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_DiarioID_EJERCICIO].AsVariant := Null;
end;
function TDiarioDataTableRules.GetCONCEPTOValue: String;
@ -1261,6 +1296,27 @@ begin
DataTable.Fields[idx_DiarioCONCEPTO].AsVariant := Null;
end;
function TDiarioDataTableRules.GetDOCUMENTOValue: String;
begin
result := DataTable.Fields[idx_DiarioDOCUMENTO].AsString;
end;
procedure TDiarioDataTableRules.SetDOCUMENTOValue(const aValue: String);
begin
DataTable.Fields[idx_DiarioDOCUMENTO].AsString := aValue;
end;
function TDiarioDataTableRules.GetDOCUMENTOIsNull: boolean;
begin
result := DataTable.Fields[idx_DiarioDOCUMENTO].IsNull;
end;
procedure TDiarioDataTableRules.SetDOCUMENTOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_DiarioDOCUMENTO].AsVariant := Null;
end;
function TDiarioDataTableRules.GetDEBEValue: Currency;
begin
result := DataTable.Fields[idx_DiarioDEBE].AsCurrency;
@ -1378,132 +1434,6 @@ begin
DataTable.Fields[idx_ApuntesID_ASIENTO].AsVariant := Null;
end;
function TApuntesDataTableRules.GetCONCEPTOValue: String;
begin
result := DataTable.Fields[idx_ApuntesCONCEPTO].AsString;
end;
procedure TApuntesDataTableRules.SetCONCEPTOValue(const aValue: String);
begin
DataTable.Fields[idx_ApuntesCONCEPTO].AsString := aValue;
end;
function TApuntesDataTableRules.GetCONCEPTOIsNull: boolean;
begin
result := DataTable.Fields[idx_ApuntesCONCEPTO].IsNull;
end;
procedure TApuntesDataTableRules.SetCONCEPTOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ApuntesCONCEPTO].AsVariant := Null;
end;
function TApuntesDataTableRules.GetPUNTEADOValue: SmallInt;
begin
result := DataTable.Fields[idx_ApuntesPUNTEADO].AsSmallInt;
end;
procedure TApuntesDataTableRules.SetPUNTEADOValue(const aValue: SmallInt);
begin
DataTable.Fields[idx_ApuntesPUNTEADO].AsSmallInt := aValue;
end;
function TApuntesDataTableRules.GetPUNTEADOIsNull: boolean;
begin
result := DataTable.Fields[idx_ApuntesPUNTEADO].IsNull;
end;
procedure TApuntesDataTableRules.SetPUNTEADOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ApuntesPUNTEADO].AsVariant := Null;
end;
function TApuntesDataTableRules.GetDEBEValue: Currency;
begin
result := DataTable.Fields[idx_ApuntesDEBE].AsCurrency;
end;
procedure TApuntesDataTableRules.SetDEBEValue(const aValue: Currency);
begin
DataTable.Fields[idx_ApuntesDEBE].AsCurrency := aValue;
end;
function TApuntesDataTableRules.GetDEBEIsNull: boolean;
begin
result := DataTable.Fields[idx_ApuntesDEBE].IsNull;
end;
procedure TApuntesDataTableRules.SetDEBEIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ApuntesDEBE].AsVariant := Null;
end;
function TApuntesDataTableRules.GetHABERValue: Currency;
begin
result := DataTable.Fields[idx_ApuntesHABER].AsCurrency;
end;
procedure TApuntesDataTableRules.SetHABERValue(const aValue: Currency);
begin
DataTable.Fields[idx_ApuntesHABER].AsCurrency := aValue;
end;
function TApuntesDataTableRules.GetHABERIsNull: boolean;
begin
result := DataTable.Fields[idx_ApuntesHABER].IsNull;
end;
procedure TApuntesDataTableRules.SetHABERIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ApuntesHABER].AsVariant := Null;
end;
function TApuntesDataTableRules.GetID_FACTURAValue: Integer;
begin
result := DataTable.Fields[idx_ApuntesID_FACTURA].AsInteger;
end;
procedure TApuntesDataTableRules.SetID_FACTURAValue(const aValue: Integer);
begin
DataTable.Fields[idx_ApuntesID_FACTURA].AsInteger := aValue;
end;
function TApuntesDataTableRules.GetID_FACTURAIsNull: boolean;
begin
result := DataTable.Fields[idx_ApuntesID_FACTURA].IsNull;
end;
procedure TApuntesDataTableRules.SetID_FACTURAIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ApuntesID_FACTURA].AsVariant := Null;
end;
function TApuntesDataTableRules.GetID_RECIBOValue: Integer;
begin
result := DataTable.Fields[idx_ApuntesID_RECIBO].AsInteger;
end;
procedure TApuntesDataTableRules.SetID_RECIBOValue(const aValue: Integer);
begin
DataTable.Fields[idx_ApuntesID_RECIBO].AsInteger := aValue;
end;
function TApuntesDataTableRules.GetID_RECIBOIsNull: boolean;
begin
result := DataTable.Fields[idx_ApuntesID_RECIBO].IsNull;
end;
procedure TApuntesDataTableRules.SetID_RECIBOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ApuntesID_RECIBO].AsVariant := Null;
end;
function TApuntesDataTableRules.GetID_SUBCUENTAValue: Integer;
begin
result := DataTable.Fields[idx_ApuntesID_SUBCUENTA].AsInteger;
@ -1567,6 +1497,111 @@ begin
DataTable.Fields[idx_ApuntesSUBCUENTA].AsVariant := Null;
end;
function TApuntesDataTableRules.GetCONCEPTOValue: String;
begin
result := DataTable.Fields[idx_ApuntesCONCEPTO].AsString;
end;
procedure TApuntesDataTableRules.SetCONCEPTOValue(const aValue: String);
begin
DataTable.Fields[idx_ApuntesCONCEPTO].AsString := aValue;
end;
function TApuntesDataTableRules.GetCONCEPTOIsNull: boolean;
begin
result := DataTable.Fields[idx_ApuntesCONCEPTO].IsNull;
end;
procedure TApuntesDataTableRules.SetCONCEPTOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ApuntesCONCEPTO].AsVariant := Null;
end;
function TApuntesDataTableRules.GetDOCUMENTOValue: String;
begin
result := DataTable.Fields[idx_ApuntesDOCUMENTO].AsString;
end;
procedure TApuntesDataTableRules.SetDOCUMENTOValue(const aValue: String);
begin
DataTable.Fields[idx_ApuntesDOCUMENTO].AsString := aValue;
end;
function TApuntesDataTableRules.GetDOCUMENTOIsNull: boolean;
begin
result := DataTable.Fields[idx_ApuntesDOCUMENTO].IsNull;
end;
procedure TApuntesDataTableRules.SetDOCUMENTOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ApuntesDOCUMENTO].AsVariant := Null;
end;
function TApuntesDataTableRules.GetDEBEValue: Currency;
begin
result := DataTable.Fields[idx_ApuntesDEBE].AsCurrency;
end;
procedure TApuntesDataTableRules.SetDEBEValue(const aValue: Currency);
begin
DataTable.Fields[idx_ApuntesDEBE].AsCurrency := aValue;
end;
function TApuntesDataTableRules.GetDEBEIsNull: boolean;
begin
result := DataTable.Fields[idx_ApuntesDEBE].IsNull;
end;
procedure TApuntesDataTableRules.SetDEBEIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ApuntesDEBE].AsVariant := Null;
end;
function TApuntesDataTableRules.GetHABERValue: Currency;
begin
result := DataTable.Fields[idx_ApuntesHABER].AsCurrency;
end;
procedure TApuntesDataTableRules.SetHABERValue(const aValue: Currency);
begin
DataTable.Fields[idx_ApuntesHABER].AsCurrency := aValue;
end;
function TApuntesDataTableRules.GetHABERIsNull: boolean;
begin
result := DataTable.Fields[idx_ApuntesHABER].IsNull;
end;
procedure TApuntesDataTableRules.SetHABERIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ApuntesHABER].AsVariant := Null;
end;
function TApuntesDataTableRules.GetPUNTEADOValue: SmallInt;
begin
result := DataTable.Fields[idx_ApuntesPUNTEADO].AsSmallInt;
end;
procedure TApuntesDataTableRules.SetPUNTEADOValue(const aValue: SmallInt);
begin
DataTable.Fields[idx_ApuntesPUNTEADO].AsSmallInt := aValue;
end;
function TApuntesDataTableRules.GetPUNTEADOIsNull: boolean;
begin
result := DataTable.Fields[idx_ApuntesPUNTEADO].IsNull;
end;
procedure TApuntesDataTableRules.SetPUNTEADOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ApuntesPUNTEADO].AsVariant := Null;
end;
{ TAsientosDataTableRules }
constructor TAsientosDataTableRules.Create(aDataTable: TDADataTable);

View File

@ -9,27 +9,29 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_DiarioDelta = '{57F639D0-753A-4DD5-8553-4836768A68E8}';
RID_ApuntesDelta = '{74F9A357-E9A3-454C-8D87-86065C5B2C10}';
RID_AsientosDelta = '{291CBAA5-42AB-45D6-A5D0-59D694A8960E}';
RID_SubCuentasDelta = '{0C092B2B-41F6-4F70-B073-F1B68F9FA233}';
RID_CuentasDelta = '{152D2AD4-8B66-49AC-8D07-33C76A60CB85}';
RID_CuentasEspecialesDelta = '{0E63EE73-6CE9-4F33-9DB7-B02B1190DA20}';
RID_EpigrafesDelta = '{2EB3D408-B118-4BC5-AABE-FAC7393086AB}';
RID_BalancesDelta = '{964A4194-0DF5-4CA7-A922-DB219CC96B39}';
RID_DiarioDelta = '{00C7E090-F36E-4A94-924F-81591065C131}';
RID_ApuntesDelta = '{462A727F-D66D-4493-83A3-6CAF34F994D7}';
RID_AsientosDelta = '{3A7F1EB1-7C5B-47BF-8DFA-4C86EFF0686E}';
RID_SubCuentasDelta = '{E88435DC-570C-43D8-A8B0-004C1C775CF0}';
RID_CuentasDelta = '{A26B4CE1-63F7-49F3-8A0A-F2840D95587C}';
RID_CuentasEspecialesDelta = '{089CB669-7830-4908-9344-42AEC93D8320}';
RID_EpigrafesDelta = '{BFE5CD3F-52C2-400A-93A6-ACB723F7390E}';
RID_BalancesDelta = '{543250BB-1C2E-4448-AEA8-EDC23591A2ED}';
type
{ IDiarioDelta }
IDiarioDelta = interface(IDiario)
['{57F639D0-753A-4DD5-8553-4836768A68E8}']
['{00C7E090-F36E-4A94-924F-81591065C131}']
{ Property getters and setters }
function GetOldID_APUNTEValue : Integer;
function GetOldID_ASIENTOValue : Integer;
function GetOldORDEN_ASIENTOValue : Integer;
function GetOldFECHA_ASIENTOValue : DateTime;
function GetOldID_SUBCUENTAValue : Integer;
function GetOldSUBCUENTAValue : String;
function GetOldREF_SUBCUENTAValue : String;
function GetOldID_EJERCICIOValue : Integer;
function GetOldCONCEPTOValue : String;
function GetOldDOCUMENTOValue : String;
function GetOldDEBEValue : Currency;
function GetOldHABERValue : Currency;
function GetOldPUNTEADOValue : SmallInt;
@ -40,8 +42,10 @@ type
property OldORDEN_ASIENTO : Integer read GetOldORDEN_ASIENTOValue;
property OldFECHA_ASIENTO : DateTime read GetOldFECHA_ASIENTOValue;
property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
property OldSUBCUENTA : String read GetOldSUBCUENTAValue;
property OldREF_SUBCUENTA : String read GetOldREF_SUBCUENTAValue;
property OldID_EJERCICIO : Integer read GetOldID_EJERCICIOValue;
property OldCONCEPTO : String read GetOldCONCEPTOValue;
property OldDOCUMENTO : String read GetOldDOCUMENTOValue;
property OldDEBE : Currency read GetOldDEBEValue;
property OldHABER : Currency read GetOldHABERValue;
property OldPUNTEADO : SmallInt read GetOldPUNTEADOValue;
@ -82,18 +86,30 @@ type
function GetOldID_SUBCUENTAIsNull: Boolean; virtual;
procedure SetID_SUBCUENTAValue(const aValue: Integer); virtual;
procedure SetID_SUBCUENTAIsNull(const aValue: Boolean); virtual;
function GetSUBCUENTAValue: String; virtual;
function GetSUBCUENTAIsNull: Boolean; virtual;
function GetOldSUBCUENTAValue: String; virtual;
function GetOldSUBCUENTAIsNull: Boolean; virtual;
procedure SetSUBCUENTAValue(const aValue: String); virtual;
procedure SetSUBCUENTAIsNull(const aValue: Boolean); virtual;
function GetREF_SUBCUENTAValue: String; virtual;
function GetREF_SUBCUENTAIsNull: Boolean; virtual;
function GetOldREF_SUBCUENTAValue: String; virtual;
function GetOldREF_SUBCUENTAIsNull: Boolean; virtual;
procedure SetREF_SUBCUENTAValue(const aValue: String); virtual;
procedure SetREF_SUBCUENTAIsNull(const aValue: Boolean); virtual;
function GetID_EJERCICIOValue: Integer; virtual;
function GetID_EJERCICIOIsNull: Boolean; virtual;
function GetOldID_EJERCICIOValue: Integer; virtual;
function GetOldID_EJERCICIOIsNull: Boolean; virtual;
procedure SetID_EJERCICIOValue(const aValue: Integer); virtual;
procedure SetID_EJERCICIOIsNull(const aValue: Boolean); virtual;
function GetCONCEPTOValue: String; virtual;
function GetCONCEPTOIsNull: Boolean; virtual;
function GetOldCONCEPTOValue: String; virtual;
function GetOldCONCEPTOIsNull: Boolean; virtual;
procedure SetCONCEPTOValue(const aValue: String); virtual;
procedure SetCONCEPTOIsNull(const aValue: Boolean); virtual;
function GetDOCUMENTOValue: String; virtual;
function GetDOCUMENTOIsNull: Boolean; virtual;
function GetOldDOCUMENTOValue: String; virtual;
function GetOldDOCUMENTOIsNull: Boolean; virtual;
procedure SetDOCUMENTOValue(const aValue: String); virtual;
procedure SetDOCUMENTOIsNull(const aValue: Boolean); virtual;
function GetDEBEValue: Currency; virtual;
function GetDEBEIsNull: Boolean; virtual;
function GetOldDEBEValue: Currency; virtual;
@ -134,14 +150,22 @@ type
property ID_SUBCUENTAIsNull : Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
property OldID_SUBCUENTAIsNull : Boolean read GetOldID_SUBCUENTAIsNull;
property SUBCUENTA : String read GetSUBCUENTAValue write SetSUBCUENTAValue;
property SUBCUENTAIsNull : Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
property OldSUBCUENTA : String read GetOldSUBCUENTAValue;
property OldSUBCUENTAIsNull : Boolean read GetOldSUBCUENTAIsNull;
property REF_SUBCUENTA : String read GetREF_SUBCUENTAValue write SetREF_SUBCUENTAValue;
property REF_SUBCUENTAIsNull : Boolean read GetREF_SUBCUENTAIsNull write SetREF_SUBCUENTAIsNull;
property OldREF_SUBCUENTA : String read GetOldREF_SUBCUENTAValue;
property OldREF_SUBCUENTAIsNull : Boolean read GetOldREF_SUBCUENTAIsNull;
property ID_EJERCICIO : Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue;
property ID_EJERCICIOIsNull : Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull;
property OldID_EJERCICIO : Integer read GetOldID_EJERCICIOValue;
property OldID_EJERCICIOIsNull : Boolean read GetOldID_EJERCICIOIsNull;
property CONCEPTO : String read GetCONCEPTOValue write SetCONCEPTOValue;
property CONCEPTOIsNull : Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull;
property OldCONCEPTO : String read GetOldCONCEPTOValue;
property OldCONCEPTOIsNull : Boolean read GetOldCONCEPTOIsNull;
property DOCUMENTO : String read GetDOCUMENTOValue write SetDOCUMENTOValue;
property DOCUMENTOIsNull : Boolean read GetDOCUMENTOIsNull write SetDOCUMENTOIsNull;
property OldDOCUMENTO : String read GetOldDOCUMENTOValue;
property OldDOCUMENTOIsNull : Boolean read GetOldDOCUMENTOIsNull;
property DEBE : Currency read GetDEBEValue write SetDEBEValue;
property DEBEIsNull : Boolean read GetDEBEIsNull write SetDEBEIsNull;
property OldDEBE : Currency read GetOldDEBEValue;
@ -163,32 +187,30 @@ type
{ IApuntesDelta }
IApuntesDelta = interface(IApuntes)
['{74F9A357-E9A3-454C-8D87-86065C5B2C10}']
['{462A727F-D66D-4493-83A3-6CAF34F994D7}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_ASIENTOValue : Integer;
function GetOldCONCEPTOValue : String;
function GetOldPUNTEADOValue : SmallInt;
function GetOldDEBEValue : Currency;
function GetOldHABERValue : Currency;
function GetOldID_FACTURAValue : Integer;
function GetOldID_RECIBOValue : Integer;
function GetOldID_SUBCUENTAValue : Integer;
function GetOldREF_SUBCUENTAValue : String;
function GetOldSUBCUENTAValue : String;
function GetOldCONCEPTOValue : String;
function GetOldDOCUMENTOValue : String;
function GetOldDEBEValue : Currency;
function GetOldHABERValue : Currency;
function GetOldPUNTEADOValue : SmallInt;
{ Properties }
property OldID : Integer read GetOldIDValue;
property OldID_ASIENTO : Integer read GetOldID_ASIENTOValue;
property OldCONCEPTO : String read GetOldCONCEPTOValue;
property OldPUNTEADO : SmallInt read GetOldPUNTEADOValue;
property OldDEBE : Currency read GetOldDEBEValue;
property OldHABER : Currency read GetOldHABERValue;
property OldID_FACTURA : Integer read GetOldID_FACTURAValue;
property OldID_RECIBO : Integer read GetOldID_RECIBOValue;
property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
property OldREF_SUBCUENTA : String read GetOldREF_SUBCUENTAValue;
property OldSUBCUENTA : String read GetOldSUBCUENTAValue;
property OldCONCEPTO : String read GetOldCONCEPTOValue;
property OldDOCUMENTO : String read GetOldDOCUMENTOValue;
property OldDEBE : Currency read GetOldDEBEValue;
property OldHABER : Currency read GetOldHABERValue;
property OldPUNTEADO : SmallInt read GetOldPUNTEADOValue;
end;
{ TApuntesBusinessProcessorRules }
@ -208,42 +230,6 @@ type
function GetOldID_ASIENTOIsNull: Boolean; virtual;
procedure SetID_ASIENTOValue(const aValue: Integer); virtual;
procedure SetID_ASIENTOIsNull(const aValue: Boolean); virtual;
function GetCONCEPTOValue: String; virtual;
function GetCONCEPTOIsNull: Boolean; virtual;
function GetOldCONCEPTOValue: String; virtual;
function GetOldCONCEPTOIsNull: Boolean; virtual;
procedure SetCONCEPTOValue(const aValue: String); virtual;
procedure SetCONCEPTOIsNull(const aValue: Boolean); virtual;
function GetPUNTEADOValue: SmallInt; virtual;
function GetPUNTEADOIsNull: Boolean; virtual;
function GetOldPUNTEADOValue: SmallInt; virtual;
function GetOldPUNTEADOIsNull: Boolean; virtual;
procedure SetPUNTEADOValue(const aValue: SmallInt); virtual;
procedure SetPUNTEADOIsNull(const aValue: Boolean); virtual;
function GetDEBEValue: Currency; virtual;
function GetDEBEIsNull: Boolean; virtual;
function GetOldDEBEValue: Currency; virtual;
function GetOldDEBEIsNull: Boolean; virtual;
procedure SetDEBEValue(const aValue: Currency); virtual;
procedure SetDEBEIsNull(const aValue: Boolean); virtual;
function GetHABERValue: Currency; virtual;
function GetHABERIsNull: Boolean; virtual;
function GetOldHABERValue: Currency; virtual;
function GetOldHABERIsNull: Boolean; virtual;
procedure SetHABERValue(const aValue: Currency); virtual;
procedure SetHABERIsNull(const aValue: Boolean); virtual;
function GetID_FACTURAValue: Integer; virtual;
function GetID_FACTURAIsNull: Boolean; virtual;
function GetOldID_FACTURAValue: Integer; virtual;
function GetOldID_FACTURAIsNull: Boolean; virtual;
procedure SetID_FACTURAValue(const aValue: Integer); virtual;
procedure SetID_FACTURAIsNull(const aValue: Boolean); virtual;
function GetID_RECIBOValue: Integer; virtual;
function GetID_RECIBOIsNull: Boolean; virtual;
function GetOldID_RECIBOValue: Integer; virtual;
function GetOldID_RECIBOIsNull: Boolean; virtual;
procedure SetID_RECIBOValue(const aValue: Integer); virtual;
procedure SetID_RECIBOIsNull(const aValue: Boolean); virtual;
function GetID_SUBCUENTAValue: Integer; virtual;
function GetID_SUBCUENTAIsNull: Boolean; virtual;
function GetOldID_SUBCUENTAValue: Integer; virtual;
@ -262,6 +248,36 @@ type
function GetOldSUBCUENTAIsNull: Boolean; virtual;
procedure SetSUBCUENTAValue(const aValue: String); virtual;
procedure SetSUBCUENTAIsNull(const aValue: Boolean); virtual;
function GetCONCEPTOValue: String; virtual;
function GetCONCEPTOIsNull: Boolean; virtual;
function GetOldCONCEPTOValue: String; virtual;
function GetOldCONCEPTOIsNull: Boolean; virtual;
procedure SetCONCEPTOValue(const aValue: String); virtual;
procedure SetCONCEPTOIsNull(const aValue: Boolean); virtual;
function GetDOCUMENTOValue: String; virtual;
function GetDOCUMENTOIsNull: Boolean; virtual;
function GetOldDOCUMENTOValue: String; virtual;
function GetOldDOCUMENTOIsNull: Boolean; virtual;
procedure SetDOCUMENTOValue(const aValue: String); virtual;
procedure SetDOCUMENTOIsNull(const aValue: Boolean); virtual;
function GetDEBEValue: Currency; virtual;
function GetDEBEIsNull: Boolean; virtual;
function GetOldDEBEValue: Currency; virtual;
function GetOldDEBEIsNull: Boolean; virtual;
procedure SetDEBEValue(const aValue: Currency); virtual;
procedure SetDEBEIsNull(const aValue: Boolean); virtual;
function GetHABERValue: Currency; virtual;
function GetHABERIsNull: Boolean; virtual;
function GetOldHABERValue: Currency; virtual;
function GetOldHABERIsNull: Boolean; virtual;
procedure SetHABERValue(const aValue: Currency); virtual;
procedure SetHABERIsNull(const aValue: Boolean); virtual;
function GetPUNTEADOValue: SmallInt; virtual;
function GetPUNTEADOIsNull: Boolean; virtual;
function GetOldPUNTEADOValue: SmallInt; virtual;
function GetOldPUNTEADOIsNull: Boolean; virtual;
procedure SetPUNTEADOValue(const aValue: SmallInt); virtual;
procedure SetPUNTEADOIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@ -272,30 +288,6 @@ type
property ID_ASIENTOIsNull : Boolean read GetID_ASIENTOIsNull write SetID_ASIENTOIsNull;
property OldID_ASIENTO : Integer read GetOldID_ASIENTOValue;
property OldID_ASIENTOIsNull : Boolean read GetOldID_ASIENTOIsNull;
property CONCEPTO : String read GetCONCEPTOValue write SetCONCEPTOValue;
property CONCEPTOIsNull : Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull;
property OldCONCEPTO : String read GetOldCONCEPTOValue;
property OldCONCEPTOIsNull : Boolean read GetOldCONCEPTOIsNull;
property PUNTEADO : SmallInt read GetPUNTEADOValue write SetPUNTEADOValue;
property PUNTEADOIsNull : Boolean read GetPUNTEADOIsNull write SetPUNTEADOIsNull;
property OldPUNTEADO : SmallInt read GetOldPUNTEADOValue;
property OldPUNTEADOIsNull : Boolean read GetOldPUNTEADOIsNull;
property DEBE : Currency read GetDEBEValue write SetDEBEValue;
property DEBEIsNull : Boolean read GetDEBEIsNull write SetDEBEIsNull;
property OldDEBE : Currency read GetOldDEBEValue;
property OldDEBEIsNull : Boolean read GetOldDEBEIsNull;
property HABER : Currency read GetHABERValue write SetHABERValue;
property HABERIsNull : Boolean read GetHABERIsNull write SetHABERIsNull;
property OldHABER : Currency read GetOldHABERValue;
property OldHABERIsNull : Boolean read GetOldHABERIsNull;
property ID_FACTURA : Integer read GetID_FACTURAValue write SetID_FACTURAValue;
property ID_FACTURAIsNull : Boolean read GetID_FACTURAIsNull write SetID_FACTURAIsNull;
property OldID_FACTURA : Integer read GetOldID_FACTURAValue;
property OldID_FACTURAIsNull : Boolean read GetOldID_FACTURAIsNull;
property ID_RECIBO : Integer read GetID_RECIBOValue write SetID_RECIBOValue;
property ID_RECIBOIsNull : Boolean read GetID_RECIBOIsNull write SetID_RECIBOIsNull;
property OldID_RECIBO : Integer read GetOldID_RECIBOValue;
property OldID_RECIBOIsNull : Boolean read GetOldID_RECIBOIsNull;
property ID_SUBCUENTA : Integer read GetID_SUBCUENTAValue write SetID_SUBCUENTAValue;
property ID_SUBCUENTAIsNull : Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
@ -308,6 +300,26 @@ type
property SUBCUENTAIsNull : Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
property OldSUBCUENTA : String read GetOldSUBCUENTAValue;
property OldSUBCUENTAIsNull : Boolean read GetOldSUBCUENTAIsNull;
property CONCEPTO : String read GetCONCEPTOValue write SetCONCEPTOValue;
property CONCEPTOIsNull : Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull;
property OldCONCEPTO : String read GetOldCONCEPTOValue;
property OldCONCEPTOIsNull : Boolean read GetOldCONCEPTOIsNull;
property DOCUMENTO : String read GetDOCUMENTOValue write SetDOCUMENTOValue;
property DOCUMENTOIsNull : Boolean read GetDOCUMENTOIsNull write SetDOCUMENTOIsNull;
property OldDOCUMENTO : String read GetOldDOCUMENTOValue;
property OldDOCUMENTOIsNull : Boolean read GetOldDOCUMENTOIsNull;
property DEBE : Currency read GetDEBEValue write SetDEBEValue;
property DEBEIsNull : Boolean read GetDEBEIsNull write SetDEBEIsNull;
property OldDEBE : Currency read GetOldDEBEValue;
property OldDEBEIsNull : Boolean read GetOldDEBEIsNull;
property HABER : Currency read GetHABERValue write SetHABERValue;
property HABERIsNull : Boolean read GetHABERIsNull write SetHABERIsNull;
property OldHABER : Currency read GetOldHABERValue;
property OldHABERIsNull : Boolean read GetOldHABERIsNull;
property PUNTEADO : SmallInt read GetPUNTEADOValue write SetPUNTEADOValue;
property PUNTEADOIsNull : Boolean read GetPUNTEADOIsNull write SetPUNTEADOIsNull;
property OldPUNTEADO : SmallInt read GetOldPUNTEADOValue;
property OldPUNTEADOIsNull : Boolean read GetOldPUNTEADOIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@ -317,7 +329,7 @@ type
{ IAsientosDelta }
IAsientosDelta = interface(IAsientos)
['{291CBAA5-42AB-45D6-A5D0-59D694A8960E}']
['{3A7F1EB1-7C5B-47BF-8DFA-4C86EFF0686E}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldFECHA_ASIENTOValue : DateTime;
@ -375,7 +387,7 @@ type
{ ISubCuentasDelta }
ISubCuentasDelta = interface(ISubCuentas)
['{0C092B2B-41F6-4F70-B073-F1B68F9FA233}']
['{E88435DC-570C-43D8-A8B0-004C1C775CF0}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldREF_SUBCUENTAValue : String;
@ -505,7 +517,7 @@ type
{ ICuentasDelta }
ICuentasDelta = interface(ICuentas)
['{152D2AD4-8B66-49AC-8D07-33C76A60CB85}']
['{A26B4CE1-63F7-49F3-8A0A-F2840D95587C}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldREF_CUENTAValue : String;
@ -647,7 +659,7 @@ type
{ ICuentasEspecialesDelta }
ICuentasEspecialesDelta = interface(ICuentasEspeciales)
['{0E63EE73-6CE9-4F33-9DB7-B02B1190DA20}']
['{089CB669-7830-4908-9344-42AEC93D8320}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldREFERENCIAValue : String;
@ -705,7 +717,7 @@ type
{ IEpigrafesDelta }
IEpigrafesDelta = interface(IEpigrafes)
['{2EB3D408-B118-4BC5-AABE-FAC7393086AB}']
['{BFE5CD3F-52C2-400A-93A6-ACB723F7390E}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldREF_EPIGRAFEValue : String;
@ -799,7 +811,7 @@ type
{ IBalancesDelta }
IBalancesDelta = interface(IBalances)
['{964A4194-0DF5-4CA7-A922-DB219CC96B39}']
['{543250BB-1C2E-4448-AEA8-EDC23591A2ED}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldREF_BALANCEValue : String;
@ -1098,35 +1110,66 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_SUBCUENTA] := Null;
end;
function TDiarioBusinessProcessorRules.GetSUBCUENTAValue: String;
function TDiarioBusinessProcessorRules.GetREF_SUBCUENTAValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioSUBCUENTA];
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioREF_SUBCUENTA];
end;
function TDiarioBusinessProcessorRules.GetSUBCUENTAIsNull: Boolean;
function TDiarioBusinessProcessorRules.GetREF_SUBCUENTAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioSUBCUENTA]);
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioREF_SUBCUENTA]);
end;
function TDiarioBusinessProcessorRules.GetOldSUBCUENTAValue: String;
function TDiarioBusinessProcessorRules.GetOldREF_SUBCUENTAValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioSUBCUENTA];
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioREF_SUBCUENTA];
end;
function TDiarioBusinessProcessorRules.GetOldSUBCUENTAIsNull: Boolean;
function TDiarioBusinessProcessorRules.GetOldREF_SUBCUENTAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioSUBCUENTA]);
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioREF_SUBCUENTA]);
end;
procedure TDiarioBusinessProcessorRules.SetSUBCUENTAValue(const aValue: String);
procedure TDiarioBusinessProcessorRules.SetREF_SUBCUENTAValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioSUBCUENTA] := aValue;
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioREF_SUBCUENTA] := aValue;
end;
procedure TDiarioBusinessProcessorRules.SetSUBCUENTAIsNull(const aValue: Boolean);
procedure TDiarioBusinessProcessorRules.SetREF_SUBCUENTAIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioSUBCUENTA] := Null;
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioREF_SUBCUENTA] := Null;
end;
function TDiarioBusinessProcessorRules.GetID_EJERCICIOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_EJERCICIO];
end;
function TDiarioBusinessProcessorRules.GetID_EJERCICIOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_EJERCICIO]);
end;
function TDiarioBusinessProcessorRules.GetOldID_EJERCICIOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioID_EJERCICIO];
end;
function TDiarioBusinessProcessorRules.GetOldID_EJERCICIOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioID_EJERCICIO]);
end;
procedure TDiarioBusinessProcessorRules.SetID_EJERCICIOValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_EJERCICIO] := aValue;
end;
procedure TDiarioBusinessProcessorRules.SetID_EJERCICIOIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_EJERCICIO] := Null;
end;
function TDiarioBusinessProcessorRules.GetCONCEPTOValue: String;
@ -1160,6 +1203,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioCONCEPTO] := Null;
end;
function TDiarioBusinessProcessorRules.GetDOCUMENTOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioDOCUMENTO];
end;
function TDiarioBusinessProcessorRules.GetDOCUMENTOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioDOCUMENTO]);
end;
function TDiarioBusinessProcessorRules.GetOldDOCUMENTOValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioDOCUMENTO];
end;
function TDiarioBusinessProcessorRules.GetOldDOCUMENTOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioDOCUMENTO]);
end;
procedure TDiarioBusinessProcessorRules.SetDOCUMENTOValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioDOCUMENTO] := aValue;
end;
procedure TDiarioBusinessProcessorRules.SetDOCUMENTOIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioDOCUMENTO] := Null;
end;
function TDiarioBusinessProcessorRules.GetDEBEValue: Currency;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioDEBE];
@ -1327,192 +1401,6 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_ASIENTO] := Null;
end;
function TApuntesBusinessProcessorRules.GetCONCEPTOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesCONCEPTO];
end;
function TApuntesBusinessProcessorRules.GetCONCEPTOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesCONCEPTO]);
end;
function TApuntesBusinessProcessorRules.GetOldCONCEPTOValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesCONCEPTO];
end;
function TApuntesBusinessProcessorRules.GetOldCONCEPTOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesCONCEPTO]);
end;
procedure TApuntesBusinessProcessorRules.SetCONCEPTOValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesCONCEPTO] := aValue;
end;
procedure TApuntesBusinessProcessorRules.SetCONCEPTOIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesCONCEPTO] := Null;
end;
function TApuntesBusinessProcessorRules.GetPUNTEADOValue: SmallInt;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesPUNTEADO];
end;
function TApuntesBusinessProcessorRules.GetPUNTEADOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesPUNTEADO]);
end;
function TApuntesBusinessProcessorRules.GetOldPUNTEADOValue: SmallInt;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesPUNTEADO];
end;
function TApuntesBusinessProcessorRules.GetOldPUNTEADOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesPUNTEADO]);
end;
procedure TApuntesBusinessProcessorRules.SetPUNTEADOValue(const aValue: SmallInt);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesPUNTEADO] := aValue;
end;
procedure TApuntesBusinessProcessorRules.SetPUNTEADOIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesPUNTEADO] := Null;
end;
function TApuntesBusinessProcessorRules.GetDEBEValue: Currency;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesDEBE];
end;
function TApuntesBusinessProcessorRules.GetDEBEIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesDEBE]);
end;
function TApuntesBusinessProcessorRules.GetOldDEBEValue: Currency;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesDEBE];
end;
function TApuntesBusinessProcessorRules.GetOldDEBEIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesDEBE]);
end;
procedure TApuntesBusinessProcessorRules.SetDEBEValue(const aValue: Currency);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesDEBE] := aValue;
end;
procedure TApuntesBusinessProcessorRules.SetDEBEIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesDEBE] := Null;
end;
function TApuntesBusinessProcessorRules.GetHABERValue: Currency;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesHABER];
end;
function TApuntesBusinessProcessorRules.GetHABERIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesHABER]);
end;
function TApuntesBusinessProcessorRules.GetOldHABERValue: Currency;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesHABER];
end;
function TApuntesBusinessProcessorRules.GetOldHABERIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesHABER]);
end;
procedure TApuntesBusinessProcessorRules.SetHABERValue(const aValue: Currency);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesHABER] := aValue;
end;
procedure TApuntesBusinessProcessorRules.SetHABERIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesHABER] := Null;
end;
function TApuntesBusinessProcessorRules.GetID_FACTURAValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_FACTURA];
end;
function TApuntesBusinessProcessorRules.GetID_FACTURAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_FACTURA]);
end;
function TApuntesBusinessProcessorRules.GetOldID_FACTURAValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesID_FACTURA];
end;
function TApuntesBusinessProcessorRules.GetOldID_FACTURAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesID_FACTURA]);
end;
procedure TApuntesBusinessProcessorRules.SetID_FACTURAValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_FACTURA] := aValue;
end;
procedure TApuntesBusinessProcessorRules.SetID_FACTURAIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_FACTURA] := Null;
end;
function TApuntesBusinessProcessorRules.GetID_RECIBOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_RECIBO];
end;
function TApuntesBusinessProcessorRules.GetID_RECIBOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_RECIBO]);
end;
function TApuntesBusinessProcessorRules.GetOldID_RECIBOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesID_RECIBO];
end;
function TApuntesBusinessProcessorRules.GetOldID_RECIBOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesID_RECIBO]);
end;
procedure TApuntesBusinessProcessorRules.SetID_RECIBOValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_RECIBO] := aValue;
end;
procedure TApuntesBusinessProcessorRules.SetID_RECIBOIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_RECIBO] := Null;
end;
function TApuntesBusinessProcessorRules.GetID_SUBCUENTAValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_SUBCUENTA];
@ -1606,6 +1494,161 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesSUBCUENTA] := Null;
end;
function TApuntesBusinessProcessorRules.GetCONCEPTOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesCONCEPTO];
end;
function TApuntesBusinessProcessorRules.GetCONCEPTOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesCONCEPTO]);
end;
function TApuntesBusinessProcessorRules.GetOldCONCEPTOValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesCONCEPTO];
end;
function TApuntesBusinessProcessorRules.GetOldCONCEPTOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesCONCEPTO]);
end;
procedure TApuntesBusinessProcessorRules.SetCONCEPTOValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesCONCEPTO] := aValue;
end;
procedure TApuntesBusinessProcessorRules.SetCONCEPTOIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesCONCEPTO] := Null;
end;
function TApuntesBusinessProcessorRules.GetDOCUMENTOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesDOCUMENTO];
end;
function TApuntesBusinessProcessorRules.GetDOCUMENTOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesDOCUMENTO]);
end;
function TApuntesBusinessProcessorRules.GetOldDOCUMENTOValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesDOCUMENTO];
end;
function TApuntesBusinessProcessorRules.GetOldDOCUMENTOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesDOCUMENTO]);
end;
procedure TApuntesBusinessProcessorRules.SetDOCUMENTOValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesDOCUMENTO] := aValue;
end;
procedure TApuntesBusinessProcessorRules.SetDOCUMENTOIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesDOCUMENTO] := Null;
end;
function TApuntesBusinessProcessorRules.GetDEBEValue: Currency;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesDEBE];
end;
function TApuntesBusinessProcessorRules.GetDEBEIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesDEBE]);
end;
function TApuntesBusinessProcessorRules.GetOldDEBEValue: Currency;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesDEBE];
end;
function TApuntesBusinessProcessorRules.GetOldDEBEIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesDEBE]);
end;
procedure TApuntesBusinessProcessorRules.SetDEBEValue(const aValue: Currency);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesDEBE] := aValue;
end;
procedure TApuntesBusinessProcessorRules.SetDEBEIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesDEBE] := Null;
end;
function TApuntesBusinessProcessorRules.GetHABERValue: Currency;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesHABER];
end;
function TApuntesBusinessProcessorRules.GetHABERIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesHABER]);
end;
function TApuntesBusinessProcessorRules.GetOldHABERValue: Currency;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesHABER];
end;
function TApuntesBusinessProcessorRules.GetOldHABERIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesHABER]);
end;
procedure TApuntesBusinessProcessorRules.SetHABERValue(const aValue: Currency);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesHABER] := aValue;
end;
procedure TApuntesBusinessProcessorRules.SetHABERIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesHABER] := Null;
end;
function TApuntesBusinessProcessorRules.GetPUNTEADOValue: SmallInt;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesPUNTEADO];
end;
function TApuntesBusinessProcessorRules.GetPUNTEADOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesPUNTEADO]);
end;
function TApuntesBusinessProcessorRules.GetOldPUNTEADOValue: SmallInt;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesPUNTEADO];
end;
function TApuntesBusinessProcessorRules.GetOldPUNTEADOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ApuntesPUNTEADO]);
end;
procedure TApuntesBusinessProcessorRules.SetPUNTEADOValue(const aValue: SmallInt);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesPUNTEADO] := aValue;
end;
procedure TApuntesBusinessProcessorRules.SetPUNTEADOIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesPUNTEADO] := Null;
end;
{ TAsientosBusinessProcessorRules }
constructor TAsientosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);

View File

@ -0,0 +1,54 @@
unit uBizApuntes;
interface
uses
uDAInterfaces, uDADataTable, schContabilidadClient_Intf;
const
BIZ_CLIENT_Apunte = 'Client.Apunte';
type
IBizApunte = interface(IApuntes)
['{D26061DB-FFF4-456F-B442-A14A19501DD0}']
function EsNuevo : Boolean;
end;
TBizApunte = class(TApuntesDataTableRules, IBizApunte)
protected
procedure OnNewRecord(Sender: TDADataTable); override;
public
procedure IniciarValoresApunteNueva;
function EsNuevo : Boolean;
end;
implementation
{ TBizApunte }
uses
SysUtils, uDataTableUtils, uFactuGES_App;
function TBizApunte.EsNuevo: Boolean;
begin
Result := (ID < 0);
end;
procedure TBizApunte.IniciarValoresApunteNueva;
begin
// ID_EJERCICIO := AppFactuGES.EjercicioActivo.ID;
end;
procedure TBizApunte.OnNewRecord(Sender: TDADataTable);
begin
inherited;
IniciarValoresApunteNueva;
end;
initialization
RegisterDataTableRules(BIZ_CLIENT_Apunte, TBizApunte);
finalization
end.

View File

@ -3,7 +3,7 @@ unit uBizAsientos;
interface
uses
uDAInterfaces, uDADataTable, schContabilidadClient_Intf;
uDAInterfaces, uDADataTable, schContabilidadClient_Intf, uBizApuntes;
const
BIZ_CLIENT_Asiento = 'Client.Asiento';
@ -11,15 +11,29 @@ const
type
IBizAsiento = interface(IAsientos)
['{F79E3238-1E0D-4FB6-9AF7-E5703619B067}']
function GetApuntes: IBizApunte;
procedure SetApuntes(Value: IBizApunte);
property Apuntes: IBizApunte read GetApuntes write SetApuntes;
function EsNuevo : Boolean;
end;
TBizAsiento = class(TAsientosDataTableRules, IBizAsiento)
protected
FApuntes : IBizApunte;
FApuntesLink : TDADataSource;
function GetApuntes: IBizApunte;
procedure SetApuntes(Value: IBizApunte);
procedure OnNewRecord(Sender: TDADataTable); override;
public
property Apuntes: IBizApunte read GetApuntes write SetApuntes;
procedure IniciarValoresAsientoNueva;
function EsNuevo : Boolean;
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
implementation
@ -29,11 +43,31 @@ implementation
uses
SysUtils, uDataTableUtils, uFactuGES_App;
constructor TBizAsiento.Create(aDataTable: TDADataTable);
begin
inherited;
FApuntes := Nil;
FApuntesLink := TDADataSource.Create(NIL);
FApuntesLink.DataTable := aDataTable;
end;
destructor TBizAsiento.Destroy;
begin
FApuntes := NIL;
FApuntesLink.Free;
inherited;
end;
function TBizAsiento.EsNuevo: Boolean;
begin
Result := (ID < 0);
end;
function TBizAsiento.GetApuntes: IBizApunte;
begin
Result := FApuntes;
end;
procedure TBizAsiento.IniciarValoresAsientoNueva;
begin
// ID_EJERCICIO := AppFactuGES.EjercicioActivo.ID;
@ -45,6 +79,12 @@ begin
IniciarValoresAsientoNueva;
end;
procedure TBizAsiento.SetApuntes(Value: IBizApunte);
begin
FApuntes := Value;
EnlazarMaestroDetalle(FApuntesLink, FApuntes);
end;
initialization
RegisterDataTableRules(BIZ_CLIENT_Asiento, TBizAsiento);

View File

@ -0,0 +1,29 @@
unit uBizDiario;
interface
uses
uDAInterfaces, uDADataTable, schContabilidadClient_Intf, uBizApuntes;
const
BIZ_CLIENT_Diario = 'Client.Diario';
type
IBizDiario = interface(IDiario)
['{E2924908-0B5A-43DD-B03E-672F592FA19B}']
end;
TBizDiario = class(TDiarioDataTableRules, IBizDiario)
end;
implementation
{ TBizDiario }
initialization
RegisterDataTableRules(BIZ_CLIENT_Diario, TBizDiario);
finalization
end.

View File

@ -3,7 +3,7 @@ unit uBizSubCuentas;
interface
uses
uDAInterfaces, uDADataTable, schContabilidadClient_Intf;
uDAInterfaces, uDADataTable, uDBSelectionListUtils, schContabilidadClient_Intf;
const
BIZ_CLIENT_SubCuenta = 'Client.SubCuenta';
@ -14,10 +14,16 @@ type
function EsNuevo : Boolean;
end;
TBizSubCuenta = class(TSubCuentasDataTableRules, IBizSubCuenta)
TBizSubCuenta = class(TSubCuentasDataTableRules, IBizSubCuenta, ISeleccionable)
protected
FSeleccionableInterface: ISeleccionable;
procedure OnNewRecord(Sender: TDADataTable); override;
public
property SeleccionableInterface : ISeleccionable read FSeleccionableInterface
write FSeleccionableInterface implements ISeleccionable;
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
procedure IniciarValoresSubCuentaNueva;
function EsNuevo : Boolean;
end;
@ -29,6 +35,18 @@ implementation
uses
SysUtils, uDataTableUtils, uFactuGES_App;
constructor TBizSubCuenta.Create(aDataTable: TDADataTable);
begin
inherited;
FSeleccionableInterface := TSeleccionable.Create(aDataTable);
end;
destructor TBizSubCuenta.Destroy;
begin
FSeleccionableInterface := NIL;
inherited;
end;
function TBizSubCuenta.EsNuevo: Boolean;
begin
Result := (ID < 0);

View File

@ -52,7 +52,7 @@ uses
uEpigrafesController, uBalancesController, uCuentasEspecialesController,
uCuentasController, uSubCuentasController, uAsientosController,
uBizEpigrafes, uBizBalances, uBizCuentasEspeciales, uBizCuentas, uBizSubCuentas,
uBizAsientos,
uBizAsientos, uBizDiario,
uContabilidadViewRegister;
function GetModule : TModuleController;
@ -66,11 +66,11 @@ exports
procedure TPluginContabilidad.actAsientosExecute(Sender: TObject);
var
AAsientosController : IAsientosController;
AAsientos : IBizAsiento;
ADiario : IBizDiario;
begin
AAsientosController := TAsientosController.Create;
AAsientos := (AAsientosController.BuscarTodos as IBizAsiento);
AAsientosController.VerTodos(AAsientos);
ADiario := (AAsientosController.BuscarDiario as IBizDiario);
AAsientosController.VerDiario(ADiario);
end;
procedure TPluginContabilidad.actBalancesExecute(Sender: TObject);

View File

@ -313,6 +313,14 @@ object srvContabilidad: TsrvContabilidad
Name = 'Apuntes_SUBCUENTA'
DataType = datString
Size = 255
end
item
Name = 'Epigrafes_ID_EMPRESA'
DataType = datInteger
end
item
Name = 'Cuentas_ID_EMPRESA'
DataType = datInteger
end>
Left = 150
Top = 24
@ -354,13 +362,21 @@ object srvContabilidad: TsrvContabilidad
TableField = 'ID_SUBCUENTA'
end
item
DatasetField = 'SUBCUENTA'
TableField = 'SUBCUENTA'
DatasetField = 'REF_SUBCUENTA'
TableField = 'REF_SUBCUENTA'
end
item
DatasetField = 'ID_EJERCICIO'
TableField = 'ID_EJERCICIO'
end
item
DatasetField = 'CONCEPTO'
TableField = 'CONCEPTO'
end
item
DatasetField = 'DOCUMENTO'
TableField = 'DOCUMENTO'
end
item
DatasetField = 'DEBE'
TableField = 'DEBE'
@ -398,15 +414,24 @@ object srvContabilidad: TsrvContabilidad
DataType = datInteger
end
item
Name = 'SUBCUENTA'
Name = 'REF_SUBCUENTA'
DataType = datString
Size = 15
end
item
Name = 'ID_EJERCICIO'
DataType = datInteger
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 255
end
item
Name = 'DOCUMENTO'
DataType = datString
Size = 255
end
item
Name = 'DEBE'
DataType = datCurrency
@ -430,14 +455,13 @@ object srvContabilidad: TsrvContabilidad
TargetTable = 'CONT_APUNTES'
Name = 'IBX'
SQL =
'SELECT '#10' CONT_APUNTES.ID, CONT_APUNTES.ID_ASIENTO, CONT_APUNT' +
'ES.CONCEPTO,'#10' CONT_APUNTES.PUNTEADO, CONT_APUNTES.DEBE, CONT_' +
'APUNTES.HABER,'#10' CONT_APUNTES.ID_FACTURA, CONT_APUNTES.ID_RECI' +
'BO,'#10' CONT_APUNTES.ID_SUBCUENTA, CONT_SUBCUENTAS.REF_SUBCUENTA' +
' as REF_SUBCUENTA,'#10' CONT_SUBCUENTAS.DESCRIPCION as SUBCUENTA'#10 +
' FROM'#10' CONT_APUNTES'#10' LEFT JOIN CONT_SUBCUENTAS ON (CONT_SUB' +
'CUENTAS.ID = CONT_APUNTES.ID_SUBCUENTA)'#10' WHERE {Where}'#10' ORDER ' +
'BY CONT_APUNTES.ID'#10
'SELECT'#10' CONT_APUNTES.ID,'#10' CONT_APUNTES.ID_ASIENTO,'#10' CON' +
'T_APUNTES.ID_SUBCUENTA,'#10' CONT_SUBCUENTAS.REF_SUBCUENTA,'#10' C' +
'ONT_SUBCUENTAS.DESCRIPCION as SUBCUENTA,'#10' CONT_APUNTES.CONCEP' +
'TO,'#10' CONT_APUNTES.DOCUMENTO,'#10' CONT_APUNTES.DEBE,'#10' CONT_' +
'APUNTES.HABER,'#10' CONT_APUNTES.PUNTEADO'#10#10'FROM CONT_APUNTES'#10'LEFT' +
' JOIN CONT_SUBCUENTAS ON (CONT_SUBCUENTAS.ID = CONT_APUNTES.ID_S' +
'UBCUENTA)'#10'WHERE {Where}'#10'ORDER BY CONT_APUNTES.ID'#10#10
StatementType = stSQL
ColumnMappings = <
item
@ -448,30 +472,6 @@ object srvContabilidad: TsrvContabilidad
DatasetField = 'ID_ASIENTO'
TableField = 'ID_ASIENTO'
end
item
DatasetField = 'CONCEPTO'
TableField = 'CONCEPTO'
end
item
DatasetField = 'PUNTEADO'
TableField = 'PUNTEADO'
end
item
DatasetField = 'DEBE'
TableField = 'DEBE'
end
item
DatasetField = 'HABER'
TableField = 'HABER'
end
item
DatasetField = 'ID_FACTURA'
TableField = 'ID_FACTURA'
end
item
DatasetField = 'ID_RECIBO'
TableField = 'ID_RECIBO'
end
item
DatasetField = 'ID_SUBCUENTA'
TableField = 'ID_SUBCUENTA'
@ -485,6 +485,26 @@ object srvContabilidad: TsrvContabilidad
DatasetField = 'SUBCUENTA'
TableField = '<unknown>'
SQLOrigin = 'SUBCUENTA'
end
item
DatasetField = 'CONCEPTO'
TableField = 'CONCEPTO'
end
item
DatasetField = 'DOCUMENTO'
TableField = 'DOCUMENTO'
end
item
DatasetField = 'DEBE'
TableField = 'DEBE'
end
item
DatasetField = 'HABER'
TableField = 'HABER'
end
item
DatasetField = 'PUNTEADO'
TableField = 'PUNTEADO'
end>
end>
Name = 'Apuntes'
@ -501,37 +521,6 @@ object srvContabilidad: TsrvContabilidad
DataType = datInteger
DictionaryEntry = 'Apuntes_ID_ASIENTO'
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 255
DictionaryEntry = 'Apuntes_CONCEPTO'
end
item
Name = 'PUNTEADO'
DataType = datSmallInt
DictionaryEntry = 'Apuntes_PUNTEADO'
end
item
Name = 'DEBE'
DataType = datCurrency
DictionaryEntry = 'Apuntes_DEBE'
end
item
Name = 'HABER'
DataType = datCurrency
DictionaryEntry = 'Apuntes_HABER'
end
item
Name = 'ID_FACTURA'
DataType = datInteger
DictionaryEntry = 'Apuntes_ID_FACTURA'
end
item
Name = 'ID_RECIBO'
DataType = datInteger
DictionaryEntry = 'Apuntes_ID_RECIBO'
end
item
Name = 'ID_SUBCUENTA'
DataType = datInteger
@ -548,6 +537,32 @@ object srvContabilidad: TsrvContabilidad
DataType = datString
Size = 255
DictionaryEntry = 'Apuntes_SUBCUENTA'
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 255
DictionaryEntry = 'Apuntes_CONCEPTO'
end
item
Name = 'DOCUMENTO'
DataType = datString
Size = 255
end
item
Name = 'DEBE'
DataType = datCurrency
DictionaryEntry = 'Apuntes_DEBE'
end
item
Name = 'HABER'
DataType = datCurrency
DictionaryEntry = 'Apuntes_HABER'
end
item
Name = 'PUNTEADO'
DataType = datSmallInt
DictionaryEntry = 'Apuntes_PUNTEADO'
end>
end
item
@ -753,7 +768,6 @@ object srvContabilidad: TsrvContabilidad
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_CONT_CUENTAS_ID'
ServerAutoRefresh = True
DictionaryEntry = 'Cuentas_ID'
InPrimaryKey = True
end
@ -1355,18 +1369,100 @@ object srvContabilidad: TsrvContabilidad
Params = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_CONT_ASIENTOS_ID'
Value = ''
end
item
Name = 'FECHA_ASIENTO'
Value = ''
end
item
Name = 'ORDEN'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
ConnectionType = 'Interbase'
Default = True
TargetTable = 'CONT_ASIENTOS'
SQL =
'INSERT'#10' INTO CONT_ASIENTOS'#10' (ID, FECHA_ASIENTO, ORDEN)'#10' VAL' +
'UES'#10' (:ID, :FECHA_ASIENTO, :ORDEN)'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Insert_Asientos'
end
item
Params = <
item
Name = 'OLD_ID'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
ConnectionType = 'Interbase'
Default = True
TargetTable = 'CONT_ASIENTOS'
SQL = 'DELETE '#10' FROM'#10' CONT_ASIENTOS'#10' WHERE'#10' (ID = :OLD_ID)'
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Delete_Asientos'
end
item
Params = <
item
Name = 'FECHA_ASIENTO'
Value = ''
end
item
Name = 'ORDEN'
Value = ''
end
item
Name = 'OLD_ID'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
ConnectionType = 'Interbase'
Default = True
TargetTable = 'CONT_ASIENTOS'
SQL =
'UPDATE CONT_ASIENTOS'#10' SET '#10' FECHA_ASIENTO = :FECHA_ASIENTO, ' +
#10' ORDEN = :ORDEN'#10' WHERE'#10' (ID = :OLD_ID)'
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Update_Asientos'
end
item
Params = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_CONT_APUNTES_ID'
Value = ''
end
item
Name = 'ID_ASIENTO'
Value = ''
end
item
Name = 'ID_SUBCUENTA'
Value = ''
end
item
Name = 'CONCEPTO'
Value = ''
end
item
Name = 'PUNTEADO'
Name = 'DOCUMENTO'
Value = ''
end
item
@ -1378,15 +1474,7 @@ object srvContabilidad: TsrvContabilidad
Value = ''
end
item
Name = 'ID_FACTURA'
Value = ''
end
item
Name = 'ID_RECIBO'
Value = ''
end
item
Name = 'ID_SUBCUENTA'
Name = 'PUNTEADO'
Value = ''
end>
Statements = <
@ -1396,10 +1484,10 @@ object srvContabilidad: TsrvContabilidad
Default = True
TargetTable = 'CONT_APUNTES'
SQL =
'INSERT'#10' INTO CONT_APUNTES'#10' (ID, ID_ASIENTO, CONCEPTO, PUNTEA' +
'DO, DEBE, HABER, ID_FACTURA,'#10' ID_RECIBO, ID_SUBCUENTA)'#10' VAL' +
'UES'#10' (:ID, :ID_ASIENTO, :CONCEPTO, :PUNTEADO, :DEBE, :HABER, ' +
':ID_FACTURA,'#10' :ID_RECIBO, :ID_SUBCUENTA)'#10
'INSERT'#10' INTO CONT_APUNTES'#10' (ID, ID_ASIENTO, ID_SUBCUENTA, CO' +
'NCEPTO, DOCUMENTO, DEBE, HABER, PUNTEADO)'#10' VALUES'#10' (:ID, :ID' +
'_ASIENTO, :ID_SUBCUENTA, :CONCEPTO, :DOCUMENTO, :DEBE, :HABER, :' +
'PUNTEADO)'#10
StatementType = stSQL
ColumnMappings = <>
end>
@ -1426,11 +1514,11 @@ object srvContabilidad: TsrvContabilidad
item
Params = <
item
Name = 'ID'
Name = 'ID_ASIENTO'
Value = ''
end
item
Name = 'ID_ASIENTO'
Name = 'ID_SUBCUENTA'
Value = ''
end
item
@ -1438,7 +1526,7 @@ object srvContabilidad: TsrvContabilidad
Value = ''
end
item
Name = 'PUNTEADO'
Name = 'DOCUMENTO'
Value = ''
end
item
@ -1450,15 +1538,7 @@ object srvContabilidad: TsrvContabilidad
Value = ''
end
item
Name = 'ID_FACTURA'
Value = ''
end
item
Name = 'ID_RECIBO'
Value = ''
end
item
Name = 'ID_SUBCUENTA'
Name = 'PUNTEADO'
Value = ''
end
item
@ -1472,11 +1552,10 @@ object srvContabilidad: TsrvContabilidad
Default = True
TargetTable = 'CONT_APUNTES'
SQL =
'UPDATE CONT_APUNTES'#10' SET '#10' ID = :ID,'#10' ID_ASIENTO = :ID_AS' +
'IENTO, '#10' CONCEPTO = :CONCEPTO, '#10' PUNTEADO = :PUNTEADO, '#10' ' +
' DEBE = :DEBE, '#10' HABER = :HABER, '#10' ID_FACTURA = :ID_FACTU' +
'RA, '#10' ID_RECIBO = :ID_RECIBO, '#10' ID_SUBCUENTA = :ID_SUBCUEN' +
'TA'#10' WHERE'#10' (ID = :OLD_ID)'#10
'UPDATE CONT_APUNTES'#10' SET '#10' ID_ASIENTO = :ID_ASIENTO, '#10' ID' +
'_SUBCUENTA = :ID_SUBCUENTA, '#10' CONCEPTO = :CONCEPTO,'#10' DOCUM' +
'ENTO = :DOCUMENTO, '#10' DEBE = :DEBE, '#10' HABER = :HABER, '#10' ' +
'PUNTEADO = :PUNTEADO'#10' WHERE'#10' (ID = :OLD_ID)'#10
StatementType = stSQL
ColumnMappings = <>
end>
@ -1578,12 +1657,23 @@ object srvContabilidad: TsrvContabilidad
object bpApuntes: TDABusinessProcessor
Schema = schContabilidad
InsertCommandName = 'Insert_Apuntes'
DeleteCommandName = 'Insert_Apuntes'
DeleteCommandName = 'Delete_Apuntes'
UpdateCommandName = 'Update_Apuntes'
ReferencedDataset = 'Apuntes'
ProcessorOptions = [poPrepareCommands]
ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
UpdateMode = updWhereKeyOnly
Left = 248
Top = 192
end
object bpAsientos: TDABusinessProcessor
Schema = schContabilidad
InsertCommandName = 'Insert_Asientos'
DeleteCommandName = 'Delete_Asientos'
UpdateCommandName = 'Update_Asientos'
ReferencedDataset = 'Asientos'
ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
UpdateMode = updWhereKeyOnly
Left = 152
Top = 192
end
end

View File

@ -27,11 +27,11 @@ type
bpCuentas: TDABusinessProcessor;
bpSubCuentas: TDABusinessProcessor;
bpApuntes: TDABusinessProcessor;
bpAsientos: TDABusinessProcessor;
schContabilidad: TDASchema;
DataDictionary: TDADataDictionary;
procedure DARemoteServiceCreate(Sender: TObject);
procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject;
var aConnectionName: string);
procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject; var aConnectionName: string);
private
protected
end;

View File

@ -104,7 +104,12 @@ contains
uViewCuentasEspeciales in 'uViewCuentasEspeciales.pas' {frViewCuentasEspeciales: TFrame},
uEditorElegirCuentasEspeciales in 'uEditorElegirCuentasEspeciales.pas' {fEditorElegirCuentasEspeciales: TfEditorEjercicios},
uEditorElegirCuentas in 'uEditorElegirCuentas.pas' {fEditorElegirCuentas: TfEditorEjercicios},
uViewAsientos in 'uViewAsientos.pas' {frViewAsientos: TFrame},
uEditorAsientos in 'uEditorAsientos.pas' {fEditorAsientos: TfEditorAsientos};
uViewDiario in 'uViewDiario.pas' {frViewDiario: TFrame},
uEditorDiario in 'uEditorDiario.pas' {fEditorDiario: TfEditorEjercicios},
uViewApunte in 'uViewApunte.pas' {frViewApunte: TFrame},
uViewApuntes in 'uViewApuntes.pas' {frViewApuntes: TFrame},
uEditorAsiento in 'uEditorAsiento.pas' {fEditorAsiento: TfEditorEjercicios},
uEditorApunte in 'uEditorApunte.pas' {fEditorApunte: TfEditorEjercicios},
uEditorElegirSubCuentas in 'uEditorElegirSubCuentas.pas' {fEditorElegirSubCuentas: TfEditorEjercicios};
end.

View File

@ -98,7 +98,11 @@
<Form>frViewEpigrafes</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uEditorAsientos.pas">
<DCCReference Include="uEditorApunte.pas">
<Form>fEditorApunte</Form>
<DesignClass>TfEditorEjercicios</DesignClass>
</DCCReference>
<DCCReference Include="uEditorAsiento.pas">
<Form>fEditorAsiento</Form>
<DesignClass>TfEditorEjercicios</DesignClass>
</DCCReference>
@ -126,6 +130,10 @@
<Form>fEditorCuentasEspeciales</Form>
<DesignClass>TfEditorEjercicios</DesignClass>
</DCCReference>
<DCCReference Include="uEditorDiario.pas">
<Form>fEditorDiario</Form>
<DesignClass>TfEditorEjercicios</DesignClass>
</DCCReference>
<DCCReference Include="uEditorElegirBalances.pas">
<Form>fEditorElegirBalances</Form>
<DesignClass>TfEditorEjercicios</DesignClass>
@ -142,6 +150,10 @@
<Form>fEditorElegirEpigrafes</Form>
<DesignClass>TfEditorEjercicios</DesignClass>
</DCCReference>
<DCCReference Include="uEditorElegirSubCuentas.pas">
<Form>fEditorElegirSubCuentas</Form>
<DesignClass>TfEditorEjercicios</DesignClass>
</DCCReference>
<DCCReference Include="uEditorEpigrafe.pas">
<Form>fEditorEpigrafe</Form>
<DesignClass>TfEditorEjercicios</DesignClass>
@ -158,8 +170,12 @@
<Form>fEditorSubCuentas</Form>
<DesignClass>TfEditorEjercicios</DesignClass>
</DCCReference>
<DCCReference Include="uViewAsientos.pas">
<Form>frViewAsientos</Form>
<DCCReference Include="uViewApunte.pas">
<Form>frViewApunte</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewApuntes.pas">
<Form>frViewApuntes</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewBalances.pas">
@ -178,6 +194,10 @@
<Form>frViewCuentasEspeciales</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewDiario.pas">
<Form>frViewDiario</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewEpigrafe.pas">
<Form>frViewEpigrafe</Form>
<DesignClass>TFrame</DesignClass>

View File

@ -12,9 +12,8 @@ uses
uEditorCuentaEspecial, uEditorCuentasEspeciales, uEditorElegirCuentasEspeciales,
uEditorEpigrafe, uEditorElegirEpigrafes, uEditorEpigrafes,
uEditorCuenta, uEditorCuentas, uEditorElegirCuentas,
uEditorSubCuenta, uEditorSubCuentas,
// uEditorAsiento,
uEditorAsientos;
uEditorSubCuenta, uEditorSubCuentas, uEditorElegirSubCuentas,
uEditorAsiento, uEditorDiario, uEditorApunte;
procedure RegisterViews;
begin
@ -32,8 +31,10 @@ begin
EditorRegistry.RegisterClass(TfEditorElegirCuentas, 'EditorElegirCuentas');
EditorRegistry.RegisterClass(TfEditorSubCuentas, 'EditorSubCuentas');
EditorRegistry.RegisterClass(TfEditorSubCuenta, 'EditorSubCuenta');
// EditorRegistry.RegisterClass(TfEditorAsiento, 'EditorAsiento');
EditorRegistry.RegisterClass(TfEditorAsientos, 'EditorAsientos');
EditorRegistry.RegisterClass(TfEditorElegirSubCuentas, 'EditorElegirSubCuentas');
EditorRegistry.RegisterClass(TfEditorAsiento, 'EditorAsiento');
EditorRegistry.RegisterClass(TfEditorDiario, 'EditorDiario');
EditorRegistry.RegisterClass(TfEditorApunte, 'EditorApunte');
end;
procedure UnregisterViews;
@ -52,8 +53,10 @@ begin
EditorRegistry.UnRegisterClass(TfEditorElegirCuentas);
EditorRegistry.UnRegisterClass(TfEditorSubCuentas);
EditorRegistry.UnRegisterClass(TfEditorSubCuenta);
EditorRegistry.UnRegisterClass(TfEditorAsientos);
// EditorRegistry.UnRegisterClass(TfEditorAsiento);
EditorRegistry.UnRegisterClass(TfEditorElegirSubCuentas);
EditorRegistry.UnRegisterClass(TfEditorDiario);
EditorRegistry.UnRegisterClass(TfEditorAsiento);
EditorRegistry.UnRegisterClass(TfEditorApunte);
end;
end.

View File

@ -0,0 +1,144 @@
inherited fEditorApunte: TfEditorApunte
Left = 374
Top = 273
HorzScrollBar.Visible = False
VertScrollBar.Visible = False
Caption = 'Ficha de apunte'
ClientWidth = 632
Scaled = False
OnClose = CustomEditorClose
ExplicitWidth = 640
ExplicitHeight = 488
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 632
Caption = 'Apunte'
ExplicitWidth = 632
inherited Image1: TImage
Left = 605
Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00
00001C0806000000720DDF940000000970485973000017120000171201679FD2
520000000467414D410000B18E7CFB51930000020F4944415478DAE5D4DB2B04
511800F06FB659D7CD2D892816B984258992242129E5924BDEE49147FF81571E
9495072F44BB1EF69127CAA5DC436E895C4A92AC6CC48E9961EC3963C7EEEC65
CEAC6D5F7CF575E69C33F3FD3AA773861204014219D4FF02298AF2FAD2709B5E
B8BEBF0E18195B17A4C28A20C2FA8D16E059065EACF7F0FE6203FBAB986B9619
D0EB93A169D0E8757E7A6C089ED2BBC1643291814E4C2CF0EC13F3368FB0AE8E
5618DF0E27038381A1200283851181C1C414C191F6CC3F611DED2DA0D150E4E0
402515F0A56CACAF83C8A808A069DA0DF50B8EF65242437D1F11C0B13C701C87
DBA58555282E2B045A4B83D691AE685040578C6339585DDC8082923C0CC9D13F
83728CE378D858D981DC826C8CC9D189DD88C0C10F86151119BAB77D08593919
222843270F74EAC1AFCF2FBC126F181A3FDA3F85F4CC34097245A74EE2D4814A
18EA9F1D5F404A6A1284858779A0B3E789E42009869E2FCF6F203129016FA11C
9DBB4A26034931D691B73777101B1F8341396AB94D53064930C6FE21818F0F56
88D6454907C589CE5BB3C16C36BBFF3EE5605D6DAF072616E781E7C53196FD5D
1DEADB9E6D18D06A7F4FE73263C018AAEB17ACAAEC715FCD4F515F186ADFDFDE
1C975C23615B9A720953042BCA3A556168FB19C68EBF47E8A1AEDA0D53044B0D
ADAA30144EF038A6C60353048BF29B55614ED017A6086E32DD1048F8C2FC82A1
889083DF93D867F65E51168D0000000049454E44AE426082}
ExplicitLeft = 607
end
end
inherited TBXDock: TTBXDock
Width = 632
ExplicitWidth = 632
inherited tbxMain: TTBXToolbar
ExplicitWidth = 330
inherited TBXItem2: TTBXItem
Visible = False
end
inherited TBXItem5: TTBXItem
Visible = False
end
inherited TBXItem23: TTBXItem
Visible = False
end
inherited TBXItem3: TTBXItem
Visible = False
end
end
inherited tbxMenu: TTBXToolbar
DockPos = 0
ExplicitWidth = 632
inherited TBXSubmenuItem4: TTBXSubmenuItem
inherited TBXItem8: TTBXItem
Visible = False
end
inherited TBXSeparatorItem5: TTBXSeparatorItem
Visible = False
end
inherited TBXItem10: TTBXItem
Visible = False
end
inherited TBXItem21: TTBXItem
Visible = False
end
inherited TBXItem22: TTBXItem
Visible = False
end
inherited TBXItem9: TTBXItem
Visible = False
end
end
inherited TBXSubmenuItem1: TTBXSubmenuItem
inherited TBXItem32: TTBXItem
Visible = False
end
inherited TBXItem31: TTBXItem
Visible = False
end
inherited TBXSeparatorItem13: TTBXSeparatorItem
Visible = False
end
end
end
end
inherited pgPaginas: TPageControl
Width = 632
ExplicitWidth = 632
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 624
ExplicitHeight = 338
end
end
inherited StatusBar: TJvStatusBar
Width = 632
Panels = <
item
Width = 200
end>
ExplicitWidth = 632
end
inherited EditorActionList: TActionList
Top = 128
end
inherited SmallImages: TPngImageList
Top = 112
end
inherited dsDataTable: TDADataSource [6]
Left = 168
Top = 120
end
inherited LargeImages: TPngImageList [7]
Top = 112
end
inherited JvFormStorage: TJvFormStorage [8]
end
object dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList
Left = 320
Top = 248
object dxLayoutOfficeLookAndFeel1: TdxLayoutOfficeLookAndFeel
GroupOptions.CaptionOptions.Font.Charset = DEFAULT_CHARSET
GroupOptions.CaptionOptions.Font.Color = clWindowText
GroupOptions.CaptionOptions.Font.Height = -11
GroupOptions.CaptionOptions.Font.Name = 'Tahoma'
GroupOptions.CaptionOptions.Font.Style = [fsBold]
GroupOptions.CaptionOptions.TextColor = clHighlight
GroupOptions.CaptionOptions.UseDefaultFont = False
end
end
end

View File

@ -0,0 +1,211 @@
unit uEditorApunte;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uEditorDBItem, ToolWin, ComCtrls, JvExControls, JvComponent,
uBizApuntes, JvNavigationPane, ActnList,
uEditorBase, StdActns, TB2Dock, TB2Toolbar, TBX, ImgList, PngImageList,
TB2Item, uEditorItem, DB, uDADataTable, uEditorDBBase, JvFormAutoSize,
uDAScriptingProvider, uDACDSDataTable, StdCtrls, pngimage, ExtCtrls,
TBXDkPanels, JvButton, AppEvnts, uCustomView, uViewBase,
JvAppStorage, JvAppRegistryStorage, JvFormPlacement, JvComponentBase,
uViewApuntes, uIEditorApunte, uApuntesController, JvExComCtrls,
JvStatusBar, dxLayoutLookAndFeels, uDAInterfaces, uViewDetallesGenerico,
cxDropDownEdit, cxCalendar, cxDBEdit, dxLayoutControl,
cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxSpinEdit, cxControls,
uViewApunte;
type
TfEditorApunte = class(TfEditorDBItem, IEditorApunte)
dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList;
dxLayoutOfficeLookAndFeel1: TdxLayoutOfficeLookAndFeel;
procedure FormShow(Sender: TObject);
procedure dsDataTableDataChange(Sender: TObject; Field: TField);
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
protected
FController : IApuntesController;
FApunte: IBizApunte;
FViewApunte : IViewApunte;
function GetController : IApuntesController;
procedure SetController (const Value : IApuntesController); virtual;
function GetApunte: IBizApunte; virtual;
procedure SetApunte(const Value: IBizApunte); virtual;
function GetViewApunte: IViewApunte;
procedure SetViewApunte(const Value: IViewApunte);
property ViewApunte: IViewApunte read GetViewApunte write SetViewApunte;
procedure GuardarInterno; override;
procedure EliminarInterno; override;
procedure PonerTitulos(const ATitulo: string = ''); override;
//Si queremos crear otra vista para el editor heredado solo tendriamos que
//sobreescribir este metodo
procedure AsignarVista; virtual;
public
property Apunte: IBizApunte read GetApunte write SetApunte;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
implementation
{$R *.dfm}
uses
uCustomEditor, uDataModuleBase, uFactuGES_App;
function ShowEditorApunte (ABizObject : TDADataTableRules): TModalResult;
var
AEditor: TfEditorApunte;
begin
AEditor := TfEditorApunte.Create(Application);
try
AEditor.Apunte := (ABizObject as IBizApunte);
Result := AEditor.ShowModal;
finally
AEditor.Release;
end;
end;
{
******************************* TfEditorApunte *******************************
}
function TfEditorApunte.GetApunte: IBizApunte;
begin
Result := FApunte;
end;
function TfEditorApunte.GetController: IApuntesController;
begin
Result := FController;
end;
function TfEditorApunte.GetViewApunte: IViewApunte;
begin
Result := FViewApunte;
end;
procedure TfEditorApunte.GuardarInterno;
begin
inherited;
FController.Guardar(FApunte);
Modified := False;
end;
procedure TfEditorApunte.PonerTitulos(const ATitulo: string);
var
FTitulo : String;
begin
if Assigned(Apunte) then
begin
if Apunte.EsNuevo then
FTitulo := 'Nueva Apunte - ' + AppFactuGES.EjercicioActivo.NOMBRE
else
FTitulo := 'Apunte' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE; // + ' - ' + Apunte.DESCRIPCION;
end;
inherited PonerTitulos(FTitulo);
end;
procedure TfEditorApunte.SetApunte(const Value: IBizApunte);
begin
FApunte := Value;
dsDataTable.DataTable := FApunte.DataTable;
if Assigned(FViewApunte) and Assigned(Apunte) then
FViewApunte.Apunte := Apunte;
end;
procedure TfEditorApunte.SetController(const Value: IApuntesController);
begin
FController := Value;
// if Assigned(ViewApunte) then
// ViewApunte.Controller := FController;
end;
procedure TfEditorApunte.SetViewApunte(const Value: IViewApunte);
begin
FViewApunte := Value;
if Assigned(FViewApunte) and Assigned(Apunte) then
FViewApunte.Apunte := Apunte;
end;
procedure TfEditorApunte.FormShow(Sender: TObject);
begin
inherited;
// if not Assigned(FViewApunte) then
// raise Exception.Create('No hay ninguna vista asignada');
if not Assigned(Apunte) then
raise Exception.Create('No hay ningún almacén asignado');
Apunte.DataTable.Active := True;
end;
destructor TfEditorApunte.Destroy;
begin
// Utilizar mejor OnClose;
inherited;
end;
procedure TfEditorApunte.AsignarVista;
var
AViewApunte: TfrViewApunte;
begin
AViewApunte := TfrViewApunte.create(Self);
with AViewApunte do
begin
Parent := pagGeneral;
Align := alClient;
// dxLayoutControlApunte.LookAndFeel := dxLayoutOfficeLookAndFeel1;
end;
ViewApunte := AViewApunte;
end;
constructor TfEditorApunte.Create(AOwner: TComponent);
begin
inherited;
FController := TApuntesController.Create;
pgPaginas.ActivePageIndex := 0;
AsignarVista;
end;
procedure TfEditorApunte.CustomEditorClose(Sender: TObject;
var Action: TCloseAction);
begin
inherited;
dsDataTable.DataTable := NIL;
FController := Nil;
FViewApunte := NIL;
FApunte := NIL;
end;
procedure TfEditorApunte.dsDataTableDataChange(Sender: TObject;
Field: TField);
begin
inherited;
if Assigned(FApunte) and (not (FApunte.DataTable.Fetching) or
not (FApunte.DataTable.Opening) or not (FApunte.DataTable.Closing)) then
PonerTitulos;
end;
procedure TfEditorApunte.EliminarInterno;
begin
if (Application.MessageBox('¿Desea borrar esta Apunte?', 'Atención', MB_YESNO) = IDYES) then
begin
inherited;
if not FController.Eliminar(FApunte) then
actRefrescar.Execute;
end;
end;
end.

View File

@ -0,0 +1,270 @@
inherited fEditorAsiento: TfEditorAsiento
Left = 374
Top = 273
HorzScrollBar.Visible = False
VertScrollBar.Visible = False
Caption = 'Ficha de asiento'
ClientWidth = 632
Scaled = False
OnClose = CustomEditorClose
ExplicitWidth = 640
ExplicitHeight = 488
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 632
Caption = 'Asiento'
ExplicitWidth = 632
inherited Image1: TImage
Left = 605
Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00
00001C0806000000720DDF940000000970485973000017120000171201679FD2
520000000467414D410000B18E7CFB51930000020F4944415478DAE5D4DB2B04
511800F06FB659D7CD2D892816B984258992242129E5924BDEE49147FF81571E
9495072F44BB1EF69127CAA5DC436E895C4A92AC6CC48E9961EC3963C7EEEC65
CEAC6D5F7CF575E69C33F3FD3AA773861204014219D4FF02298AF2FAD2709B5E
B8BEBF0E18195B17A4C28A20C2FA8D16E059065EACF7F0FE6203FBAB986B9619
D0EB93A169D0E8757E7A6C089ED2BBC1643291814E4C2CF0EC13F3368FB0AE8E
5618DF0E27038381A1200283851181C1C414C191F6CC3F611DED2DA0D150E4E0
402515F0A56CACAF83C8A808A069DA0DF50B8EF65242437D1F11C0B13C701C87
DBA58555282E2B045A4B83D691AE685040578C6339585DDC8082923C0CC9D13F
83728CE378D858D981DC826C8CC9D189DD88C0C10F86151119BAB77D08593919
222843270F74EAC1AFCF2FBC126F181A3FDA3F85F4CC34097245A74EE2D4814A
18EA9F1D5F404A6A1284858779A0B3E789E42009869E2FCF6F203129016FA11C
9DBB4A26034931D691B73777101B1F8341396AB94D53064930C6FE21818F0F56
88D6454907C589CE5BB3C16C36BBFF3EE5605D6DAF072616E781E7C53196FD5D
1DEADB9E6D18D06A7F4FE73263C018AAEB17ACAAEC715FCD4F515F186ADFDFDE
1C975C23615B9A720953042BCA3A556168FB19C68EBF47E8A1AEDA0D53044B0D
ADAA30144EF038A6C60353048BF29B55614ED017A6086E32DD1048F8C2FC82A1
889083DF93D867F65E51168D0000000049454E44AE426082}
ExplicitLeft = 607
end
end
inherited TBXDock: TTBXDock
Width = 632
ExplicitWidth = 632
inherited tbxMain: TTBXToolbar
ExplicitWidth = 330
inherited TBXItem2: TTBXItem
Visible = False
end
inherited TBXItem5: TTBXItem
Visible = False
end
inherited TBXItem23: TTBXItem
Visible = False
end
inherited TBXItem3: TTBXItem
Visible = False
end
end
inherited tbxMenu: TTBXToolbar
DockPos = 0
ExplicitWidth = 632
inherited TBXSubmenuItem4: TTBXSubmenuItem
inherited TBXItem8: TTBXItem
Visible = False
end
inherited TBXSeparatorItem5: TTBXSeparatorItem
Visible = False
end
inherited TBXItem10: TTBXItem
Visible = False
end
inherited TBXItem21: TTBXItem
Visible = False
end
inherited TBXItem22: TTBXItem
Visible = False
end
inherited TBXItem9: TTBXItem
Visible = False
end
end
inherited TBXSubmenuItem1: TTBXSubmenuItem
inherited TBXItem32: TTBXItem
Visible = False
end
inherited TBXItem31: TTBXItem
Visible = False
end
inherited TBXSeparatorItem13: TTBXSeparatorItem
Visible = False
end
end
end
end
inherited pgPaginas: TPageControl
Width = 632
ExplicitWidth = 632
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 624
ExplicitHeight = 338
object dxLayoutControl1: TdxLayoutControl
Left = 0
Top = 0
Width = 624
Height = 338
Align = alClient
TabOrder = 0
AutoContentSizes = [acsWidth, acsHeight]
DesignSize = (
624
338)
object edtOrden: TcxDBSpinEdit
Left = 49
Top = 10
AutoSize = False
DataBinding.DataField = 'ORDEN'
DataBinding.DataSource = dsDataTable
ParentFont = False
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = '0'
Properties.ImmediatePost = True
Properties.MaxValue = 100.000000000000000000
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.Font.Charset = DEFAULT_CHARSET
Style.Font.Color = clWindowText
Style.Font.Height = -11
Style.Font.Name = 'Tahoma'
Style.Font.Style = []
Style.HotTrack = False
Style.LookAndFeel.NativeStyle = True
Style.TextColor = clWindowText
Style.ButtonStyle = bts3D
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 0
Height = 21
Width = 168
end
object edtFecha: TcxDBDateEdit
Left = 361
Top = 10
Anchors = [akLeft, akTop, akRight]
DataBinding.DataField = 'FECHA_ASIENTO'
DataBinding.DataSource = dsDataTable
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.Color = clInfoBk
Style.HotTrack = False
Style.LookAndFeel.NativeStyle = True
Style.Shadow = False
Style.ButtonStyle = bts3D
Style.ButtonTransparency = ebtNone
Style.PopupBorderStyle = epbsFrame3D
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 1
Width = 158
end
object dxLayoutControl1Group_Root: TdxLayoutGroup
ShowCaption = False
Hidden = True
LayoutDirection = ldHorizontal
ShowBorder = False
object dxLayoutControl1Item1: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient
Caption = 'Orden:'
Control = edtOrden
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item2: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient
Caption = 'Fecha:'
Control = edtFecha
ControlOptions.ShowBorder = False
end
end
end
end
object pagApuntes: TTabSheet
Caption = 'Apuntes'
ImageIndex = 1
inline frViewApuntes1: TfrViewApuntes
Left = 0
Top = 0
Width = 624
Height = 338
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitWidth = 624
ExplicitHeight = 338
inherited cxGrid: TcxGrid
Width = 624
Height = 313
ExplicitWidth = 624
ExplicitHeight = 313
inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = <
item
Format = '0 ejercicios'
Kind = skCount
Column = frViewApuntes1.cxGridViewID_ASIENTO
end>
end
end
inherited ToolBar1: TToolBar
Width = 624
ExplicitWidth = 624
end
end
end
end
inherited StatusBar: TJvStatusBar
Width = 632
Panels = <
item
Width = 200
end>
ExplicitWidth = 632
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]
Top = 112
end
inherited JvFormStorage: TJvFormStorage [8]
end
inherited StatusBarImages: TPngImageList
Left = 24
Top = 208
end
object dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList
Left = 320
Top = 248
object dxLayoutOfficeLookAndFeel1: TdxLayoutOfficeLookAndFeel
GroupOptions.CaptionOptions.Font.Charset = DEFAULT_CHARSET
GroupOptions.CaptionOptions.Font.Color = clWindowText
GroupOptions.CaptionOptions.Font.Height = -11
GroupOptions.CaptionOptions.Font.Name = 'Tahoma'
GroupOptions.CaptionOptions.Font.Style = [fsBold]
GroupOptions.CaptionOptions.TextColor = clHighlight
GroupOptions.CaptionOptions.UseDefaultFont = False
end
end
end

View File

@ -0,0 +1,232 @@
unit uEditorAsiento;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uEditorDBItem, ToolWin, ComCtrls, JvExControls, JvComponent,
uBizAsientos, JvNavigationPane, ActnList,
uEditorBase, StdActns, TB2Dock, TB2Toolbar, TBX, ImgList, PngImageList,
TB2Item, uEditorItem, DB, uDADataTable, uEditorDBBase, JvFormAutoSize,
uDAScriptingProvider, uDACDSDataTable, StdCtrls, pngimage, ExtCtrls,
TBXDkPanels, JvButton, AppEvnts, uCustomView, uViewBase,
JvAppStorage, JvAppRegistryStorage, JvFormPlacement, JvComponentBase,
uIEditorAsiento, uAsientosController, JvExComCtrls,
JvStatusBar, dxLayoutLookAndFeels, uDAInterfaces, uViewDetallesGenerico,
uViewApuntes, cxDropDownEdit, cxCalendar, cxDBEdit, dxLayoutControl,
cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxSpinEdit, cxControls, DBCtrls;
type
TfEditorAsiento = class(TfEditorDBItem, IEditorAsiento)
dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList;
dxLayoutOfficeLookAndFeel1: TdxLayoutOfficeLookAndFeel;
pagApuntes: TTabSheet;
frViewApuntes1: TfrViewApuntes;
dxLayoutControl1Group_Root: TdxLayoutGroup;
dxLayoutControl1: TdxLayoutControl;
dxLayoutControl1Item1: TdxLayoutItem;
edtOrden: TcxDBSpinEdit;
dxLayoutControl1Item2: TdxLayoutItem;
edtFecha: TcxDBDateEdit;
procedure FormShow(Sender: TObject);
procedure dsDataTableDataChange(Sender: TObject; Field: TField);
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
protected
FController : IAsientosController;
FAsiento: IBizAsiento;
// FViewAsiento : IViewAsiento;
function GetController : IAsientosController;
procedure SetController (const Value : IAsientosController); virtual;
function GetAsiento: IBizAsiento; virtual;
procedure SetAsiento(const Value: IBizAsiento); virtual;
// function GetViewAsiento: IViewAsiento;
// procedure SetViewAsiento(const Value: IViewAsiento);
// property ViewAsiento: IViewAsiento read GetViewAsiento write SetViewAsiento;
procedure GuardarInterno; override;
procedure EliminarInterno; override;
procedure PonerTitulos(const ATitulo: string = ''); override;
//Si queremos crear otra vista para el editor heredado solo tendriamos que
//sobreescribir este metodo
// procedure AsignarVista; virtual;
public
property Asiento: IBizAsiento read GetAsiento write SetAsiento;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
implementation
{$R *.dfm}
uses
uCustomEditor, uDataModuleBase, uFactuGES_App;
function ShowEditorAsiento (ABizObject : TDADataTableRules): TModalResult;
var
AEditor: TfEditorAsiento;
begin
AEditor := TfEditorAsiento.Create(Application);
try
AEditor.Asiento := (ABizObject as IBizAsiento);
Result := AEditor.ShowModal;
finally
AEditor.Release;
end;
end;
{
******************************* TfEditorAsiento *******************************
}
function TfEditorAsiento.GetAsiento: IBizAsiento;
begin
Result := FAsiento;
end;
function TfEditorAsiento.GetController: IAsientosController;
begin
Result := FController;
end;
{
function TfEditorAsiento.GetViewAsiento: IViewAsiento;
begin
Result := FViewAsiento;
end;
}
procedure TfEditorAsiento.GuardarInterno;
begin
inherited;
FController.Guardar(FAsiento);
Modified := False;
end;
procedure TfEditorAsiento.PonerTitulos(const ATitulo: string);
var
FTitulo : String;
begin
if Assigned(Asiento) then
begin
if Asiento.EsNuevo then
FTitulo := 'Nueva Asiento - ' + AppFactuGES.EjercicioActivo.NOMBRE
else
FTitulo := 'Asiento' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE; // + ' - ' + Asiento.DESCRIPCION;
end;
inherited PonerTitulos(FTitulo);
end;
procedure TfEditorAsiento.SetAsiento(const Value: IBizAsiento);
begin
FAsiento := Value;
if Assigned(FAsiento) then
begin
dsDataTable.DataTable := FAsiento.DataTable;
frViewApuntes1.Apuntes := FAsiento.Apuntes
end
else
begin
dsDataTable.DataTable := Nil;
frViewApuntes1.Apuntes := Nil;
end;
// if Assigned(FViewAsiento) and Assigned(Asiento) then
// FViewAsiento.Asiento := Asiento;
end;
procedure TfEditorAsiento.SetController(const Value: IAsientosController);
begin
FController := Value;
// if Assigned(ViewAsiento) then
// ViewAsiento.Controller := FController;
end;
{
procedure TfEditorAsiento.SetViewAsiento(const Value: IViewAsiento);
begin
FViewAsiento := Value;
if Assigned(FViewAsiento) and Assigned(Asiento) then
FViewAsiento.Asiento := Asiento;
end;
}
procedure TfEditorAsiento.FormShow(Sender: TObject);
begin
inherited;
// if not Assigned(FViewAsiento) then
// raise Exception.Create('No hay ninguna vista asignada');
if not Assigned(Asiento) then
raise Exception.Create('No hay ningún almacén asignado');
Asiento.DataTable.Active := True;
end;
destructor TfEditorAsiento.Destroy;
begin
// Utilizar mejor OnClose;
inherited;
end;
{
procedure TfEditorAsiento.AsignarVista;
var
AViewAsiento: TfrViewAsiento;
begin
AViewAsiento := TfrViewAsiento.create(Self);
with AViewAsiento do
begin
Parent := pagGeneral;
Align := alClient;
// dxLayoutControlAsiento.LookAndFeel := dxLayoutOfficeLookAndFeel1;
end;
ViewAsiento := AViewAsiento;
end;
}
constructor TfEditorAsiento.Create(AOwner: TComponent);
begin
inherited;
pgPaginas.ActivePageIndex := 0;
// AsignarVista;
end;
procedure TfEditorAsiento.CustomEditorClose(Sender: TObject; var Action: TCloseAction);
begin
inherited;
dsDataTable.DataTable := NIL;
// FViewAsiento := NIL;
FAsiento := NIL;
end;
procedure TfEditorAsiento.dsDataTableDataChange(Sender: TObject; Field: TField);
begin
inherited;
{
if Assigned(FAsiento) and (not (FAsiento.DataTable.Fetching) or
not (FAsiento.DataTable.Opening) or not (FAsiento.DataTable.Closing)) then
PonerTitulos;
}
end;
procedure TfEditorAsiento.EliminarInterno;
begin
if (Application.MessageBox('¿Desea borrar esta Asiento?', 'Atención', MB_YESNO) = IDYES) then
begin
inherited;
if not FController.Eliminar(FAsiento) then
actRefrescar.Execute;
end;
end;
end.

View File

@ -55,7 +55,7 @@ implementation
{$R *.dfm}
uses
uCustomEditor, uDataModuleBase;
uCustomEditor, uDataModuleBase, uFactuGES_App;
function ShowEditorCuenta (ABizObject : TDADataTableRules): TModalResult;
var
@ -102,9 +102,9 @@ begin
if Assigned(Cuenta) then
begin
if Cuenta.EsNuevo then
FTitulo := 'Nueva cuenta'
FTitulo := 'Nueva cuenta - ' + AppFactuGES.EjercicioActivo.NOMBRE
else
FTitulo := 'Cuenta' + ' - ' + Cuenta.DESCRIPCION;
FTitulo := 'Cuenta' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' - ' + Cuenta.DESCRIPCION;
end;
inherited PonerTitulos(FTitulo);

View File

@ -62,11 +62,14 @@ inherited fEditorCuentas: TfEditorCuentas
ParentFont = False
TabOrder = 3
ReadOnly = False
ExplicitLeft = -11
ExplicitTop = -150
ExplicitTop = 102
ExplicitWidth = 543
ExplicitHeight = 323
inherited cxGrid: TcxGrid
Width = 543
Height = 195
ExplicitWidth = 543
ExplicitHeight = 195
inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = <
item
@ -81,9 +84,12 @@ inherited fEditorCuentas: TfEditorCuentas
end
inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 543
ExplicitWidth = 543
inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 543
inherited dxLayoutControl1: TdxLayoutControl
Width = 543
ExplicitWidth = 543
inherited txtFiltroTodo: TcxTextEdit
ExplicitWidth = 273
Width = 273
@ -101,19 +107,24 @@ inherited fEditorCuentas: TfEditorCuentas
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 543
ExplicitWidth = 543
inherited tbxBotones: TTBXToolbar
Width = 533
ExplicitWidth = 533
end
end
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 297
ExplicitWidth = 554
ExplicitTop = 297
ExplicitWidth = 543
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 543
ExplicitWidth = 543
inherited TBXToolbar1: TTBXToolbar
Width = 533
ExplicitWidth = 533
end
end
end

View File

@ -1,12 +1,12 @@
inherited fEditorAsientos: TfEditorAsientos
inherited fEditorDiario: TfEditorDiario
Left = 489
Top = 325
Caption = 'Lista de epigrafes'
Caption = 'Libro de diario'
ExplicitHeight = 471
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
Caption = 'Lista de epigrafes'
Caption = 'Libro de diario'
inherited Image1: TImage
Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800
@ -48,7 +48,7 @@ inherited fEditorAsientos: TfEditorAsientos
ExplicitLeft = 275
end
end
inline frViewAsientos1: TfrViewAsientos [3]
inline frViewDiario1: TfrViewDiario [3]
Left = 0
Top = 102
Width = 543
@ -62,17 +62,20 @@ inherited fEditorAsientos: TfEditorAsientos
ParentFont = False
TabOrder = 3
ReadOnly = False
ExplicitLeft = -11
ExplicitTop = -150
ExplicitTop = 102
ExplicitWidth = 543
ExplicitHeight = 323
inherited cxGrid: TcxGrid
Width = 543
Height = 195
ExplicitWidth = 543
ExplicitHeight = 195
inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = <
item
Format = '0 ejercicios'
Kind = skCount
Column = frViewAsientos1.cxGridViewREF_SUBCUENTA
Column = frViewDiario1.cxGridViewREF_SUBCUENTA
end>
inherited cxGridViewID_ASIENTO: TcxGridDBColumn
IsCaptionAssigned = True
@ -81,52 +84,49 @@ inherited fEditorAsientos: TfEditorAsientos
end
inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 543
ExplicitWidth = 543
inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 543
inherited dxLayoutControl1: TdxLayoutControl
Width = 543
inherited txtFiltroTodo: TcxTextEdit
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
ExplicitWidth = 121
Width = 121
end
ExplicitWidth = 543
inherited edtFechaFinFiltro: TcxDateEdit
Left = 337
ExplicitLeft = 337
ExplicitWidth = 121
Width = 121
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 543
ExplicitWidth = 543
inherited tbxBotones: TTBXToolbar
Width = 533
ExplicitWidth = 533
end
end
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 297
ExplicitWidth = 554
ExplicitTop = 297
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 543
ExplicitWidth = 543
inherited TBXToolbar1: TTBXToolbar
Width = 533
ExplicitWidth = 533
end
end
end
inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink
ReportDocument.CreationDate = 39426.815642349540000000
ReportDocument.CreationDate = 39428.774937233790000000
BuiltInReportLink = True
end
end
inherited cxViewGridPopupMenu: TcxGridPopupMenu
PopupMenus = <
item
GridView = frViewAsientos1.cxGridView
GridView = frViewDiario1.cxGridView
HitTypes = [gvhtCell]
Index = 0
end>

View File

@ -0,0 +1,156 @@
unit uEditorDiario;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uEditorBase, ToolWin, ComCtrls, JvExControls, JvComponent,
JvNavigationPane, uViewDiario, uBizAsientos, ActnList, DBActns, uViewGrid,
Menus, uDataModuleBase, ImgList, PngImageList, TB2Dock, TB2Toolbar, TBX,
TB2Item, StdActns, TB2ExtItems, TBXExtItems, TB2MRU, DB, uDADataTable,
JvFormAutoSize, uDAScriptingProvider, uDACDSDataTable, JvAppStorage,
JvAppRegistryStorage, JvFormPlacement, ExtCtrls, uCustomView, uViewBase,
uViewBarraSeleccion, pngimage, uIEditorDiario, uEditorGridBase,
JvComponentBase, uViewGridBase, uAsientosController, JvExComCtrls,
JvStatusBar, uDAInterfaces, uViewEpigrafes, uBizDiario;
type
TfEditorDiario = class(TfEditorGridBase, IEditorDiario)
frViewDiario1: TfrViewDiario;
procedure FormShow(Sender: TObject);
private
FDiario: IBizDiario;
FController : IAsientosController;
protected
function GetDiario: IBizDiario;
procedure SetDiario(const Value: IBizDiario);
function GetController : IAsientosController; virtual;
procedure SetController (const Value : IAsientosController); virtual;
procedure NuevoInterno; override;
procedure EliminarInterno; override;
procedure ModificarInterno; override;
procedure DuplicarInterno; override;
public
procedure PonerTitulos(const ATitulo: string = ''); override;
property Diario: IBizDiario read GetDiario write SetDiario;
property Controller : IAsientosController read GetController write SetController;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
implementation
uses
uCustomEditor, uDataModuleUsuarios,
// uEditorEpigrafe,
uEditorDBBase, uFactuGES_App,
cxGrid, cxGridCustomTableView; //, uListaAsientos;
{$R *.dfm}
{
****************************** TfEditorAsientos *******************************
}
procedure TfEditorDiario.FormShow(Sender: TObject);
begin
inherited;
if not Assigned(ViewGrid) then
raise Exception.Create('No hay ninguna vista asignada');
if not Assigned(Diario) then
raise Exception.Create('No hay ningún Diario asignado');
Diario.DataTable.Active := True;
ViewGrid.GotoFirst;
end;
function TfEditorDiario.GetDiario: IBizDiario;
begin
Result := FDiario;
end;
function TfEditorDiario.GetController: IAsientosController;
begin
Result := FController;
end;
procedure TfEditorDiario.ModificarInterno;
begin
inherited;
FController.Ver(FController.Buscar(Diario.ID_ASIENTO));
end;
procedure TfEditorDiario.NuevoInterno;
begin
inherited;
FController.Ver(FController.Anadir);
end;
procedure TfEditorDiario.PonerTitulos(const ATitulo: string);
var
FTitulo : String;
begin
FTitulo := 'Lista de Asientos - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE;
inherited PonerTitulos(FTitulo);
end;
procedure TfEditorDiario.SetDiario(const Value: IBizDiario);
begin
FDiario := Value;
dsDataTable.DataTable := FDiario.DataTable;
if Assigned(ViewGrid) then
(ViewGrid as IViewDiario).Diario := Diario;
end;
procedure TfEditorDiario.SetController(const Value: IAsientosController);
begin
FController := Value;
end;
destructor TfEditorDiario.Destroy;
begin
FDiario := NIL;
inherited;
end;
procedure TfEditorDiario.DuplicarInterno;
var
AEpigrafe : IBizAsiento;
begin
AppFactuGES.ShowCapado;
{
inherited;
AEpigrafe := FController.Duplicar(Asientos);
try
FController.Ver(AEpigrafe);
finally
actRefrescar.Execute;
end;
}
end;
procedure TfEditorDiario.EliminarInterno;
begin
{
if (Application.MessageBox('¿Desea borrar este almacén?', 'Atención', MB_YESNO) = IDYES) then
begin
inherited;
//Para que en el caso de no poderse realizar la operación se refresquen
//los datos y no nos permita eliminar un registro a la segunda
if not FController.Eliminar(Asientos) then
actRefrescar.Execute;
end;
}
end;
constructor TfEditorDiario.Create(AOwner: TComponent);
begin
inherited;
ViewGrid := frViewDiario1; //CreateView(TfrViewAsientos) as IViewAsientos;
end;
end.

View File

@ -0,0 +1,256 @@
inherited fEditorElegirSubCuentas: TfEditorElegirSubCuentas
Caption = 'Seleccionar pedido de cliente'
ClientWidth = 656
ExplicitWidth = 664
PixelsPerInch = 96
TextHeight = 13
object JvgWizardHeader1: TJvgWizardHeader [0]
Left = 0
Top = 27
Width = 656
Height = 60
CaptionFont.Charset = DEFAULT_CHARSET
CaptionFont.Color = clWindowText
CaptionFont.Height = -11
CaptionFont.Name = 'Tahoma'
CaptionFont.Style = [fsBold]
CommentFont.Charset = DEFAULT_CHARSET
CommentFont.Color = clWindowText
CommentFont.Height = -11
CommentFont.Name = 'Tahoma'
CommentFont.Style = []
SymbolFont.Charset = DEFAULT_CHARSET
SymbolFont.Color = clHighlightText
SymbolFont.Height = -35
SymbolFont.Name = 'Wingdings'
SymbolFont.Style = [fsBold]
Captions.Strings = (
'Seleccione el pedido de proveedor')
Comments.Strings = (
' ')
Gradient.FromColor = clHighlight
Gradient.ToColor = clWindow
Gradient.Active = False
Gradient.Orientation = fgdVertical
BufferedDraw = False
ExplicitTop = 16
end
inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 656
Caption = 'Lista de pedidos de proveedor'
Visible = False
ExplicitWidth = 656
inherited Image1: TImage
Left = 629
ExplicitLeft = 629
end
end
inherited TBXDock: TTBXDock
Top = 87
Width = 656
ExplicitTop = 87
ExplicitWidth = 656
inherited tbxMain: TTBXToolbar
Align = alRight
ExplicitWidth = 126
inherited TBXItem2: TTBXItem
Visible = False
end
inherited TBXItem5: TTBXItem
Visible = False
end
inherited TBXItem4: TTBXItem
Visible = False
end
inherited TBXItem6: TTBXItem
Visible = False
end
inherited TBXItem36: TTBXItem
Action = actAnchoAuto2
end
end
inherited tbxFiltro: TTBXToolbar
Left = 126
Top = 23
DockPos = 115
DockRow = 1
ExplicitLeft = 126
ExplicitTop = 23
inherited TBXItem34: TTBXItem
Action = actQuitarFiltro2
end
end
inherited tbxMenu: TTBXToolbar
ExplicitWidth = 656
end
end
inherited StatusBar: TJvStatusBar
Width = 656
Visible = False
ExplicitWidth = 656
end
inline frViewBarraSeleccion1: TfrViewBarraSeleccion [4]
Left = 0
Top = 376
Width = 656
Height = 49
Align = alBottom
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 4
ReadOnly = False
ExplicitTop = 376
ExplicitWidth = 656
inherited JvFooter1: TJvFooter
Width = 656
ExplicitWidth = 656
inherited bSeleccionar: TJvFooterBtn
Left = 444
ExplicitLeft = 444
end
inherited bCancelar: TJvFooterBtn
Left = 548
ExplicitLeft = 548
end
end
inherited BarraSeleccionActionList: TActionList
inherited actSeleccionar: TAction
OnExecute = frViewBarraSeleccion1actSeleccionarExecute
OnUpdate = frViewBarraSeleccion1actSeleccionarUpdate
end
inherited actCancelar: TAction
OnExecute = frViewBarraSeleccion1actCancelarExecute
end
end
end
inherited frViewSubCuentas1: TfrViewSubCuentas [5]
Top = 162
Width = 656
Height = 214
ExplicitTop = 162
ExplicitWidth = 656
ExplicitHeight = 214
inherited cxGrid: TcxGrid
Width = 656
Height = 86
ExplicitWidth = 656
ExplicitHeight = 86
inherited cxGridView: TcxGridDBTableView
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Position = spFooter
end>
DataController.Summary.FooterSummaryItems = <
item
Format = '0 pedidos'
Kind = skCount
end>
inherited cxGridViewID: TcxGridDBColumn
IsCaptionAssigned = True
end
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 656
ExplicitWidth = 656
inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 656
inherited dxLayoutControl1: TdxLayoutControl
Width = 656
ExplicitWidth = 656
inherited edtFechaFinFiltro: TcxDateEdit
Left = 294
ExplicitLeft = 294
ExplicitWidth = 421
Width = 421
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 656
ExplicitWidth = 656
inherited tbxBotones: TTBXToolbar
Width = 646
ExplicitWidth = 646
end
end
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 188
ExplicitTop = 188
ExplicitWidth = 656
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 656
ExplicitWidth = 656
inherited TBXToolbar1: TTBXToolbar
Width = 646
ExplicitWidth = 646
end
end
end
inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink
BuiltInReportLink = True
end
end
inherited cxViewGridPopupMenu: TcxGridPopupMenu
PopupMenus = <
item
GridView = frViewSubCuentas1.cxGridView
HitTypes = [gvhtCell]
Index = 0
end>
end
inherited dxPrintStyleManager1: TdxPrintStyleManager
inherited dxPrintStyleManager1Style1: TdxPSPrintStyle
BuiltInStyle = True
end
end
end
inherited EditorActionList: TActionList [8]
Left = 112
Top = 192
inherited actDuplicar: TAction
Visible = False
end
end
inherited dsDataTable: TDADataSource
Left = 8
Top = 192
end
inherited JvFormStorage: TJvFormStorage [12]
end
inherited GridPopupMenu: TPopupMenu
Left = 80
Top = 192
end
object EditorSeleccionActionList: TActionList
Images = SmallImages
Left = 152
Top = 192
object actBuscar2: TAction
Category = 'Buscar'
Caption = 'Buscar'
ImageIndex = 10
ShortCut = 114
end
object actQuitarFiltro2: TAction
Category = 'Buscar'
Caption = 'Quitar filtro y ver todo'
ImageIndex = 19
OnExecute = actQuitarFiltro2Execute
end
object actAnchoAuto2: TAction
Category = 'Ver'
Caption = 'Ancho autom'#225'tico'
ImageIndex = 21
OnExecute = actAnchoAuto2Execute
end
end
end

View File

@ -0,0 +1,126 @@
unit uEditorElegirSubCuentas;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, uDADataTable, Menus, JvAppStorage, JvAppRegistryStorage,
JvComponentBase, JvFormPlacement, ImgList, PngImageList, StdActns,
ActnList, uCustomView, uViewBase, uViewGridBase, uViewGrid,
ComCtrls, TB2ExtItems, TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar,
pngimage, ExtCtrls, JvExControls, JvComponent,
JvNavigationPane, uViewBarraSeleccion, JvgWizardHeader, StdCtrls,
uBizSubCuentas, uIEditorElegirSubCuentas,
JvExComCtrls, JvStatusBar, uEditorSubCuentas, uViewSubCuentas,
JSDialog, uDAInterfaces;
type
TfEditorElegirSubCuentas = class(TfEditorSubCuentas, IEditorElegirSubCuentas)
frViewBarraSeleccion1: TfrViewBarraSeleccion;
JvgWizardHeader1: TJvgWizardHeader;
EditorSeleccionActionList: TActionList;
actBuscar2: TAction;
actQuitarFiltro2: TAction;
actAnchoAuto2: TAction;
procedure frViewBarraSeleccion1actSeleccionarUpdate(Sender: TObject);
procedure frViewBarraSeleccion1actCancelarExecute(Sender: TObject);
procedure frViewBarraSeleccion1actSeleccionarExecute(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure actAnchoAuto2Execute(Sender: TObject);
procedure actQuitarFiltro2Execute(Sender: TObject);
protected
procedure SetMultiSelect (AValue : Boolean);
function GetMultiSelect : Boolean;
function GetSubCuentasSeleccionados: IBizSubCuenta;
procedure SetViewGrid(const Value: IViewGridBase); override;
procedure SetMensaje (const AValue: String);
function GetMensaje: String;
public
property Mensaje : String read GetMensaje write SetMensaje;
property SubCuentasSeleccionados: IBizSubCuenta read GetSubCuentasSeleccionados;
property MultiSelect : Boolean read GetMultiSelect write SetMultiSelect;
end;
implementation
uses
uEditorGridBase, cxGridCustomTableView, uIntegerListUtils, uDBSelectionListUtils,
uGridUtils, uEditorBase, uSubCuentasController;
{$R *.dfm}
{ TfEditorElegirSubCuentas }
procedure TfEditorElegirSubCuentas.actAnchoAuto2Execute(Sender: TObject);
begin
inherited;
actAnchoAuto.Execute;
end;
procedure TfEditorElegirSubCuentas.actQuitarFiltro2Execute(Sender: TObject);
begin
inherited;
actQuitarFiltro.Execute;
end;
procedure TfEditorElegirSubCuentas.FormShow(Sender: TObject);
begin
inherited;
EditorActionList.State := asSuspended;
end;
procedure TfEditorElegirSubCuentas.frViewBarraSeleccion1actCancelarExecute(
Sender: TObject);
begin
inherited;
Close;
end;
procedure TfEditorElegirSubCuentas.frViewBarraSeleccion1actSeleccionarExecute(
Sender: TObject);
begin
inherited;
ModalResult := mrOk;
end;
procedure TfEditorElegirSubCuentas.frViewBarraSeleccion1actSeleccionarUpdate(
Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := (ViewGrid._FocusedView.Controller.SelectedRowCount > 0)
end;
function TfEditorElegirSubCuentas.GetSubCuentasSeleccionados: IBizSubCuenta;
begin
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (SubCuentas as ISeleccionable).SelectedRecords);
// En SelectedRecords tengo los ID de las filas seleccionadas del grid
Result := (Controller as ISubCuentasController).ExtraerSeleccionados(SubCuentas) as IBizSubCuenta;
end;
function TfEditorElegirSubCuentas.GetMensaje: String;
begin
Result := JvgWizardHeader1.Comments.Text;
end;
function TfEditorElegirSubCuentas.GetMultiSelect: Boolean;
begin
Result := ViewGrid.MultiSelect;
end;
procedure TfEditorElegirSubCuentas.SetMensaje(const AValue: String);
begin
JvgWizardHeader1.Comments.Text := AValue;
end;
procedure TfEditorElegirSubCuentas.SetMultiSelect(AValue: Boolean);
begin
ViewGrid.MultiSelect := AValue;
end;
procedure TfEditorElegirSubCuentas.SetViewGrid(const Value: IViewGridBase);
begin
inherited;
ViewGrid.OnDblClick := frViewBarraSeleccion1.actSeleccionar.OnExecute;
end;
end.

View File

@ -55,7 +55,7 @@ implementation
{$R *.dfm}
uses
uCustomEditor, uDataModuleBase;
uCustomEditor, uDataModuleBase, uFactuGES_App;
function ShowEditorEpigrafe (ABizObject : TDADataTableRules): TModalResult;
var
@ -102,9 +102,9 @@ begin
if Assigned(Epigrafe) then
begin
if Epigrafe.EsNuevo then
FTitulo := 'Nuevo epígrafe'
FTitulo := 'Nuevo epígrafe - ' + AppFactuGES.EjercicioActivo.NOMBRE
else
FTitulo := 'Epígrafe' + ' - ' + Epigrafe.DESCRIPCION;
FTitulo := 'Epígrafe' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' - ' + Epigrafe.DESCRIPCION;
end;
inherited PonerTitulos(FTitulo);

View File

@ -2,7 +2,6 @@ inherited fEditorEpigrafes: TfEditorEpigrafes
Left = 489
Top = 325
Caption = 'Lista de epigrafes'
ExplicitWidth = 320
ExplicitHeight = 471
PixelsPerInch = 96
TextHeight = 13
@ -91,9 +90,19 @@ inherited fEditorEpigrafes: TfEditorEpigrafes
inherited dxLayoutControl1: TdxLayoutControl
Width = 543
ExplicitWidth = 543
inherited txtFiltroTodo: TcxTextEdit
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
ExplicitWidth = 121
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 337
ExplicitLeft = 337
ExplicitWidth = 121
Width = 121
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
@ -109,7 +118,7 @@ inherited fEditorEpigrafes: TfEditorEpigrafes
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 297
ExplicitTop = 297
ExplicitWidth = 128
ExplicitWidth = 543
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 543
ExplicitWidth = 543

View File

@ -55,7 +55,7 @@ implementation
{$R *.dfm}
uses
uCustomEditor, uDataModuleBase;
uCustomEditor, uDataModuleBase, uFactuGES_App;
function ShowEditorSubCuenta (ABizObject : TDADataTableRules): TModalResult;
var
@ -102,9 +102,9 @@ begin
if Assigned(SubCuenta) then
begin
if SubCuenta.EsNuevo then
FTitulo := 'Nuevo almacén'
FTitulo := 'Nuevo almacén - ' + AppFactuGES.EjercicioActivo.NOMBRE
else
FTitulo := 'Almacén' + ' - ' + SubCuenta.DESCRIPCION;
FTitulo := 'Almacén' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' - ' + SubCuenta.DESCRIPCION;
end;
inherited PonerTitulos(FTitulo);

View File

@ -62,12 +62,14 @@ inherited fEditorSubCuentas: TfEditorSubCuentas
ParentFont = False
TabOrder = 3
ReadOnly = False
ExplicitLeft = 312
ExplicitTop = -150
ExplicitWidth = 32
ExplicitTop = 102
ExplicitWidth = 543
ExplicitHeight = 323
inherited cxGrid: TcxGrid
Width = 543
Height = 195
ExplicitWidth = 543
ExplicitHeight = 195
inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = <
item
@ -82,9 +84,12 @@ inherited fEditorSubCuentas: TfEditorSubCuentas
end
inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 543
ExplicitWidth = 543
inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 543
inherited dxLayoutControl1: TdxLayoutControl
Width = 543
ExplicitWidth = 543
inherited txtFiltroTodo: TcxTextEdit
ExplicitWidth = 273
Width = 273
@ -102,18 +107,24 @@ inherited fEditorSubCuentas: TfEditorSubCuentas
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 543
ExplicitWidth = 543
inherited tbxBotones: TTBXToolbar
Width = 533
ExplicitWidth = 533
end
end
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 297
ExplicitTop = 297
ExplicitWidth = 543
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 543
ExplicitWidth = 543
inherited TBXToolbar1: TTBXToolbar
Width = 533
ExplicitWidth = 533
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,108 @@
unit uViewApunte;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uViewBase, ExtCtrls, StdCtrls, Buttons, DB, uDADataTable,
DBCtrls, Grids, DBGrids, uBizApuntes, uApuntesController, Mask, ComCtrls, uCustomView,
JvComponent, JvFormAutoSize, cxControls, cxContainer, cxEdit, cxTextEdit,
cxDBEdit, dxLayoutControl, uDAInterfaces, cxGraphics, cxDropDownEdit,
cxImageComboBox, cxMaskEdit, cxCalendar, ImgList, PngImageList, ActnList,
cxCurrencyEdit;
type
IViewApunte = interface(IViewBase)
['{F44F8AEF-CB9C-44D5-93DA-53D6AB6A2D29}']
// function GetController : IApuntesController;
// procedure SetController (const Value : IApuntesController);
// property Controller : IApuntesController read GetController write SetController;
function GetApunte: IBizApunte;
procedure SetApunte(const Value: IBizApunte);
property Apunte: IBizApunte read GetApunte write SetApunte;
end;
TfrViewApunte = class(TfrViewBase, IViewApunte)
DADataSource: TDADataSource;
layoutApunteGroup_Root: TdxLayoutGroup;
layoutApunte: TdxLayoutControl;
layoutApunteGroup1: TdxLayoutGroup;
layoutApunteItem3: TdxLayoutItem;
eConcepto: TcxDBTextEdit;
layoutApunteItem1: TdxLayoutItem;
eDocumento: TcxDBTextEdit;
layoutApunteItem2: TdxLayoutItem;
eRefSubCuenta: TcxDBTextEdit;
layoutApunteItem4: TdxLayoutItem;
BitBtn3: TBitBtn;
png: TActionList;
actSubCuenta: TAction;
LargeImages: TPngImageList;
layoutApunteItem5: TdxLayoutItem;
eSubCuenta: TcxDBTextEdit;
layoutApunteGroup3: TdxLayoutGroup;
layoutApunteItem6: TdxLayoutItem;
eDebe: TcxDBCurrencyEdit;
layoutApunteItem7: TdxLayoutItem;
eHaber: TcxDBCurrencyEdit;
layoutApunteGroup2: TdxLayoutGroup;
procedure actSubCuentaExecute(Sender: TObject);
protected
FApunte: IBizApunte;
// FController : IApuntesController;
function GetApunte: IBizApunte;
procedure SetApunte(const Value: IBizApunte);
// function GetController : IApuntesController;
// procedure SetController (const Value : IApuntesController);
public
// property Controller : IApuntesController read GetController write SetController;
property Apunte: IBizApunte read GetApunte write SetApunte;
end;
implementation
{$R *.dfm}
{ TfrViewApuntes }
{
******************************* TfrViewApuntes ********************************
}
procedure TfrViewApunte.actSubCuentaExecute(Sender: TObject);
begin
inherited;
// Controller.ElegirCuenta(Apunte);
end;
{
function TfrViewApunte.GetController: IApuntesController;
begin
Result := FController;
end;
}
function TfrViewApunte.GetApunte: IBizApunte;
begin
Result := FApunte;
end;
{
procedure TfrViewApunte.SetController(const Value: IApuntesController);
begin
FController := Value;
end;
}
procedure TfrViewApunte.SetApunte(const Value: IBizApunte);
begin
FApunte := Value;
if Assigned(FApunte) then
DADataSource.DataTable := FApunte.DataTable
else
DADataSource.DataTable := NIL;
end;
end.

View File

@ -0,0 +1,133 @@
inherited frViewApuntes: TfrViewApuntes
inherited cxGrid: TcxGrid
inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = <
item
Format = '0 ejercicios'
Kind = skCount
Column = cxGridViewREF_SUBCUENTA
end>
OptionsBehavior.PullFocusing = True
inherited cxGridViewID: TcxGridDBColumn
Visible = True
end
object cxGridViewID_ASIENTO: TcxGridDBColumn
DataBinding.FieldName = 'ID_ASIENTO'
end
object cxGridViewREF_SUBCUENTA: TcxGridDBColumn
Caption = 'Referencia'
DataBinding.FieldName = 'REF_SUBCUENTA'
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = True
Properties.OnButtonClick = cxGridViewREF_SUBCUENTAPropertiesButtonClick
SortIndex = 0
SortOrder = soAscending
Width = 119
end
object cxGridViewSUBCUENTA: TcxGridDBColumn
Caption = 'SubCuenta'
DataBinding.FieldName = 'SUBCUENTA'
PropertiesClassName = 'TcxTextEditProperties'
Properties.ReadOnly = True
Width = 86
end
object cxGridViewCONCEPTO: TcxGridDBColumn
Caption = 'Concepto'
DataBinding.FieldName = 'CONCEPTO'
PropertiesClassName = 'TcxTextEditProperties'
Width = 109
end
object cxGridViewDOCUMENTO: TcxGridDBColumn
DataBinding.FieldName = 'DOCUMENTO'
Width = 58
end
object cxGridViewDEBE: TcxGridDBColumn
Caption = 'Debe'
DataBinding.FieldName = 'DEBE'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.OnEditValueChanged = cxGridViewDEBEPropertiesEditValueChanged
Width = 59
end
object cxGridViewHABER: TcxGridDBColumn
Caption = 'Haber'
DataBinding.FieldName = 'HABER'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.OnEditValueChanged = cxGridViewHABERPropertiesEditValueChanged
Width = 58
end
end
end
inherited ToolBar1: TToolBar
inherited ToolButton1: TToolButton
Top = 0
ExplicitTop = 0
ExplicitWidth = 62
end
inherited ToolButton4: TToolButton
Top = 0
ExplicitTop = 0
ExplicitWidth = 74
end
inherited ToolButton5: TToolButton
Top = 0
ExplicitTop = 0
end
inherited ToolButton2: TToolButton
Top = 0
ExplicitTop = 0
ExplicitWidth = 67
end
inherited ToolButton6: TToolButton
Top = 0
ExplicitTop = 0
end
inherited ToolButton7: TToolButton
Top = 0
ExplicitTop = 0
ExplicitWidth = 117
end
end
inherited ActionListContenido: TActionList
object actElegirSubCuenta: TAction
Category = 'Operaciones'
Caption = 'Elegir Subcuenta'
OnExecute = actElegirSubCuentaExecute
end
end
object PngImageList: TPngImageList
PngImages = <
item
PngImage.Data = {
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
610000000970485973000017120000171201679FD2520000022E4944415478DA
8D93CF6BD36018C7BF6997A45DD376EA70CA18D31D44981741280C44119DA83D
C87619781A1EFD1BC49B2028B28353141111A43BE8CD934E65A8D4A1686B61B5
A31DD8CCBAFEDAACEDF226B389EFFB26CBCC54E6030FEFCB4B3E9FE79B9744B0
2C0B8220E0F7BA3AB2D75A282DE07F4AD82C60F0851B8F50530BF85EF98A6236
8DCCAB69B0B366BD8C95B24ACF4BB877FD226AFD635EC13A5CF99243A356869A
4D51F8398799EC476D09E5621E0F6F5EC6C8D938EE7C503604EB7055CDA34127
A8B90C3ECD3CE570A35AA2FD0DCB4B2AEE4F5CC29953C35094102667655B706D
7480C3F97412AD951AAAC502E6DEBCE47031974673B942BB8AA9DB57103F7D12
9D9D413ED4154C8C0BD6FCE7AD2F6C2816C3CE9E6E8862077C3E9F57307CE2FC
1F80655A308C35E844C7B3273318D8D78FE8B6282449A41211B7DE05FE2D304D
13866EC34433F0FAC55BF4EDE945A42B0C910A6459C6DD94F27781D936F964B2
AADB02DAEF9329ECEEED4138A240944548B2840773DBBD02B637596C6238205D
352AD175643E66B1A3BB0B0A15489204292061AAB0CB2B68D3C96B34367120BE
3AB2F96C01E1A8825028083920F35778BCD8B721387E6C9C42060788465C50A3
12B24AB0582C2110946907282C61BA3588442221B882C343E75C50A30093B104
84D849EAD53AFC1D7E0ECFFA631C76FF0526387470D4135977405B62A0D56CB2
C791891C71618FE0C0FEB873618623B2E33361FB679B4A340A1FF5C01E41928C
6DF9256E8659FD02D3B7960923D6946A0000000049454E44AE426082}
Name = 'PngImage0'
Background = clWindow
end>
Left = 160
Top = 32
Bitmap = {}
end
end

View File

@ -0,0 +1,166 @@
unit uViewApuntes;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uViewDetallesGenerico, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
cxDataStorage, cxEdit, DB, cxDBData, uDADataTable, cxGridLevel,
cxClasses, cxControls, cxGridCustomView, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxGrid, uBizApuntes, ActnList, Menus,
cxGridBandedTableView, cxGridDBBandedTableView, JvComponent,
JvFormAutoSize, PngImageList, ImgList, dxPSGlbl, dxPSUtl, dxPSEngn,
dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns,
dxPSEdgePatterns, cxIntlPrintSys3, dxPSCore, dxPScxCommon, dxPScxGridLnk,
cxGridCustomPopupMenu, cxGridPopupMenu, uViewFiltroBase, TB2Item, TBX,
TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, uDAInterfaces, cxCalendar,
cxImageComboBox, cxTextEdit, cxCurrencyEdit, ComCtrls, ToolWin, cxButtonEdit,
uApuntesController;
type
IViewApuntes = interface
['{BEEA820D-80E5-4B7F-8659-A9C37BAFECFF}']
function GetApuntes: IBizApunte;
procedure SetApuntes(const Value: IBizApunte);
property Apuntes: IBizApunte read GetApuntes write SetApuntes;
end;
TfrViewApuntes = class(TfrViewDetallesGenerico, IViewApuntes)
cxGridViewCONCEPTO: TcxGridDBColumn;
cxGridViewREF_SUBCUENTA: TcxGridDBColumn;
PngImageList: TPngImageList;
cxGridViewSUBCUENTA: TcxGridDBColumn;
cxGridViewDEBE: TcxGridDBColumn;
cxGridViewHABER: TcxGridDBColumn;
cxGridViewDOCUMENTO: TcxGridDBColumn;
cxGridViewID_ASIENTO: TcxGridDBColumn;
actElegirSubCuenta: TAction;
procedure cxGridViewIDCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
procedure cxGridViewREF_SUBCUENTAPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure actElegirSubCuentaExecute(Sender: TObject);
procedure cxGridViewDEBEPropertiesEditValueChanged(Sender: TObject);
procedure cxGridViewHABERPropertiesEditValueChanged(Sender: TObject);
protected
FApuntes: IBizApunte;
FController : IApuntesController;
function GetApuntes: IBizApunte; virtual;
procedure SetApuntes(const Value: IBizApunte); virtual;
procedure AnadirInterno; override;
procedure ModificarInterno; override;
public
property Apuntes: IBizApunte read GetApuntes write SetApuntes;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
implementation
{$R *.dfm}
{ TfrViewApuntes }
{
******************************* TfrViewApuntes *******************************
}
function TfrViewApuntes.GetApuntes: IBizApunte;
begin
Result := FApuntes;
end;
procedure TfrViewApuntes.ModificarInterno;
begin
inherited;
{
with TDireccionesContactoController.Create do
Ver((dsDetalles.DataTable) as IBizDireccionesContacto);
}
end;
procedure TfrViewApuntes.SetApuntes(const Value: IBizApunte);
begin
FApuntes := Value;
if Assigned(FApuntes) then
dsDetalles.DataTable := FApuntes.DataTable;
end;
procedure TfrViewApuntes.actElegirSubCuentaExecute(Sender: TObject);
begin
inherited;
FController.ElegirSubCuenta(Apuntes);
end;
procedure TfrViewApuntes.AnadirInterno;
begin
inherited;
// try
// with TApuntesController.Create do
// begin
// Anadir(Apuntes);
// Ver(Apuntes);
// end;
// finally
// if (dsDetalles.DataTable.State in dsEditModes) then
// dsDetalles.DataTable.Post;
// end;
end;
constructor TfrViewApuntes.Create(AOwner: TComponent);
begin
inherited;
FController := TApuntesController.Create;
end;
procedure TfrViewApuntes.cxGridViewDEBEPropertiesEditValueChanged(Sender: TObject);
begin
inherited;
{
//Tengo que hacer esto para que se haga un post del apunte y pueda ver el nuevo valor
if cxGridView.Controller.EditingController.IsEditing then
cxGridView.Controller.EditingController.Edit.PostEditValue;
FController.AsignarDEBE(Apuntes);
}
end;
procedure TfrViewApuntes.cxGridViewHABERPropertiesEditValueChanged(
Sender: TObject);
begin
inherited;
//Tengo que hacer esto para que se haga un post del apunte y pueda ver el nuevo valor
{ if cxGridView.Controller.EditingController.IsEditing then
cxGridView.Controller.EditingController.Edit.PostEditValue;
FController.AsignarHABER(Apuntes);
}
end;
procedure TfrViewApuntes.cxGridViewIDCustomDrawCell(
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
var
R : TRect;
begin
inherited;
{
R := AViewInfo.ContentBounds;
ACanvas.FillRect(R);
ACanvas.DrawImage(PngImageList, R.Left, R.Top, 0);
ADone := True;
}
end;
procedure TfrViewApuntes.cxGridViewREF_SUBCUENTAPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
inherited;
actElegirSubCuenta.Execute;
end;
destructor TfrViewApuntes.Destroy;
begin
FController := Nil;
inherited;
end;
end.

View File

@ -1,7 +1,7 @@
inherited frViewAsientos: TfrViewAsientos
inherited frViewDiario: TfrViewDiario
inherited cxGrid: TcxGrid
inherited cxGridView: TcxGridDBTableView
DataController.KeyFieldNames = 'ID'
DataController.KeyFieldNames = 'ID_ASIENTO;ID_APUNTE'
DataController.Summary.FooterSummaryItems = <
item
Format = '0 ejercicios'
@ -12,13 +12,16 @@ inherited frViewAsientos: TfrViewAsientos
object cxGridViewID_ASIENTO: TcxGridDBColumn
DataBinding.FieldName = 'ID_ASIENTO'
Visible = False
OnCustomDrawCell = cxGridViewID_ASIENTOCustomDrawCell
BestFitMaxWidth = 22
MinWidth = 22
Options.HorzSizing = False
Width = 22
IsCaptionAssigned = True
end
object cxGridViewID_APUNTE: TcxGridDBColumn
DataBinding.FieldName = 'ID_APUNTE'
Visible = False
end
object cxGridViewFECHA_ASIENTO: TcxGridDBColumn
DataBinding.FieldName = 'FECHA_ASIENTO'
end

View File

@ -1,4 +1,4 @@
unit uViewAsientos;
unit uViewDiario;
interface
@ -7,7 +7,7 @@ uses
Dialogs, uViewGrid, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
cxDataStorage, cxEdit, DB, cxDBData, uDADataTable, cxGridLevel,
cxClasses, cxControls, cxGridCustomView, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxGrid, uBizAsientos, ActnList, Menus,
cxGridTableView, cxGridDBTableView, cxGrid, uBizDiario, ActnList, Menus,
cxGridBandedTableView, cxGridDBBandedTableView, JvComponent,
JvFormAutoSize, PngImageList, ImgList, dxPSGlbl, dxPSUtl, dxPSEngn,
dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns,
@ -17,14 +17,14 @@ uses
cxImageComboBox, cxTextEdit, cxCurrencyEdit;
type
IViewAsientos = interface(IViewGrid)
IViewDiario = interface(IViewGrid)
['{5CA170E3-5552-4EF5-A2C0-02E4C9052045}']
function GetAsientos: IBizAsiento;
procedure SetAsientos(const Value: IBizAsiento);
property Asientos: IBizAsiento read GetAsientos write SetAsientos;
function GetDiario: IBizDiario;
procedure SetDiario(const Value: IBizDiario);
property Diario: IBizDiario read GetDiario write SetDiario;
end;
TfrViewAsientos = class(TfrViewGrid, IViewAsientos)
TfrViewDiario = class(TfrViewGrid, IViewDiario)
cxGridViewCONCEPTO: TcxGridDBColumn;
cxGridViewREF_SUBCUENTA: TcxGridDBColumn;
cxGridViewID_ASIENTO: TcxGridDBColumn;
@ -34,38 +34,39 @@ type
cxGridViewHABER: TcxGridDBColumn;
cxGridViewFECHA_ASIENTO: TcxGridDBColumn;
cxGridViewORDEN: TcxGridDBColumn;
procedure cxGridViewID_ASIENTOCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
cxGridViewID_APUNTE: TcxGridDBColumn;
procedure cxGridViewID_AsientoCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
protected
FAsientos: IBizAsiento;
function GetAsientos: IBizAsiento; virtual;
procedure SetAsientos(const Value: IBizAsiento); virtual;
FDiario: IBizDiario;
function GetDiario: IBizDiario; virtual;
procedure SetDiario(const Value: IBizDiario); virtual;
public
property Asientos: IBizAsiento read GetAsientos write SetAsientos;
property Diario: IBizDiario read GetDiario write SetDiario;
end;
implementation
{$R *.dfm}
{ TfrViewAsientos }
{ TfrViewDiario }
{
******************************* TfrViewAsientos *******************************
******************************* TfrViewDiario *******************************
}
function TfrViewAsientos.GetAsientos: IBizAsiento;
function TfrViewDiario.GetDiario: IBizDiario;
begin
Result := FAsientos;
Result := FDiario;
end;
procedure TfrViewAsientos.SetAsientos(const Value: IBizAsiento);
procedure TfrViewDiario.SetDiario(const Value: IBizDiario);
begin
FAsientos := Value;
if Assigned(FAsientos) then
dsDataSource.DataTable := FAsientos.DataTable;
FDiario := Value;
if Assigned(FDiario) then
dsDataSource.DataTable := FDiario.DataTable;
end;
procedure TfrViewAsientos.cxGridViewID_ASIENTOCustomDrawCell(
procedure TfrViewDiario.cxGridViewID_ASIENTOCustomDrawCell(
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
var