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', uCuentasController in 'uCuentasController.pas',
uSubCuentasController in 'uSubCuentasController.pas', uSubCuentasController in 'uSubCuentasController.pas',
uIEditorAsiento in 'View\uIEditorAsiento.pas', uIEditorAsiento in 'View\uIEditorAsiento.pas',
uIEditorAsientos in 'View\uIEditorAsientos.pas', uIEditorDiario in 'View\uIEditorDiario.pas',
uIEditorCuenta in 'View\uIEditorCuenta.pas', uIEditorCuenta in 'View\uIEditorCuenta.pas',
uIEditorCuentas in 'View\uIEditorCuentas.pas', uIEditorCuentas in 'View\uIEditorCuentas.pas',
uIEditorSubCuenta in 'View\uIEditorSubCuenta.pas', uIEditorSubCuenta in 'View\uIEditorSubCuenta.pas',
@ -71,6 +71,9 @@ contains
uIEditorElegirEpigrafes in 'View\uIEditorElegirEpigrafes.pas', uIEditorElegirEpigrafes in 'View\uIEditorElegirEpigrafes.pas',
uIEditorElegirBalances in 'View\uIEditorElegirBalances.pas', uIEditorElegirBalances in 'View\uIEditorElegirBalances.pas',
uIEditorElegirCuentasEspeciales in 'View\uIEditorElegirCuentasEspeciales.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. end.

View File

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

View File

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

View File

@ -210,45 +210,6 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
Left = 232 Left = 232
Top = 176 Top = 176
end 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 object tbl_Cuentas: TDAMemDataTable
RemoteUpdatesOptions = [] RemoteUpdatesOptions = []
Fields = < Fields = <
@ -257,7 +218,6 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
DataType = datAutoInc DataType = datAutoInc
GeneratorName = 'GEN_CONT_CUENTAS_ID' GeneratorName = 'GEN_CONT_CUENTAS_ID'
Required = True Required = True
ServerAutoRefresh = True
DictionaryEntry = 'Cuentas_ID' DictionaryEntry = 'Cuentas_ID'
InPrimaryKey = True InPrimaryKey = True
end end
@ -431,43 +391,6 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
DisplayLabel = 'Apuntes_ID_ASIENTO' DisplayLabel = 'Apuntes_ID_ASIENTO'
DictionaryEntry = 'Apuntes_ID_ASIENTO' DictionaryEntry = 'Apuntes_ID_ASIENTO'
end 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 item
Name = 'ID_SUBCUENTA' Name = 'ID_SUBCUENTA'
DataType = datInteger DataType = datInteger
@ -487,6 +410,36 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
Size = 255 Size = 255
DisplayLabel = 'Apuntes_SUBCUENTA' DisplayLabel = 'Apuntes_SUBCUENTA'
DictionaryEntry = '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> end>
Params = <> Params = <>
MasterMappingMode = mmWhere MasterMappingMode = mmWhere
@ -499,14 +452,53 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Apuntes' LogicalName = 'Apuntes'
IndexDefs = <> IndexDefs = <>
Left = 320 Left = 384
Top = 376 Top = 360
end end
object ds_Apuntes: TDADataSource object ds_Apuntes: TDADataSource
DataSet = tbl_Apuntes.Dataset DataSet = tbl_Apuntes.Dataset
DataTable = tbl_Apuntes DataTable = tbl_Apuntes
Left = 320 Left = 392
Top = 320 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 end
object tbl_Diario: TDAMemDataTable object tbl_Diario: TDAMemDataTable
RemoteUpdatesOptions = [] RemoteUpdatesOptions = []
@ -533,15 +525,24 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
DataType = datInteger DataType = datInteger
end end
item item
Name = 'SUBCUENTA' Name = 'REF_SUBCUENTA'
DataType = datString DataType = datString
Size = 15 Size = 15
end end
item
Name = 'ID_EJERCICIO'
DataType = datInteger
end
item item
Name = 'CONCEPTO' Name = 'CONCEPTO'
DataType = datString DataType = datString
Size = 255 Size = 255
end end
item
Name = 'DOCUMENTO'
DataType = datString
Size = 255
end
item item
Name = 'DEBE' Name = 'DEBE'
DataType = datCurrency DataType = datCurrency
@ -561,13 +562,13 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Diario' LogicalName = 'Diario'
IndexDefs = <> IndexDefs = <>
Left = 248 Left = 80
Top = 376 Top = 360
end end
object ds_Diario: TDADataSource object ds_Diario: TDADataSource
DataSet = tbl_Diario.Dataset DataSet = tbl_Diario.Dataset
DataTable = tbl_Diario DataTable = tbl_Diario
Left = 248 Left = 80
Top = 320 Top = 312
end end
end end

View File

@ -9,8 +9,8 @@ uses
uBizBalances, uBizCuentasEspeciales, uBizEpigrafes, uDARemoteDataAdapter, uBizBalances, uBizCuentasEspeciales, uBizEpigrafes, uDARemoteDataAdapter,
uDADataStreamer, uDAInterfaces, uRODynamicRequest, uBizCuentas, uBizSubCuentas, uDADataStreamer, uDAInterfaces, uRODynamicRequest, uBizCuentas, uBizSubCuentas,
uBizAsientos, uDABin2DataStreamer, uDAMemDataTable, uIDataModuleContabilidad, uBizAsientos, uDABin2DataStreamer, uDAMemDataTable, uIDataModuleContabilidad,
uDataModuleBase; uDataModuleBase, uBizApuntes, uBizDiario;
type type
TDataModuleContabilidad = class(TDataModuleBase, IDataModuleContabilidad) TDataModuleContabilidad = class(TDataModuleBase, IDataModuleContabilidad)
RORemoteService: TRORemoteService; RORemoteService: TRORemoteService;
@ -22,22 +22,27 @@ type
ds_CuentasEspeciales: TDADataSource; ds_CuentasEspeciales: TDADataSource;
tbl_Epigrafes: TDAMemDataTable; tbl_Epigrafes: TDAMemDataTable;
ds_Epigrafes: TDADataSource; ds_Epigrafes: TDADataSource;
tbl_Asientos: TDAMemDataTable;
ds_Asientos: TDADataSource;
tbl_Cuentas: TDAMemDataTable; tbl_Cuentas: TDAMemDataTable;
ds_Cuentas: TDADataSource; ds_Cuentas: TDADataSource;
tbl_SubCuentas: TDAMemDataTable; tbl_SubCuentas: TDAMemDataTable;
ds_SubCuentas: TDADataSource; ds_SubCuentas: TDADataSource;
tbl_Apuntes: TDAMemDataTable; tbl_Apuntes: TDAMemDataTable;
ds_Apuntes: TDADataSource; ds_Apuntes: TDADataSource;
tbl_Asientos: TDAMemDataTable;
ds_Asientos: TDADataSource;
tbl_Diario: TDAMemDataTable; tbl_Diario: TDAMemDataTable;
ds_Diario: TDADataSource; ds_Diario: TDADataSource;
procedure DAClientDataModuleCreate(Sender: TObject); procedure DAClientDataModuleCreate(Sender: TObject);
private
function _GetApuntes : IBizApunte;
public public
function GetEpigrafeItems: IBizEpigrafe; function GetEpigrafeItems: IBizEpigrafe;
function GetCuentaItems: IBizCuenta; function GetCuentaItems: IBizCuenta;
function GetSubCuentaItems: IBizSubCuenta; function GetSubCuentaItems: IBizSubCuenta;
function GetAsientoItems: IBizAsiento; function GetDiarioItems: IBizDiario;
function GetAsientoItem(const ID : Integer): IBizAsiento;
function GetCuentaEspecialItems: IBizCuentaEspecial; function GetCuentaEspecialItems: IBizCuentaEspecial;
function GetBalanceItems: IBizBalance; function GetBalanceItems: IBizBalance;
end; end;
@ -58,15 +63,49 @@ begin
RORemoteService.Message := dmConexion.Message; RORemoteService.Message := dmConexion.Message;
end; 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 var
ADiario : TDAMemDataTable; ADiario : TDAMemDataTable;
begin begin
ShowHourglassCursor; ShowHourglassCursor;
try try
ADiario := CloneDataTable(tbl_Diario); ADiario := CloneDataTable(tbl_Diario);
ADiario.BusinessRulesID := BIZ_CLIENT_ASIENTO; ADiario.BusinessRulesID := BIZ_CLIENT_DIARIO;
Result := (ADiario as IBizAsiento); Result := (ADiario as IBizDiario);
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
@ -142,4 +181,22 @@ begin
end; end;
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. end.

View File

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

View File

@ -58,10 +58,12 @@
<DCCReference Include="RemObjects_Core_D11.dcp" /> <DCCReference Include="RemObjects_Core_D11.dcp" />
<DCCReference Include="rtl.dcp" /> <DCCReference Include="rtl.dcp" />
<DCCReference Include="schContabilidadClient_Intf.pas" /> <DCCReference Include="schContabilidadClient_Intf.pas" />
<DCCReference Include="uBizApuntes.pas" />
<DCCReference Include="uBizAsientos.pas" /> <DCCReference Include="uBizAsientos.pas" />
<DCCReference Include="uBizBalances.pas" /> <DCCReference Include="uBizBalances.pas" />
<DCCReference Include="uBizCuentas.pas" /> <DCCReference Include="uBizCuentas.pas" />
<DCCReference Include="uBizCuentasEspeciales.pas" /> <DCCReference Include="uBizCuentasEspeciales.pas" />
<DCCReference Include="uBizDiario.pas" />
<DCCReference Include="uBizEpigrafes.pas" /> <DCCReference Include="uBizEpigrafes.pas" />
<DCCReference Include="uBizSubCuentas.pas" /> <DCCReference Include="uBizSubCuentas.pas" />
<DCCReference Include="vcl.dcp" /> <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 uses
uBizEpigrafes, uBizCuentasEspeciales, uBizBalances, uBizCuentas, uBizSubCuentas, uBizEpigrafes, uBizCuentasEspeciales, uBizBalances, uBizCuentas, uBizSubCuentas,
uBizAsientos; uBizAsientos, uBizDiario;
type type
IDataModuleContabilidad = interface(IInterface) IDataModuleContabilidad = interface(IInterface)
@ -14,7 +14,8 @@ type
function GetBalanceItems: IBizBalance; function GetBalanceItems: IBizBalance;
function GetCuentaItems: IBizCuenta; function GetCuentaItems: IBizCuenta;
function GetSubCuentaItems: IBizSubCuenta; function GetSubCuentaItems: IBizSubCuenta;
function GetAsientoItems: IBizAsiento; function GetDiarioItems: IBizDiario;
function GetAsientoItem(const ID : Integer): IBizAsiento;
end; end;
implementation implementation

View File

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

View File

@ -9,27 +9,29 @@ const
{ Delta rules ids { Delta rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_DiarioDelta = '{57F639D0-753A-4DD5-8553-4836768A68E8}'; RID_DiarioDelta = '{00C7E090-F36E-4A94-924F-81591065C131}';
RID_ApuntesDelta = '{74F9A357-E9A3-454C-8D87-86065C5B2C10}'; RID_ApuntesDelta = '{462A727F-D66D-4493-83A3-6CAF34F994D7}';
RID_AsientosDelta = '{291CBAA5-42AB-45D6-A5D0-59D694A8960E}'; RID_AsientosDelta = '{3A7F1EB1-7C5B-47BF-8DFA-4C86EFF0686E}';
RID_SubCuentasDelta = '{0C092B2B-41F6-4F70-B073-F1B68F9FA233}'; RID_SubCuentasDelta = '{E88435DC-570C-43D8-A8B0-004C1C775CF0}';
RID_CuentasDelta = '{152D2AD4-8B66-49AC-8D07-33C76A60CB85}'; RID_CuentasDelta = '{A26B4CE1-63F7-49F3-8A0A-F2840D95587C}';
RID_CuentasEspecialesDelta = '{0E63EE73-6CE9-4F33-9DB7-B02B1190DA20}'; RID_CuentasEspecialesDelta = '{089CB669-7830-4908-9344-42AEC93D8320}';
RID_EpigrafesDelta = '{2EB3D408-B118-4BC5-AABE-FAC7393086AB}'; RID_EpigrafesDelta = '{BFE5CD3F-52C2-400A-93A6-ACB723F7390E}';
RID_BalancesDelta = '{964A4194-0DF5-4CA7-A922-DB219CC96B39}'; RID_BalancesDelta = '{543250BB-1C2E-4448-AEA8-EDC23591A2ED}';
type type
{ IDiarioDelta } { IDiarioDelta }
IDiarioDelta = interface(IDiario) IDiarioDelta = interface(IDiario)
['{57F639D0-753A-4DD5-8553-4836768A68E8}'] ['{00C7E090-F36E-4A94-924F-81591065C131}']
{ Property getters and setters } { Property getters and setters }
function GetOldID_APUNTEValue : Integer; function GetOldID_APUNTEValue : Integer;
function GetOldID_ASIENTOValue : Integer; function GetOldID_ASIENTOValue : Integer;
function GetOldORDEN_ASIENTOValue : Integer; function GetOldORDEN_ASIENTOValue : Integer;
function GetOldFECHA_ASIENTOValue : DateTime; function GetOldFECHA_ASIENTOValue : DateTime;
function GetOldID_SUBCUENTAValue : Integer; function GetOldID_SUBCUENTAValue : Integer;
function GetOldSUBCUENTAValue : String; function GetOldREF_SUBCUENTAValue : String;
function GetOldID_EJERCICIOValue : Integer;
function GetOldCONCEPTOValue : String; function GetOldCONCEPTOValue : String;
function GetOldDOCUMENTOValue : String;
function GetOldDEBEValue : Currency; function GetOldDEBEValue : Currency;
function GetOldHABERValue : Currency; function GetOldHABERValue : Currency;
function GetOldPUNTEADOValue : SmallInt; function GetOldPUNTEADOValue : SmallInt;
@ -40,8 +42,10 @@ type
property OldORDEN_ASIENTO : Integer read GetOldORDEN_ASIENTOValue; property OldORDEN_ASIENTO : Integer read GetOldORDEN_ASIENTOValue;
property OldFECHA_ASIENTO : DateTime read GetOldFECHA_ASIENTOValue; property OldFECHA_ASIENTO : DateTime read GetOldFECHA_ASIENTOValue;
property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue; 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 OldCONCEPTO : String read GetOldCONCEPTOValue;
property OldDOCUMENTO : String read GetOldDOCUMENTOValue;
property OldDEBE : Currency read GetOldDEBEValue; property OldDEBE : Currency read GetOldDEBEValue;
property OldHABER : Currency read GetOldHABERValue; property OldHABER : Currency read GetOldHABERValue;
property OldPUNTEADO : SmallInt read GetOldPUNTEADOValue; property OldPUNTEADO : SmallInt read GetOldPUNTEADOValue;
@ -82,18 +86,30 @@ type
function GetOldID_SUBCUENTAIsNull: Boolean; virtual; function GetOldID_SUBCUENTAIsNull: Boolean; virtual;
procedure SetID_SUBCUENTAValue(const aValue: Integer); virtual; procedure SetID_SUBCUENTAValue(const aValue: Integer); virtual;
procedure SetID_SUBCUENTAIsNull(const aValue: Boolean); virtual; procedure SetID_SUBCUENTAIsNull(const aValue: Boolean); virtual;
function GetSUBCUENTAValue: String; virtual; function GetREF_SUBCUENTAValue: String; virtual;
function GetSUBCUENTAIsNull: Boolean; virtual; function GetREF_SUBCUENTAIsNull: Boolean; virtual;
function GetOldSUBCUENTAValue: String; virtual; function GetOldREF_SUBCUENTAValue: String; virtual;
function GetOldSUBCUENTAIsNull: Boolean; virtual; function GetOldREF_SUBCUENTAIsNull: Boolean; virtual;
procedure SetSUBCUENTAValue(const aValue: String); virtual; procedure SetREF_SUBCUENTAValue(const aValue: String); virtual;
procedure SetSUBCUENTAIsNull(const aValue: Boolean); 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 GetCONCEPTOValue: String; virtual;
function GetCONCEPTOIsNull: Boolean; virtual; function GetCONCEPTOIsNull: Boolean; virtual;
function GetOldCONCEPTOValue: String; virtual; function GetOldCONCEPTOValue: String; virtual;
function GetOldCONCEPTOIsNull: Boolean; virtual; function GetOldCONCEPTOIsNull: Boolean; virtual;
procedure SetCONCEPTOValue(const aValue: String); virtual; procedure SetCONCEPTOValue(const aValue: String); virtual;
procedure SetCONCEPTOIsNull(const aValue: Boolean); 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 GetDEBEValue: Currency; virtual;
function GetDEBEIsNull: Boolean; virtual; function GetDEBEIsNull: Boolean; virtual;
function GetOldDEBEValue: Currency; virtual; function GetOldDEBEValue: Currency; virtual;
@ -134,14 +150,22 @@ type
property ID_SUBCUENTAIsNull : Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull; property ID_SUBCUENTAIsNull : Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue; property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
property OldID_SUBCUENTAIsNull : Boolean read GetOldID_SUBCUENTAIsNull; property OldID_SUBCUENTAIsNull : Boolean read GetOldID_SUBCUENTAIsNull;
property SUBCUENTA : String read GetSUBCUENTAValue write SetSUBCUENTAValue; property REF_SUBCUENTA : String read GetREF_SUBCUENTAValue write SetREF_SUBCUENTAValue;
property SUBCUENTAIsNull : Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull; property REF_SUBCUENTAIsNull : Boolean read GetREF_SUBCUENTAIsNull write SetREF_SUBCUENTAIsNull;
property OldSUBCUENTA : String read GetOldSUBCUENTAValue; property OldREF_SUBCUENTA : String read GetOldREF_SUBCUENTAValue;
property OldSUBCUENTAIsNull : Boolean read GetOldSUBCUENTAIsNull; 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 CONCEPTO : String read GetCONCEPTOValue write SetCONCEPTOValue;
property CONCEPTOIsNull : Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull; property CONCEPTOIsNull : Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull;
property OldCONCEPTO : String read GetOldCONCEPTOValue; property OldCONCEPTO : String read GetOldCONCEPTOValue;
property OldCONCEPTOIsNull : Boolean read GetOldCONCEPTOIsNull; 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 DEBE : Currency read GetDEBEValue write SetDEBEValue;
property DEBEIsNull : Boolean read GetDEBEIsNull write SetDEBEIsNull; property DEBEIsNull : Boolean read GetDEBEIsNull write SetDEBEIsNull;
property OldDEBE : Currency read GetOldDEBEValue; property OldDEBE : Currency read GetOldDEBEValue;
@ -163,32 +187,30 @@ type
{ IApuntesDelta } { IApuntesDelta }
IApuntesDelta = interface(IApuntes) IApuntesDelta = interface(IApuntes)
['{74F9A357-E9A3-454C-8D87-86065C5B2C10}'] ['{462A727F-D66D-4493-83A3-6CAF34F994D7}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_ASIENTOValue : 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 GetOldID_SUBCUENTAValue : Integer;
function GetOldREF_SUBCUENTAValue : String; function GetOldREF_SUBCUENTAValue : String;
function GetOldSUBCUENTAValue : String; function GetOldSUBCUENTAValue : String;
function GetOldCONCEPTOValue : String;
function GetOldDOCUMENTOValue : String;
function GetOldDEBEValue : Currency;
function GetOldHABERValue : Currency;
function GetOldPUNTEADOValue : SmallInt;
{ Properties } { Properties }
property OldID : Integer read GetOldIDValue; property OldID : Integer read GetOldIDValue;
property OldID_ASIENTO : Integer read GetOldID_ASIENTOValue; 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 OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
property OldREF_SUBCUENTA : String read GetOldREF_SUBCUENTAValue; property OldREF_SUBCUENTA : String read GetOldREF_SUBCUENTAValue;
property OldSUBCUENTA : String read GetOldSUBCUENTAValue; 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; end;
{ TApuntesBusinessProcessorRules } { TApuntesBusinessProcessorRules }
@ -208,42 +230,6 @@ type
function GetOldID_ASIENTOIsNull: Boolean; virtual; function GetOldID_ASIENTOIsNull: Boolean; virtual;
procedure SetID_ASIENTOValue(const aValue: Integer); virtual; procedure SetID_ASIENTOValue(const aValue: Integer); virtual;
procedure SetID_ASIENTOIsNull(const aValue: Boolean); 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_SUBCUENTAValue: Integer; virtual;
function GetID_SUBCUENTAIsNull: Boolean; virtual; function GetID_SUBCUENTAIsNull: Boolean; virtual;
function GetOldID_SUBCUENTAValue: Integer; virtual; function GetOldID_SUBCUENTAValue: Integer; virtual;
@ -262,6 +248,36 @@ type
function GetOldSUBCUENTAIsNull: Boolean; virtual; function GetOldSUBCUENTAIsNull: Boolean; virtual;
procedure SetSUBCUENTAValue(const aValue: String); virtual; procedure SetSUBCUENTAValue(const aValue: String); virtual;
procedure SetSUBCUENTAIsNull(const aValue: Boolean); 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 } { Properties }
property ID : Integer read GetIDValue write SetIDValue; property ID : Integer read GetIDValue write SetIDValue;
@ -272,30 +288,6 @@ type
property ID_ASIENTOIsNull : Boolean read GetID_ASIENTOIsNull write SetID_ASIENTOIsNull; property ID_ASIENTOIsNull : Boolean read GetID_ASIENTOIsNull write SetID_ASIENTOIsNull;
property OldID_ASIENTO : Integer read GetOldID_ASIENTOValue; property OldID_ASIENTO : Integer read GetOldID_ASIENTOValue;
property OldID_ASIENTOIsNull : Boolean read GetOldID_ASIENTOIsNull; 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_SUBCUENTA : Integer read GetID_SUBCUENTAValue write SetID_SUBCUENTAValue;
property ID_SUBCUENTAIsNull : Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull; property ID_SUBCUENTAIsNull : Boolean read GetID_SUBCUENTAIsNull write SetID_SUBCUENTAIsNull;
property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue; property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
@ -308,6 +300,26 @@ type
property SUBCUENTAIsNull : Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull; property SUBCUENTAIsNull : Boolean read GetSUBCUENTAIsNull write SetSUBCUENTAIsNull;
property OldSUBCUENTA : String read GetOldSUBCUENTAValue; property OldSUBCUENTA : String read GetOldSUBCUENTAValue;
property OldSUBCUENTAIsNull : Boolean read GetOldSUBCUENTAIsNull; 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 public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override; constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@ -317,7 +329,7 @@ type
{ IAsientosDelta } { IAsientosDelta }
IAsientosDelta = interface(IAsientos) IAsientosDelta = interface(IAsientos)
['{291CBAA5-42AB-45D6-A5D0-59D694A8960E}'] ['{3A7F1EB1-7C5B-47BF-8DFA-4C86EFF0686E}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldFECHA_ASIENTOValue : DateTime; function GetOldFECHA_ASIENTOValue : DateTime;
@ -375,7 +387,7 @@ type
{ ISubCuentasDelta } { ISubCuentasDelta }
ISubCuentasDelta = interface(ISubCuentas) ISubCuentasDelta = interface(ISubCuentas)
['{0C092B2B-41F6-4F70-B073-F1B68F9FA233}'] ['{E88435DC-570C-43D8-A8B0-004C1C775CF0}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldREF_SUBCUENTAValue : String; function GetOldREF_SUBCUENTAValue : String;
@ -505,7 +517,7 @@ type
{ ICuentasDelta } { ICuentasDelta }
ICuentasDelta = interface(ICuentas) ICuentasDelta = interface(ICuentas)
['{152D2AD4-8B66-49AC-8D07-33C76A60CB85}'] ['{A26B4CE1-63F7-49F3-8A0A-F2840D95587C}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldREF_CUENTAValue : String; function GetOldREF_CUENTAValue : String;
@ -647,7 +659,7 @@ type
{ ICuentasEspecialesDelta } { ICuentasEspecialesDelta }
ICuentasEspecialesDelta = interface(ICuentasEspeciales) ICuentasEspecialesDelta = interface(ICuentasEspeciales)
['{0E63EE73-6CE9-4F33-9DB7-B02B1190DA20}'] ['{089CB669-7830-4908-9344-42AEC93D8320}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldREFERENCIAValue : String; function GetOldREFERENCIAValue : String;
@ -705,7 +717,7 @@ type
{ IEpigrafesDelta } { IEpigrafesDelta }
IEpigrafesDelta = interface(IEpigrafes) IEpigrafesDelta = interface(IEpigrafes)
['{2EB3D408-B118-4BC5-AABE-FAC7393086AB}'] ['{BFE5CD3F-52C2-400A-93A6-ACB723F7390E}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldREF_EPIGRAFEValue : String; function GetOldREF_EPIGRAFEValue : String;
@ -799,7 +811,7 @@ type
{ IBalancesDelta } { IBalancesDelta }
IBalancesDelta = interface(IBalances) IBalancesDelta = interface(IBalances)
['{964A4194-0DF5-4CA7-A922-DB219CC96B39}'] ['{543250BB-1C2E-4448-AEA8-EDC23591A2ED}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldREF_BALANCEValue : String; function GetOldREF_BALANCEValue : String;
@ -1098,35 +1110,66 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_SUBCUENTA] := Null; BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_SUBCUENTA] := Null;
end; end;
function TDiarioBusinessProcessorRules.GetSUBCUENTAValue: String; function TDiarioBusinessProcessorRules.GetREF_SUBCUENTAValue: String;
begin begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioSUBCUENTA]; result := BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioREF_SUBCUENTA];
end; end;
function TDiarioBusinessProcessorRules.GetSUBCUENTAIsNull: Boolean; function TDiarioBusinessProcessorRules.GetREF_SUBCUENTAIsNull: Boolean;
begin begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioSUBCUENTA]); result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioREF_SUBCUENTA]);
end; end;
function TDiarioBusinessProcessorRules.GetOldSUBCUENTAValue: String; function TDiarioBusinessProcessorRules.GetOldREF_SUBCUENTAValue: String;
begin begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioSUBCUENTA]; result := BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioREF_SUBCUENTA];
end; end;
function TDiarioBusinessProcessorRules.GetOldSUBCUENTAIsNull: Boolean; function TDiarioBusinessProcessorRules.GetOldREF_SUBCUENTAIsNull: Boolean;
begin begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioSUBCUENTA]); result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioREF_SUBCUENTA]);
end; end;
procedure TDiarioBusinessProcessorRules.SetSUBCUENTAValue(const aValue: String); procedure TDiarioBusinessProcessorRules.SetREF_SUBCUENTAValue(const aValue: String);
begin begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioSUBCUENTA] := aValue; BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioREF_SUBCUENTA] := aValue;
end; end;
procedure TDiarioBusinessProcessorRules.SetSUBCUENTAIsNull(const aValue: Boolean); procedure TDiarioBusinessProcessorRules.SetREF_SUBCUENTAIsNull(const aValue: Boolean);
begin begin
if aValue then 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; end;
function TDiarioBusinessProcessorRules.GetCONCEPTOValue: String; function TDiarioBusinessProcessorRules.GetCONCEPTOValue: String;
@ -1160,6 +1203,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioCONCEPTO] := Null; BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioCONCEPTO] := Null;
end; 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; function TDiarioBusinessProcessorRules.GetDEBEValue: Currency;
begin begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioDEBE]; result := BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioDEBE];
@ -1327,192 +1401,6 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_ASIENTO] := Null; BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_ASIENTO] := Null;
end; 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; function TApuntesBusinessProcessorRules.GetID_SUBCUENTAValue: Integer;
begin begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_SUBCUENTA]; result := BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesID_SUBCUENTA];
@ -1606,6 +1494,161 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesSUBCUENTA] := Null; BusinessProcessor.CurrentChange.NewValueByName[fld_ApuntesSUBCUENTA] := Null;
end; 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 } { TAsientosBusinessProcessorRules }
constructor TAsientosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); 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 interface
uses uses
uDAInterfaces, uDADataTable, schContabilidadClient_Intf; uDAInterfaces, uDADataTable, schContabilidadClient_Intf, uBizApuntes;
const const
BIZ_CLIENT_Asiento = 'Client.Asiento'; BIZ_CLIENT_Asiento = 'Client.Asiento';
@ -11,15 +11,29 @@ const
type type
IBizAsiento = interface(IAsientos) IBizAsiento = interface(IAsientos)
['{F79E3238-1E0D-4FB6-9AF7-E5703619B067}'] ['{F79E3238-1E0D-4FB6-9AF7-E5703619B067}']
function GetApuntes: IBizApunte;
procedure SetApuntes(Value: IBizApunte);
property Apuntes: IBizApunte read GetApuntes write SetApuntes;
function EsNuevo : Boolean; function EsNuevo : Boolean;
end; end;
TBizAsiento = class(TAsientosDataTableRules, IBizAsiento) TBizAsiento = class(TAsientosDataTableRules, IBizAsiento)
protected protected
FApuntes : IBizApunte;
FApuntesLink : TDADataSource;
function GetApuntes: IBizApunte;
procedure SetApuntes(Value: IBizApunte);
procedure OnNewRecord(Sender: TDADataTable); override; procedure OnNewRecord(Sender: TDADataTable); override;
public public
property Apuntes: IBizApunte read GetApuntes write SetApuntes;
procedure IniciarValoresAsientoNueva; procedure IniciarValoresAsientoNueva;
function EsNuevo : Boolean; function EsNuevo : Boolean;
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end; end;
implementation implementation
@ -29,11 +43,31 @@ implementation
uses uses
SysUtils, uDataTableUtils, uFactuGES_App; 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; function TBizAsiento.EsNuevo: Boolean;
begin begin
Result := (ID < 0); Result := (ID < 0);
end; end;
function TBizAsiento.GetApuntes: IBizApunte;
begin
Result := FApuntes;
end;
procedure TBizAsiento.IniciarValoresAsientoNueva; procedure TBizAsiento.IniciarValoresAsientoNueva;
begin begin
// ID_EJERCICIO := AppFactuGES.EjercicioActivo.ID; // ID_EJERCICIO := AppFactuGES.EjercicioActivo.ID;
@ -45,6 +79,12 @@ begin
IniciarValoresAsientoNueva; IniciarValoresAsientoNueva;
end; end;
procedure TBizAsiento.SetApuntes(Value: IBizApunte);
begin
FApuntes := Value;
EnlazarMaestroDetalle(FApuntesLink, FApuntes);
end;
initialization initialization
RegisterDataTableRules(BIZ_CLIENT_Asiento, TBizAsiento); 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 interface
uses uses
uDAInterfaces, uDADataTable, schContabilidadClient_Intf; uDAInterfaces, uDADataTable, uDBSelectionListUtils, schContabilidadClient_Intf;
const const
BIZ_CLIENT_SubCuenta = 'Client.SubCuenta'; BIZ_CLIENT_SubCuenta = 'Client.SubCuenta';
@ -14,10 +14,16 @@ type
function EsNuevo : Boolean; function EsNuevo : Boolean;
end; end;
TBizSubCuenta = class(TSubCuentasDataTableRules, IBizSubCuenta) TBizSubCuenta = class(TSubCuentasDataTableRules, IBizSubCuenta, ISeleccionable)
protected protected
FSeleccionableInterface: ISeleccionable;
procedure OnNewRecord(Sender: TDADataTable); override; procedure OnNewRecord(Sender: TDADataTable); override;
public public
property SeleccionableInterface : ISeleccionable read FSeleccionableInterface
write FSeleccionableInterface implements ISeleccionable;
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
procedure IniciarValoresSubCuentaNueva; procedure IniciarValoresSubCuentaNueva;
function EsNuevo : Boolean; function EsNuevo : Boolean;
end; end;
@ -29,6 +35,18 @@ implementation
uses uses
SysUtils, uDataTableUtils, uFactuGES_App; 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; function TBizSubCuenta.EsNuevo: Boolean;
begin begin
Result := (ID < 0); Result := (ID < 0);

View File

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

View File

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

View File

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

View File

@ -104,7 +104,12 @@ contains
uViewCuentasEspeciales in 'uViewCuentasEspeciales.pas' {frViewCuentasEspeciales: TFrame}, uViewCuentasEspeciales in 'uViewCuentasEspeciales.pas' {frViewCuentasEspeciales: TFrame},
uEditorElegirCuentasEspeciales in 'uEditorElegirCuentasEspeciales.pas' {fEditorElegirCuentasEspeciales: TfEditorEjercicios}, uEditorElegirCuentasEspeciales in 'uEditorElegirCuentasEspeciales.pas' {fEditorElegirCuentasEspeciales: TfEditorEjercicios},
uEditorElegirCuentas in 'uEditorElegirCuentas.pas' {fEditorElegirCuentas: TfEditorEjercicios}, uEditorElegirCuentas in 'uEditorElegirCuentas.pas' {fEditorElegirCuentas: TfEditorEjercicios},
uViewAsientos in 'uViewAsientos.pas' {frViewAsientos: TFrame}, uViewDiario in 'uViewDiario.pas' {frViewDiario: TFrame},
uEditorAsientos in 'uEditorAsientos.pas' {fEditorAsientos: TfEditorAsientos}; 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. end.

View File

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

View File

@ -12,9 +12,8 @@ uses
uEditorCuentaEspecial, uEditorCuentasEspeciales, uEditorElegirCuentasEspeciales, uEditorCuentaEspecial, uEditorCuentasEspeciales, uEditorElegirCuentasEspeciales,
uEditorEpigrafe, uEditorElegirEpigrafes, uEditorEpigrafes, uEditorEpigrafe, uEditorElegirEpigrafes, uEditorEpigrafes,
uEditorCuenta, uEditorCuentas, uEditorElegirCuentas, uEditorCuenta, uEditorCuentas, uEditorElegirCuentas,
uEditorSubCuenta, uEditorSubCuentas, uEditorSubCuenta, uEditorSubCuentas, uEditorElegirSubCuentas,
// uEditorAsiento, uEditorAsiento, uEditorDiario, uEditorApunte;
uEditorAsientos;
procedure RegisterViews; procedure RegisterViews;
begin begin
@ -32,8 +31,10 @@ begin
EditorRegistry.RegisterClass(TfEditorElegirCuentas, 'EditorElegirCuentas'); EditorRegistry.RegisterClass(TfEditorElegirCuentas, 'EditorElegirCuentas');
EditorRegistry.RegisterClass(TfEditorSubCuentas, 'EditorSubCuentas'); EditorRegistry.RegisterClass(TfEditorSubCuentas, 'EditorSubCuentas');
EditorRegistry.RegisterClass(TfEditorSubCuenta, 'EditorSubCuenta'); EditorRegistry.RegisterClass(TfEditorSubCuenta, 'EditorSubCuenta');
// EditorRegistry.RegisterClass(TfEditorAsiento, 'EditorAsiento'); EditorRegistry.RegisterClass(TfEditorElegirSubCuentas, 'EditorElegirSubCuentas');
EditorRegistry.RegisterClass(TfEditorAsientos, 'EditorAsientos'); EditorRegistry.RegisterClass(TfEditorAsiento, 'EditorAsiento');
EditorRegistry.RegisterClass(TfEditorDiario, 'EditorDiario');
EditorRegistry.RegisterClass(TfEditorApunte, 'EditorApunte');
end; end;
procedure UnregisterViews; procedure UnregisterViews;
@ -52,8 +53,10 @@ begin
EditorRegistry.UnRegisterClass(TfEditorElegirCuentas); EditorRegistry.UnRegisterClass(TfEditorElegirCuentas);
EditorRegistry.UnRegisterClass(TfEditorSubCuentas); EditorRegistry.UnRegisterClass(TfEditorSubCuentas);
EditorRegistry.UnRegisterClass(TfEditorSubCuenta); EditorRegistry.UnRegisterClass(TfEditorSubCuenta);
EditorRegistry.UnRegisterClass(TfEditorAsientos); EditorRegistry.UnRegisterClass(TfEditorElegirSubCuentas);
// EditorRegistry.UnRegisterClass(TfEditorAsiento); EditorRegistry.UnRegisterClass(TfEditorDiario);
EditorRegistry.UnRegisterClass(TfEditorAsiento);
EditorRegistry.UnRegisterClass(TfEditorApunte);
end; end;
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} {$R *.dfm}
uses uses
uCustomEditor, uDataModuleBase; uCustomEditor, uDataModuleBase, uFactuGES_App;
function ShowEditorCuenta (ABizObject : TDADataTableRules): TModalResult; function ShowEditorCuenta (ABizObject : TDADataTableRules): TModalResult;
var var
@ -102,9 +102,9 @@ begin
if Assigned(Cuenta) then if Assigned(Cuenta) then
begin begin
if Cuenta.EsNuevo then if Cuenta.EsNuevo then
FTitulo := 'Nueva cuenta' FTitulo := 'Nueva cuenta - ' + AppFactuGES.EjercicioActivo.NOMBRE
else else
FTitulo := 'Cuenta' + ' - ' + Cuenta.DESCRIPCION; FTitulo := 'Cuenta' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' - ' + Cuenta.DESCRIPCION;
end; end;
inherited PonerTitulos(FTitulo); inherited PonerTitulos(FTitulo);

View File

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

View File

@ -1,12 +1,12 @@
inherited fEditorAsientos: TfEditorAsientos inherited fEditorDiario: TfEditorDiario
Left = 489 Left = 489
Top = 325 Top = 325
Caption = 'Lista de epigrafes' Caption = 'Libro de diario'
ExplicitHeight = 471 ExplicitHeight = 471
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader inherited JvNavPanelHeader: TJvNavPanelHeader
Caption = 'Lista de epigrafes' Caption = 'Libro de diario'
inherited Image1: TImage inherited Image1: TImage
Picture.Data = { Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800
@ -48,7 +48,7 @@ inherited fEditorAsientos: TfEditorAsientos
ExplicitLeft = 275 ExplicitLeft = 275
end end
end end
inline frViewAsientos1: TfrViewAsientos [3] inline frViewDiario1: TfrViewDiario [3]
Left = 0 Left = 0
Top = 102 Top = 102
Width = 543 Width = 543
@ -62,17 +62,20 @@ inherited fEditorAsientos: TfEditorAsientos
ParentFont = False ParentFont = False
TabOrder = 3 TabOrder = 3
ReadOnly = False ReadOnly = False
ExplicitLeft = -11 ExplicitTop = 102
ExplicitTop = -150 ExplicitWidth = 543
ExplicitHeight = 323
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 543 Width = 543
Height = 195 Height = 195
ExplicitWidth = 543
ExplicitHeight = 195
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = < DataController.Summary.FooterSummaryItems = <
item item
Format = '0 ejercicios' Format = '0 ejercicios'
Kind = skCount Kind = skCount
Column = frViewAsientos1.cxGridViewREF_SUBCUENTA Column = frViewDiario1.cxGridViewREF_SUBCUENTA
end> end>
inherited cxGridViewID_ASIENTO: TcxGridDBColumn inherited cxGridViewID_ASIENTO: TcxGridDBColumn
IsCaptionAssigned = True IsCaptionAssigned = True
@ -81,52 +84,49 @@ inherited fEditorAsientos: TfEditorAsientos
end end
inherited frViewFiltroBase1: TfrViewFiltroBase inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 543 Width = 543
ExplicitWidth = 543
inherited TBXDockablePanel1: TTBXDockablePanel inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 543
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 543 Width = 543
inherited txtFiltroTodo: TcxTextEdit ExplicitWidth = 543
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
ExplicitWidth = 121
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit inherited edtFechaFinFiltro: TcxDateEdit
Left = 337 Left = 337
ExplicitLeft = 337 ExplicitLeft = 337
ExplicitWidth = 121
Width = 121
end end
end end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 543 Width = 543
ExplicitWidth = 543
inherited tbxBotones: TTBXToolbar inherited tbxBotones: TTBXToolbar
Width = 533 Width = 533
ExplicitWidth = 533
end end
end end
end end
end end
inherited pnlAgrupaciones: TTBXDockablePanel inherited pnlAgrupaciones: TTBXDockablePanel
Top = 297 Top = 297
ExplicitWidth = 554 ExplicitTop = 297
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 543 Width = 543
ExplicitWidth = 543
inherited TBXToolbar1: TTBXToolbar inherited TBXToolbar1: TTBXToolbar
Width = 533 Width = 533
ExplicitWidth = 533
end end
end end
end end
inherited dxComponentPrinter: TdxComponentPrinter inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink inherited dxComponentPrinterLink: TdxGridReportLink
ReportDocument.CreationDate = 39426.815642349540000000 ReportDocument.CreationDate = 39428.774937233790000000
BuiltInReportLink = True BuiltInReportLink = True
end end
end end
inherited cxViewGridPopupMenu: TcxGridPopupMenu inherited cxViewGridPopupMenu: TcxGridPopupMenu
PopupMenus = < PopupMenus = <
item item
GridView = frViewAsientos1.cxGridView GridView = frViewDiario1.cxGridView
HitTypes = [gvhtCell] HitTypes = [gvhtCell]
Index = 0 Index = 0
end> 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} {$R *.dfm}
uses uses
uCustomEditor, uDataModuleBase; uCustomEditor, uDataModuleBase, uFactuGES_App;
function ShowEditorEpigrafe (ABizObject : TDADataTableRules): TModalResult; function ShowEditorEpigrafe (ABizObject : TDADataTableRules): TModalResult;
var var
@ -102,9 +102,9 @@ begin
if Assigned(Epigrafe) then if Assigned(Epigrafe) then
begin begin
if Epigrafe.EsNuevo then if Epigrafe.EsNuevo then
FTitulo := 'Nuevo epígrafe' FTitulo := 'Nuevo epígrafe - ' + AppFactuGES.EjercicioActivo.NOMBRE
else else
FTitulo := 'Epígrafe' + ' - ' + Epigrafe.DESCRIPCION; FTitulo := 'Epígrafe' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE + ' - ' + Epigrafe.DESCRIPCION;
end; end;
inherited PonerTitulos(FTitulo); inherited PonerTitulos(FTitulo);

View File

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

View File

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

View File

@ -62,12 +62,14 @@ inherited fEditorSubCuentas: TfEditorSubCuentas
ParentFont = False ParentFont = False
TabOrder = 3 TabOrder = 3
ReadOnly = False ReadOnly = False
ExplicitLeft = 312 ExplicitTop = 102
ExplicitTop = -150 ExplicitWidth = 543
ExplicitWidth = 32 ExplicitHeight = 323
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 543 Width = 543
Height = 195 Height = 195
ExplicitWidth = 543
ExplicitHeight = 195
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = < DataController.Summary.FooterSummaryItems = <
item item
@ -82,9 +84,12 @@ inherited fEditorSubCuentas: TfEditorSubCuentas
end end
inherited frViewFiltroBase1: TfrViewFiltroBase inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 543 Width = 543
ExplicitWidth = 543
inherited TBXDockablePanel1: TTBXDockablePanel inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 543
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 543 Width = 543
ExplicitWidth = 543
inherited txtFiltroTodo: TcxTextEdit inherited txtFiltroTodo: TcxTextEdit
ExplicitWidth = 273 ExplicitWidth = 273
Width = 273 Width = 273
@ -102,18 +107,24 @@ inherited fEditorSubCuentas: TfEditorSubCuentas
end end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 543 Width = 543
ExplicitWidth = 543
inherited tbxBotones: TTBXToolbar inherited tbxBotones: TTBXToolbar
Width = 533 Width = 533
ExplicitWidth = 533
end end
end end
end end
end end
inherited pnlAgrupaciones: TTBXDockablePanel inherited pnlAgrupaciones: TTBXDockablePanel
Top = 297 Top = 297
ExplicitTop = 297
ExplicitWidth = 543
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 543 Width = 543
ExplicitWidth = 543
inherited TBXToolbar1: TTBXToolbar inherited TBXToolbar1: TTBXToolbar
Width = 533 Width = 533
ExplicitWidth = 533
end end
end 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 cxGrid: TcxGrid
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
DataController.KeyFieldNames = 'ID' DataController.KeyFieldNames = 'ID_ASIENTO;ID_APUNTE'
DataController.Summary.FooterSummaryItems = < DataController.Summary.FooterSummaryItems = <
item item
Format = '0 ejercicios' Format = '0 ejercicios'
@ -12,13 +12,16 @@ inherited frViewAsientos: TfrViewAsientos
object cxGridViewID_ASIENTO: TcxGridDBColumn object cxGridViewID_ASIENTO: TcxGridDBColumn
DataBinding.FieldName = 'ID_ASIENTO' DataBinding.FieldName = 'ID_ASIENTO'
Visible = False Visible = False
OnCustomDrawCell = cxGridViewID_ASIENTOCustomDrawCell
BestFitMaxWidth = 22 BestFitMaxWidth = 22
MinWidth = 22 MinWidth = 22
Options.HorzSizing = False Options.HorzSizing = False
Width = 22 Width = 22
IsCaptionAssigned = True IsCaptionAssigned = True
end end
object cxGridViewID_APUNTE: TcxGridDBColumn
DataBinding.FieldName = 'ID_APUNTE'
Visible = False
end
object cxGridViewFECHA_ASIENTO: TcxGridDBColumn object cxGridViewFECHA_ASIENTO: TcxGridDBColumn
DataBinding.FieldName = 'FECHA_ASIENTO' DataBinding.FieldName = 'FECHA_ASIENTO'
end end

View File

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