55 lines
1007 B
ObjectPascal
55 lines
1007 B
ObjectPascal
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.
|
|
|