git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@32 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
e297060736
commit
180d49281e
297
Source/Modulos/Contabilidad/Controller/uAsientosController.pas
Normal file
297
Source/Modulos/Contabilidad/Controller/uAsientosController.pas
Normal file
@ -0,0 +1,297 @@
|
||||
unit uAsientosController;
|
||||
|
||||
interface
|
||||
|
||||
|
||||
uses
|
||||
Classes, SysUtils, uDADataTable, uControllerBase,
|
||||
uBizAsientos, uIDataModuleContabilidad;
|
||||
type
|
||||
IAsientosController = interface(IObservador)
|
||||
['{94E5F2B6-64C8-4331-B9CB-3ED730478529}']
|
||||
function BuscarTodos: IBizAsiento;
|
||||
function Buscar(ID: Integer): IBizAsiento;
|
||||
procedure VerTodos(AAsientos: IBizAsiento);
|
||||
procedure Ver(AAsiento: IBizAsiento);
|
||||
procedure Anadir(AAsiento : IBizAsiento);
|
||||
function Eliminar(AAsiento : IBizAsiento): Boolean;
|
||||
function Guardar(AAsiento : IBizAsiento): Boolean;
|
||||
procedure DescartarCambios(AAsiento : IBizAsiento);
|
||||
function Localizar(AAsientos: IBizAsiento; ADescripcion:String): Boolean;
|
||||
function DarListaAsientos: TStringList;
|
||||
end;
|
||||
|
||||
TAsientosController = class(TObservador, IAsientosController)
|
||||
protected
|
||||
FDataModule : IDataModuleContabilidad;
|
||||
|
||||
procedure RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable); override;
|
||||
function CreateEditor(const AName : String; const IID: TGUID; out Intf): Boolean;
|
||||
|
||||
function ValidarAsiento(AAsiento: IBizAsiento): Boolean;
|
||||
procedure AsignarDataModule;
|
||||
procedure FiltrarAsiento(AAsiento: IBizAsiento);
|
||||
|
||||
public
|
||||
constructor Create; override;
|
||||
destructor Destroy; override;
|
||||
|
||||
function Eliminar(AAsiento : IBizAsiento): Boolean;
|
||||
function Guardar(AAsiento : IBizAsiento): Boolean; virtual;
|
||||
procedure DescartarCambios(AAsiento : IBizAsiento); virtual;
|
||||
procedure Anadir(AAsiento : IBizAsiento);
|
||||
function BuscarTodos: IBizAsiento;
|
||||
function Buscar(ID: Integer): IBizAsiento;
|
||||
procedure VerTodos(AAsientos: IBizAsiento);
|
||||
procedure Ver(AAsiento: IBizAsiento);
|
||||
function Localizar(AAsientos: IBizAsiento; ADescripcion:String): Boolean;
|
||||
function DarListaAsientos: TStringList;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
cxControls, DB, uEditorRegistryUtils, schContabilidadClient_Intf,
|
||||
uIEditorAsientos, uIEditorAsiento, uDataModuleContabilidad,
|
||||
uDAInterfaces, uDataTableUtils, uDialogUtils, uFactuGES_App,
|
||||
uDateUtils, uROTypes, DateUtils, Controls, Windows;
|
||||
|
||||
{ TAsientosController }
|
||||
|
||||
procedure TAsientosController.Anadir(AAsiento: IBizAsiento);
|
||||
begin
|
||||
AAsiento.Insert;
|
||||
end;
|
||||
|
||||
procedure TAsientosController.AsignarDataModule;
|
||||
begin
|
||||
FDataModule := TDataModuleContabilidad.Create(Nil);
|
||||
end;
|
||||
|
||||
function TAsientosController.Buscar(ID: Integer): IBizAsiento;
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
Result := BuscarTodos;
|
||||
|
||||
with Result.DataTable.DynamicWhere do
|
||||
begin
|
||||
// (ID = :ID)
|
||||
Condicion := NewBinaryExpression(NewField('', fld_AsientosID), NewConstant(ID, datInteger), dboEqual);
|
||||
|
||||
if IsEmpty then
|
||||
Expression := Condicion
|
||||
else
|
||||
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
|
||||
end;
|
||||
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TAsientosController.BuscarTodos: IBizAsiento;
|
||||
begin
|
||||
Result := FDataModule.GetAsientoItems;
|
||||
FiltrarAsiento(Result);
|
||||
end;
|
||||
|
||||
constructor TAsientosController.Create;
|
||||
begin
|
||||
inherited;
|
||||
AsignarDataModule;
|
||||
end;
|
||||
|
||||
function TAsientosController.CreateEditor(const AName: String; const IID: TGUID; out Intf): Boolean;
|
||||
begin
|
||||
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
|
||||
end;
|
||||
|
||||
function TAsientosController.DarListaAsientos: TStringList;
|
||||
var
|
||||
AAsientos: IBizAsiento;
|
||||
begin
|
||||
AAsientos := BuscarTodos;
|
||||
AAsientos.DataTable.Active := True;
|
||||
Result := TStringList.Create;
|
||||
try
|
||||
with Result do
|
||||
begin
|
||||
AAsientos.DataTable.First;
|
||||
while not AAsientos.DataTable.EOF do
|
||||
begin
|
||||
Add(AAsientos.CONCEPTO);
|
||||
AAsientos.DataTable.Next;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
AAsientos := NIL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TAsientosController.DescartarCambios(AAsiento: IBizAsiento);
|
||||
begin
|
||||
if not Assigned(AAsiento) then
|
||||
raise Exception.Create ('Asiento no asignado');
|
||||
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
if (AAsiento.State in dsEditModes) then
|
||||
AAsiento.Cancel;
|
||||
|
||||
AAsiento.DataTable.CancelUpdates;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TAsientosController.Destroy;
|
||||
begin
|
||||
FDataModule:= NIL;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TAsientosController.ValidarAsiento(AAsiento: IBizAsiento): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if not Assigned(AAsiento) then
|
||||
raise Exception.Create ('Asiento no asignado');
|
||||
|
||||
if (AAsiento.DataTable.State in dsEditModes) then
|
||||
AAsiento.DataTable.Post;
|
||||
|
||||
if Length(AAsiento.CONCEPTO) = 0 then
|
||||
raise Exception.Create('Debe indicar un concepto para este Asiento.');
|
||||
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
procedure TAsientosController.Ver(AAsiento: IBizAsiento);
|
||||
var
|
||||
AEditor : IEditorAsiento;
|
||||
begin
|
||||
AEditor := NIL;
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
CreateEditor('EditorAsiento', IEditorAsiento, AEditor);
|
||||
if Assigned(AEditor) then
|
||||
with AEditor do
|
||||
begin
|
||||
Controller := Self; //OJO ORDEN MUY IMPORTANTE
|
||||
Asiento := AAsiento;
|
||||
ShowModal;
|
||||
Release;
|
||||
end;
|
||||
finally
|
||||
AEditor := NIL;
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TAsientosController.VerTodos(AAsientos: IBizAsiento);
|
||||
var
|
||||
AEditor : IEditorAsientos;
|
||||
begin
|
||||
AEditor := NIL;
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
CreateEditor('EditorAsientos', IEditorAsientos, AEditor);
|
||||
if Assigned(AEditor) then
|
||||
with AEditor do
|
||||
begin
|
||||
Controller := Self; //OJO ORDEN MUY IMPORTANTE
|
||||
Asientos := AAsientos;
|
||||
ShowEmbedded;
|
||||
end;
|
||||
finally
|
||||
AEditor := NIL;
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TAsientosController.Eliminar(AAsiento: IBizAsiento): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if not Assigned(AAsiento) then
|
||||
raise Exception.Create ('Asiento no asignado');
|
||||
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
if (AAsiento.State in dsEditModes) then
|
||||
AAsiento.Cancel;
|
||||
|
||||
AAsiento.Delete;
|
||||
AAsiento.DataTable.ApplyUpdates;
|
||||
HideHourglassCursor;
|
||||
Result := True;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TAsientosController.FiltrarAsiento(AAsiento: IBizAsiento);
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
begin
|
||||
if AAsiento.DataTable.Active then
|
||||
AAsiento.DataTable.Active := False;
|
||||
|
||||
// Filtrar los Asientos actuales por Asiento activo
|
||||
{ with AAsiento.DataTable.DynamicWhere do
|
||||
begin
|
||||
// (ID_Asiento = ID)
|
||||
Condicion := NewBinaryExpression(NewField('', fld_AsientosID_Asiento), NewConstant(AppFactuGES.AsientoActivo.ID, datInteger), dboEqual);
|
||||
|
||||
if IsEmpty then
|
||||
Expression := Condicion
|
||||
else
|
||||
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
|
||||
end;
|
||||
}
|
||||
end;
|
||||
|
||||
procedure TAsientosController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable);
|
||||
begin
|
||||
inherited;
|
||||
//
|
||||
end;
|
||||
|
||||
function TAsientosController.Guardar(AAsiento: IBizAsiento): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if ValidarAsiento(AAsiento) then
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
AAsiento.DataTable.ApplyUpdates;
|
||||
Result := True;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TAsientosController.Localizar(AAsientos: IBizAsiento; ADescripcion: String): Boolean;
|
||||
begin
|
||||
Result := True;
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
with AAsientos.DataTable do
|
||||
begin
|
||||
DisableControls;
|
||||
First;
|
||||
if not Locate(fld_AsientosCONCEPTO, ADescripcion, []) then
|
||||
Result := False;
|
||||
EnableControls;
|
||||
end;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
296
Source/Modulos/Contabilidad/Controller/uCuentasController.pas
Normal file
296
Source/Modulos/Contabilidad/Controller/uCuentasController.pas
Normal file
@ -0,0 +1,296 @@
|
||||
unit uCuentasController;
|
||||
|
||||
interface
|
||||
|
||||
|
||||
uses
|
||||
Classes, SysUtils, uDADataTable, uControllerBase,
|
||||
uBizCuentas, uIDataModuleContabilidad;
|
||||
type
|
||||
ICuentasController = interface(IObservador)
|
||||
['{94E5F2B6-64C8-4331-B9CB-3ED730478529}']
|
||||
function BuscarTodos: IBizCuenta;
|
||||
function Buscar(ID: Integer): IBizCuenta;
|
||||
procedure VerTodos(ACuentas: IBizCuenta);
|
||||
procedure Ver(ACuenta: IBizCuenta);
|
||||
procedure Anadir(ACuenta : IBizCuenta);
|
||||
function Eliminar(ACuenta : IBizCuenta): Boolean;
|
||||
function Guardar(ACuenta : IBizCuenta): Boolean;
|
||||
procedure DescartarCambios(ACuenta : IBizCuenta);
|
||||
function Localizar(ACuentas: IBizCuenta; ADescripcion:String): Boolean;
|
||||
function DarListaCuentas: TStringList;
|
||||
end;
|
||||
|
||||
TCuentasController = class(TObservador, ICuentasController)
|
||||
protected
|
||||
FDataModule : IDataModuleContabilidad;
|
||||
|
||||
procedure RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable); override;
|
||||
function CreateEditor(const AName : String; const IID: TGUID; out Intf): Boolean;
|
||||
|
||||
function ValidarCuenta(ACuenta: IBizCuenta): Boolean;
|
||||
procedure AsignarDataModule;
|
||||
procedure FiltrarEjercicio(ACuenta: IBizCuenta);
|
||||
|
||||
public
|
||||
constructor Create; override;
|
||||
destructor Destroy; override;
|
||||
|
||||
function Eliminar(ACuenta : IBizCuenta): Boolean;
|
||||
function Guardar(ACuenta : IBizCuenta): Boolean; virtual;
|
||||
procedure DescartarCambios(ACuenta : IBizCuenta); virtual;
|
||||
procedure Anadir(ACuenta : IBizCuenta);
|
||||
function BuscarTodos: IBizCuenta;
|
||||
function Buscar(ID: Integer): IBizCuenta;
|
||||
procedure VerTodos(ACuentas: IBizCuenta);
|
||||
procedure Ver(ACuenta: IBizCuenta);
|
||||
function Localizar(ACuentas: IBizCuenta; ADescripcion:String): Boolean;
|
||||
function DarListaCuentas: TStringList;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
cxControls, DB, uEditorRegistryUtils, schContabilidadClient_Intf,
|
||||
uIEditorCuentas, uIEditorCuenta, uDataModuleContabilidad,
|
||||
uDAInterfaces, uDataTableUtils, uDialogUtils, uFactuGES_App,
|
||||
uDateUtils, uROTypes, DateUtils, Controls, Windows;
|
||||
|
||||
{ TCuentasController }
|
||||
|
||||
procedure TCuentasController.Anadir(ACuenta: IBizCuenta);
|
||||
begin
|
||||
ACuenta.Insert;
|
||||
end;
|
||||
|
||||
procedure TCuentasController.AsignarDataModule;
|
||||
begin
|
||||
FDataModule := TDataModuleContabilidad.Create(Nil);
|
||||
end;
|
||||
|
||||
function TCuentasController.Buscar(ID: Integer): IBizCuenta;
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
Result := BuscarTodos;
|
||||
|
||||
with Result.DataTable.DynamicWhere do
|
||||
begin
|
||||
// (ID = :ID)
|
||||
Condicion := NewBinaryExpression(NewField('', fld_CuentasID), NewConstant(ID, datInteger), dboEqual);
|
||||
|
||||
if IsEmpty then
|
||||
Expression := Condicion
|
||||
else
|
||||
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
|
||||
end;
|
||||
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCuentasController.BuscarTodos: IBizCuenta;
|
||||
begin
|
||||
Result := FDataModule.GetCuentaItems;
|
||||
FiltrarEjercicio(Result);
|
||||
end;
|
||||
|
||||
constructor TCuentasController.Create;
|
||||
begin
|
||||
inherited;
|
||||
AsignarDataModule;
|
||||
end;
|
||||
|
||||
function TCuentasController.CreateEditor(const AName: String; const IID: TGUID; out Intf): Boolean;
|
||||
begin
|
||||
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
|
||||
end;
|
||||
|
||||
function TCuentasController.DarListaCuentas: TStringList;
|
||||
var
|
||||
ACuentas: IBizCuenta;
|
||||
begin
|
||||
ACuentas := BuscarTodos;
|
||||
ACuentas.DataTable.Active := True;
|
||||
Result := TStringList.Create;
|
||||
try
|
||||
with Result do
|
||||
begin
|
||||
ACuentas.DataTable.First;
|
||||
while not ACuentas.DataTable.EOF do
|
||||
begin
|
||||
Add(ACuentas.DESCRIPCION);
|
||||
ACuentas.DataTable.Next;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
ACuentas := NIL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCuentasController.DescartarCambios(ACuenta: IBizCuenta);
|
||||
begin
|
||||
if not Assigned(ACuenta) then
|
||||
raise Exception.Create ('Cuenta no asignado');
|
||||
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
if (ACuenta.State in dsEditModes) then
|
||||
ACuenta.Cancel;
|
||||
|
||||
ACuenta.DataTable.CancelUpdates;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TCuentasController.Destroy;
|
||||
begin
|
||||
FDataModule:= NIL;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TCuentasController.ValidarCuenta(ACuenta: IBizCuenta): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if not Assigned(ACuenta) then
|
||||
raise Exception.Create ('Cuenta no asignado');
|
||||
|
||||
if (ACuenta.DataTable.State in dsEditModes) then
|
||||
ACuenta.DataTable.Post;
|
||||
|
||||
if Length(ACuenta.DESCRIPCION) = 0 then
|
||||
raise Exception.Create('Debe indicar un nombre para este Cuenta.');
|
||||
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
procedure TCuentasController.Ver(ACuenta: IBizCuenta);
|
||||
var
|
||||
AEditor : IEditorCuenta;
|
||||
begin
|
||||
AEditor := NIL;
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
CreateEditor('EditorCuenta', IEditorCuenta, AEditor);
|
||||
if Assigned(AEditor) then
|
||||
with AEditor do
|
||||
begin
|
||||
Controller := Self; //OJO ORDEN MUY IMPORTANTE
|
||||
Cuenta := ACuenta;
|
||||
ShowModal;
|
||||
Release;
|
||||
end;
|
||||
finally
|
||||
AEditor := NIL;
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCuentasController.VerTodos(ACuentas: IBizCuenta);
|
||||
var
|
||||
AEditor : IEditorCuentas;
|
||||
begin
|
||||
AEditor := NIL;
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
CreateEditor('EditorCuentas', IEditorCuentas, AEditor);
|
||||
if Assigned(AEditor) then
|
||||
with AEditor do
|
||||
begin
|
||||
Controller := Self; //OJO ORDEN MUY IMPORTANTE
|
||||
Cuentas := ACuentas;
|
||||
ShowEmbedded;
|
||||
end;
|
||||
finally
|
||||
AEditor := NIL;
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCuentasController.Eliminar(ACuenta: IBizCuenta): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if not Assigned(ACuenta) then
|
||||
raise Exception.Create ('Cuenta no asignado');
|
||||
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
if (ACuenta.State in dsEditModes) then
|
||||
ACuenta.Cancel;
|
||||
|
||||
ACuenta.Delete;
|
||||
ACuenta.DataTable.ApplyUpdates;
|
||||
HideHourglassCursor;
|
||||
Result := True;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCuentasController.FiltrarEjercicio(ACuenta: IBizCuenta);
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
begin
|
||||
if ACuenta.DataTable.Active then
|
||||
ACuenta.DataTable.Active := False;
|
||||
|
||||
// Filtrar los Cuentas actuales por ejercicio activo
|
||||
with ACuenta.DataTable.DynamicWhere do
|
||||
begin
|
||||
// (ID_EJERCICIO = ID)
|
||||
Condicion := NewBinaryExpression(NewField('', fld_CuentasID_EJERCICIO), NewConstant(AppFactuGES.EjercicioActivo.ID, datInteger), dboEqual);
|
||||
|
||||
if IsEmpty then
|
||||
Expression := Condicion
|
||||
else
|
||||
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCuentasController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable);
|
||||
begin
|
||||
inherited;
|
||||
//
|
||||
end;
|
||||
|
||||
function TCuentasController.Guardar(ACuenta: IBizCuenta): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if ValidarCuenta(ACuenta) then
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
ACuenta.DataTable.ApplyUpdates;
|
||||
Result := True;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCuentasController.Localizar(ACuentas: IBizCuenta; ADescripcion: String): Boolean;
|
||||
begin
|
||||
Result := True;
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
with ACuentas.DataTable do
|
||||
begin
|
||||
DisableControls;
|
||||
First;
|
||||
if not Locate(fld_CuentasDESCRIPCION, ADescripcion, []) then
|
||||
Result := False;
|
||||
EnableControls;
|
||||
end;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
54
Source/Modulos/Contabilidad/Model/Copia de uBizEpigrafes.pas
Normal file
54
Source/Modulos/Contabilidad/Model/Copia de uBizEpigrafes.pas
Normal file
@ -0,0 +1,54 @@
|
||||
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.
|
||||
|
||||
54
Source/Modulos/Contabilidad/Model/uBizAsientos.pas
Normal file
54
Source/Modulos/Contabilidad/Model/uBizAsientos.pas
Normal file
@ -0,0 +1,54 @@
|
||||
unit uBizAsientos;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
uDAInterfaces, uDADataTable, schContabilidadClient_Intf;
|
||||
|
||||
const
|
||||
BIZ_CLIENT_Asiento = 'Client.Asiento';
|
||||
|
||||
type
|
||||
IBizAsiento = interface(IAsientos)
|
||||
['{F79E3238-1E0D-4FB6-9AF7-E5703619B067}']
|
||||
function EsNuevo : Boolean;
|
||||
end;
|
||||
|
||||
TBizAsiento = class(TAsientosDataTableRules, IBizAsiento)
|
||||
protected
|
||||
procedure OnNewRecord(Sender: TDADataTable); override;
|
||||
public
|
||||
procedure IniciarValoresAsientoNueva;
|
||||
function EsNuevo : Boolean;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TBizAsiento }
|
||||
|
||||
uses
|
||||
SysUtils, uDataTableUtils, uFactuGES_App;
|
||||
|
||||
function TBizAsiento.EsNuevo: Boolean;
|
||||
begin
|
||||
Result := (ID < 0);
|
||||
end;
|
||||
|
||||
procedure TBizAsiento.IniciarValoresAsientoNueva;
|
||||
begin
|
||||
// ID_EJERCICIO := AppFactuGES.EjercicioActivo.ID;
|
||||
end;
|
||||
|
||||
procedure TBizAsiento.OnNewRecord(Sender: TDADataTable);
|
||||
begin
|
||||
inherited;
|
||||
IniciarValoresAsientoNueva;
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterDataTableRules(BIZ_CLIENT_Asiento, TBizAsiento);
|
||||
|
||||
finalization
|
||||
|
||||
end.
|
||||
|
||||
54
Source/Modulos/Contabilidad/Model/uBizCuentas.pas
Normal file
54
Source/Modulos/Contabilidad/Model/uBizCuentas.pas
Normal file
@ -0,0 +1,54 @@
|
||||
unit uBizCuentas;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
uDAInterfaces, uDADataTable, schContabilidadClient_Intf;
|
||||
|
||||
const
|
||||
BIZ_CLIENT_Cuenta = 'Client.Cuenta';
|
||||
|
||||
type
|
||||
IBizCuenta = interface(ICuentas)
|
||||
['{F79E3238-1E0D-4FB6-9AF7-E5703619B067}']
|
||||
function EsNuevo : Boolean;
|
||||
end;
|
||||
|
||||
TBizCuenta = class(TCuentasDataTableRules, IBizCuenta)
|
||||
protected
|
||||
procedure OnNewRecord(Sender: TDADataTable); override;
|
||||
public
|
||||
procedure IniciarValoresCuentaNueva;
|
||||
function EsNuevo : Boolean;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TBizCuenta }
|
||||
|
||||
uses
|
||||
SysUtils, uDataTableUtils, uFactuGES_App;
|
||||
|
||||
function TBizCuenta.EsNuevo: Boolean;
|
||||
begin
|
||||
Result := (ID < 0);
|
||||
end;
|
||||
|
||||
procedure TBizCuenta.IniciarValoresCuentaNueva;
|
||||
begin
|
||||
ID_EJERCICIO := AppFactuGES.EjercicioActivo.ID;
|
||||
end;
|
||||
|
||||
procedure TBizCuenta.OnNewRecord(Sender: TDADataTable);
|
||||
begin
|
||||
inherited;
|
||||
IniciarValoresCuentaNueva;
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterDataTableRules(BIZ_CLIENT_Cuenta, TBizCuenta);
|
||||
|
||||
finalization
|
||||
|
||||
end.
|
||||
|
||||
54
Source/Modulos/Contabilidad/Model/uBizSubCuentas.pas
Normal file
54
Source/Modulos/Contabilidad/Model/uBizSubCuentas.pas
Normal file
@ -0,0 +1,54 @@
|
||||
unit uBizSubCuentas;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
uDAInterfaces, uDADataTable, schContabilidadClient_Intf;
|
||||
|
||||
const
|
||||
BIZ_CLIENT_SubCuenta = 'Client.SubCuenta';
|
||||
|
||||
type
|
||||
IBizSubCuenta = interface(ISubCuentas)
|
||||
['{F79E3238-1E0D-4FB6-9AF7-E5703619B067}']
|
||||
function EsNuevo : Boolean;
|
||||
end;
|
||||
|
||||
TBizSubCuenta = class(TSubCuentasDataTableRules, IBizSubCuenta)
|
||||
protected
|
||||
procedure OnNewRecord(Sender: TDADataTable); override;
|
||||
public
|
||||
procedure IniciarValoresSubCuentaNueva;
|
||||
function EsNuevo : Boolean;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TBizSubCuenta }
|
||||
|
||||
uses
|
||||
SysUtils, uDataTableUtils, uFactuGES_App;
|
||||
|
||||
function TBizSubCuenta.EsNuevo: Boolean;
|
||||
begin
|
||||
Result := (ID < 0);
|
||||
end;
|
||||
|
||||
procedure TBizSubCuenta.IniciarValoresSubCuentaNueva;
|
||||
begin
|
||||
ID_EJERCICIO := AppFactuGES.EjercicioActivo.ID;
|
||||
end;
|
||||
|
||||
procedure TBizSubCuenta.OnNewRecord(Sender: TDADataTable);
|
||||
begin
|
||||
inherited;
|
||||
IniciarValoresSubCuentaNueva;
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterDataTableRules(BIZ_CLIENT_SubCuenta, TBizSubCuenta);
|
||||
|
||||
finalization
|
||||
|
||||
end.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}</ProjectGuid>
|
||||
@ -29,6 +29,9 @@
|
||||
<Borland.ProjectType />
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">3.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">lunes, 19 de noviembre de 2007 18:58</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
|
||||
|
||||
|
||||
|
||||
<Excluded_Packages Name="C:\Archivos de programa\RemObjects Software\Pascal Script\Dcu\D10\PascalScript_RO_D10.bpl">RemObjects Pascal Script - RemObjects SDK 3.0 Integration</Excluded_Packages>
|
||||
</Excluded_Packages><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
|
||||
Binary file not shown.
@ -14,7 +14,7 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "FileVersion", "1.0.0.0\0"
|
||||
VALUE "ProductVersion", "1.0.0.0\0"
|
||||
VALUE "CompileDate", "sábado, 01 de diciembre de 2007 15:10\0"
|
||||
VALUE "CompileDate", "domingo, 02 de diciembre de 2007 21:14\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user