Subida de modificaciones sobre contabilidad
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@72 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
bef8dc48e5
commit
7afbff54dd
@ -7,6 +7,8 @@ uses
|
||||
|
||||
const
|
||||
BIZ_CLIENT_Ejercicio = 'Client.Ejercicio';
|
||||
CTE_ABIERTO = 'ABIERTO';
|
||||
CTE_CERRADO = 'CERRADO';
|
||||
|
||||
type
|
||||
IBizEjercicio = interface(IEjercicios)
|
||||
@ -27,7 +29,7 @@ implementation
|
||||
{ TBizEjercicio }
|
||||
|
||||
uses
|
||||
SysUtils, uDataTableUtils, uFactuGES_App;
|
||||
SysUtils, uDataTableUtils, uDateUtils, uFactuGES_App;
|
||||
|
||||
function TBizEjercicio.EsNuevo: Boolean;
|
||||
begin
|
||||
@ -38,6 +40,10 @@ procedure TBizEjercicio.IniciarValoresEjercicioNueva;
|
||||
begin
|
||||
ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
|
||||
ACTIVO := 1;
|
||||
ESTADO := CTE_ABIERTO;
|
||||
NOMBRE := 'Ejercicio ...';
|
||||
FECHA_INICIO := DarInicioAno(date);
|
||||
FECHA_FIN := DarFinAno(date);
|
||||
end;
|
||||
|
||||
procedure TBizEjercicio.OnNewRecord(Sender: TDADataTable);
|
||||
|
||||
@ -128,9 +128,9 @@ begin
|
||||
if Assigned(Ejercicio) then
|
||||
begin
|
||||
if Ejercicio.EsNuevo then
|
||||
FTitulo := 'Nuevo almacén'
|
||||
FTitulo := 'Nuevo ejercicio'
|
||||
else
|
||||
FTitulo := 'Almacén' + ' - ' + Ejercicio.NOMBRE;
|
||||
FTitulo := 'Ejercicio' + ' - ' + Ejercicio.NOMBRE;
|
||||
end;
|
||||
|
||||
inherited PonerTitulos(FTitulo);
|
||||
@ -218,7 +218,7 @@ end;
|
||||
|
||||
procedure TfEditorEjercicio.EliminarInterno;
|
||||
begin
|
||||
if (Application.MessageBox('¿Desea borrar este Ejercicio?', 'Atención', MB_YESNO) = IDYES) then
|
||||
if (Application.MessageBox('¿Desea borrar este Ejercicio?, se borrará todo el PGC asociado', 'Atención', MB_YESNO) = IDYES) then
|
||||
begin
|
||||
inherited;
|
||||
if not FController.Eliminar(FEjercicio) then
|
||||
|
||||
@ -62,11 +62,14 @@ inherited fEditorEjercicios: TfEditorEjercicios
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
ReadOnly = False
|
||||
ExplicitLeft = -11
|
||||
ExplicitTop = -150
|
||||
ExplicitTop = 102
|
||||
ExplicitWidth = 543
|
||||
ExplicitHeight = 323
|
||||
inherited cxGrid: TcxGrid
|
||||
Width = 543
|
||||
Height = 195
|
||||
ExplicitWidth = 543
|
||||
ExplicitHeight = 195
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
@ -81,9 +84,12 @@ inherited fEditorEjercicios: TfEditorEjercicios
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
Width = 543
|
||||
ExplicitWidth = 543
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
ExplicitWidth = 543
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
Width = 543
|
||||
ExplicitWidth = 543
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
ExplicitWidth = 273
|
||||
Width = 273
|
||||
@ -101,18 +107,24 @@ inherited fEditorEjercicios: TfEditorEjercicios
|
||||
end
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
Width = 543
|
||||
ExplicitWidth = 543
|
||||
inherited tbxBotones: TTBXToolbar
|
||||
Width = 533
|
||||
ExplicitWidth = 533
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||
Top = 297
|
||||
ExplicitTop = 297
|
||||
ExplicitWidth = 543
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
Width = 543
|
||||
ExplicitWidth = 543
|
||||
inherited TBXToolbar1: TTBXToolbar
|
||||
Width = 533
|
||||
ExplicitWidth = 533
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -1490,7 +1502,7 @@ inherited fEditorEjercicios: TfEditorEjercicios
|
||||
end
|
||||
inherited dsDataTable: TDADataSource [9]
|
||||
end
|
||||
inherited StatusBarImages: TPngImageList
|
||||
inherited StatusBarImages: TPngImageList [10]
|
||||
Top = 232
|
||||
end
|
||||
end
|
||||
|
||||
Binary file not shown.
@ -98,7 +98,7 @@ inherited frViewEjercicio: TfrViewEjercicio
|
||||
object cxDBCheckBox2: TcxDBCheckBox
|
||||
Left = 22
|
||||
Top = 28
|
||||
Caption = 'Ejercicio activo'
|
||||
Caption = 'Activo'
|
||||
DataBinding.DataField = 'ACTIVO'
|
||||
DataBinding.DataSource = DADataSource
|
||||
Properties.Alignment = taRightJustify
|
||||
|
||||
@ -11,6 +11,7 @@ inherited frViewEjercicios: TfrViewEjercicios
|
||||
OptionsBehavior.PullFocusing = True
|
||||
object cxGridViewID: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ID'
|
||||
Visible = False
|
||||
OnCustomDrawCell = cxGridViewIDCustomDrawCell
|
||||
BestFitMaxWidth = 22
|
||||
MinWidth = 22
|
||||
@ -19,6 +20,7 @@ inherited frViewEjercicios: TfrViewEjercicios
|
||||
IsCaptionAssigned = True
|
||||
end
|
||||
object cxGridViewACTIVO: TcxGridDBColumn
|
||||
Caption = 'Activo'
|
||||
DataBinding.FieldName = 'ACTIVO'
|
||||
PropertiesClassName = 'TcxImageComboBoxProperties'
|
||||
Properties.Items = <
|
||||
|
||||
@ -8,12 +8,30 @@ uses
|
||||
function DarFechaPrimerDia(Date: TDateTime): TDateTime;
|
||||
function DarFechaUltimoDia(Date: TDateTime): TDateTime;
|
||||
function EsFechaVacia(AFecha : TDateTime): Boolean;
|
||||
function DarInicioAno(AFecha: TDateTime): TDateTime;
|
||||
function DarFinAno(AFecha: TDateTime): TDateTime;
|
||||
|
||||
implementation
|
||||
|
||||
const
|
||||
FECHA_NULA = -700000;
|
||||
|
||||
function DarInicioAno(AFecha: TDateTime): TDateTime;
|
||||
var
|
||||
Year, Month, Day: Word;
|
||||
begin
|
||||
DecodeDate(Date, Year, Month, Day);
|
||||
Result := EncodeDate(Year, 1, 1);
|
||||
end;
|
||||
|
||||
function DarFinAno(AFecha: TDateTime): TDateTime;
|
||||
var
|
||||
Year, Month, Day: Word;
|
||||
begin
|
||||
DecodeDate(Date, Year, Month, Day);
|
||||
Result := EncodeDate(Year, 12, 31);
|
||||
end;
|
||||
|
||||
function EsFechaVacia(AFecha : TDateTime): Boolean;
|
||||
begin
|
||||
Result := (AFecha = FECHA_NULA) or (AFecha = 0);
|
||||
|
||||
Binary file not shown.
@ -13,7 +13,7 @@ type
|
||||
function Buscar(const ID: Integer): IBizAsiento;
|
||||
procedure VerDiario(ADiario: IBizDiario);
|
||||
procedure Ver(AAsiento: IBizAsiento);
|
||||
function Anadir: IBizAsiento;
|
||||
function Anadir(NumOrden:Integer): IBizAsiento;
|
||||
function Eliminar(AAsiento : IBizAsiento): Boolean;
|
||||
function Guardar(AAsiento : IBizAsiento): Boolean;
|
||||
procedure DescartarCambios(AAsiento : IBizAsiento);
|
||||
@ -37,7 +37,7 @@ type
|
||||
function Eliminar(AAsiento : IBizAsiento): Boolean;
|
||||
function Guardar(AAsiento : IBizAsiento): Boolean; virtual;
|
||||
procedure DescartarCambios(AAsiento : IBizAsiento); virtual;
|
||||
function Anadir: IBizAsiento;
|
||||
function Anadir(NumOrden:Integer): IBizAsiento;
|
||||
function BuscarDiario: IBizDiario;
|
||||
function Buscar(const ID: Integer): IBizAsiento;
|
||||
procedure VerDiario(ADiario: IBizDiario);
|
||||
@ -54,13 +54,14 @@ uses
|
||||
|
||||
{ TAsientosController }
|
||||
|
||||
function TAsientosController.Anadir: IBizAsiento;
|
||||
function TAsientosController.Anadir(NumOrden:Integer): IBizAsiento;
|
||||
var
|
||||
AAsiento : IBizAsiento;
|
||||
begin
|
||||
AAsiento := FDataModule.GetAsientoItem(ID_NULO);
|
||||
AAsiento.DataTable.Active := True;
|
||||
AAsiento.Insert;
|
||||
AAsiento.ORDEN := NumOrden;
|
||||
Result := AAsiento;
|
||||
end;
|
||||
|
||||
|
||||
@ -10,6 +10,9 @@ uses
|
||||
const
|
||||
// (REF_CUENTA = 430 SOLO CUENTAS DE CLIENTES)
|
||||
// (REF_CUENTA = 400 SOLO CUENTAS DE PROVEEDORES)
|
||||
// (REF_CUENTA = 570 SOLO CUENTAS DE CLIENTES)
|
||||
// (REF_CUENTA = 400 SOLO CUENTAS DE PROVEEDORES)
|
||||
|
||||
CTE_CUENTASCLIENTE = '430';
|
||||
CTE_CUENTASPROVEEDOR = '400';
|
||||
|
||||
@ -21,6 +24,7 @@ type
|
||||
procedure VerTodos(ASubCuentas: IBizSubCuenta);
|
||||
procedure Ver(ASubCuenta: IBizSubCuenta);
|
||||
procedure Anadir(ASubCuenta : IBizSubCuenta);
|
||||
function Nuevo : IBizSubCuenta;
|
||||
function Eliminar(ASubCuenta : IBizSubCuenta): Boolean;
|
||||
function Guardar(ASubCuenta : IBizSubCuenta): Boolean;
|
||||
procedure DescartarCambios(ASubCuenta : IBizSubCuenta);
|
||||
@ -33,12 +37,14 @@ type
|
||||
|
||||
procedure ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
||||
procedure VerSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
||||
procedure EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
end;
|
||||
|
||||
TSubCuentasController = class(TObservador, ISubCuentasController)
|
||||
private
|
||||
function BuscarCuentas(TipoCuenta: String): IBizSubCuenta;
|
||||
procedure AsignarSubCuentaAContacto(ASubCuenta: IBizSubCuenta; ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
|
||||
protected
|
||||
FDataModule : IDataModuleContabilidad;
|
||||
@ -58,6 +64,7 @@ type
|
||||
function Guardar(ASubCuenta : IBizSubCuenta): Boolean; virtual;
|
||||
procedure DescartarCambios(ASubCuenta : IBizSubCuenta); virtual;
|
||||
procedure Anadir(ASubCuenta : IBizSubCuenta);
|
||||
function Nuevo : IBizSubCuenta;
|
||||
function BuscarTodos: IBizSubCuenta;
|
||||
function Buscar(ID: Integer): IBizSubCuenta;
|
||||
procedure VerTodos(ASubCuentas: IBizSubCuenta);
|
||||
@ -71,7 +78,8 @@ type
|
||||
|
||||
procedure ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
||||
procedure VerSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
||||
procedure EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -90,9 +98,13 @@ begin
|
||||
ASubCuenta.Insert;
|
||||
end;
|
||||
|
||||
procedure TSubCuentasController.AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
procedure TSubCuentasController.AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
||||
var
|
||||
ASubCuenta: IBizSubCuenta;
|
||||
begin
|
||||
//
|
||||
ASubCuenta := Nuevo;
|
||||
Ver(ASubCuenta);
|
||||
AsignarSubCuentaAContacto(ASubCuenta, ASubCuentaContacto);
|
||||
end;
|
||||
|
||||
procedure TSubCuentasController.AsignarDataModule;
|
||||
@ -100,6 +112,20 @@ begin
|
||||
FDataModule := TDataModuleContabilidad.Create(Nil);
|
||||
end;
|
||||
|
||||
procedure TSubCuentasController.AsignarSubCuentaAContacto(ASubCuenta: IBizSubCuenta; ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
begin
|
||||
if Assigned(ASubCuenta) then
|
||||
begin
|
||||
EliminarSubCuentaContacto(ASubCuentaContacto);
|
||||
|
||||
ASubCuentaContacto.Insert;
|
||||
ASubCuentaContacto.ID := ASubCuenta.ID;
|
||||
ASubCuentaContacto.REF_SUBCUENTA := ASubCuenta.REF_SUBCUENTA;
|
||||
ASubCuentaContacto.DESCRIPCION := ASubCuenta.DESCRIPCION;
|
||||
ASubCuentaContacto.post;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TSubCuentasController.Buscar(ID: Integer): IBizSubCuenta;
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
@ -352,20 +378,12 @@ var
|
||||
ASubCuenta: IBizSubCuenta;
|
||||
begin
|
||||
ASubCuenta := BuscarCuentas(TipoCuenta);
|
||||
ASubCuenta := ElegirSubCuenta(ASubCuenta, 'sddsdsdsfsdf', False);
|
||||
if (TipoCuenta = CTE_CUENTASCLIENTE) then
|
||||
ASubCuenta := ElegirSubCuenta(ASubCuenta, 'El cliente debe tener una subcuenta asociada', False)
|
||||
else
|
||||
ASubCuenta := ElegirSubCuenta(ASubCuenta, 'El proveedor debe tener una subcuenta asociada', False);
|
||||
|
||||
if Assigned(ASubCuenta) then
|
||||
begin
|
||||
if Assigned(ASubCuentaContacto)
|
||||
and (ASubCuentaContacto.DataTable.RecordCount > 0) then
|
||||
ASubCuentaContacto.DataTable.Delete;
|
||||
|
||||
ASubCuentaContacto.Insert;
|
||||
ASubCuentaContacto.ID := ASubCuenta.ID;
|
||||
ASubCuentaContacto.REF_SUBCUENTA := ASubCuenta.REF_SUBCUENTA;
|
||||
ASubCuentaContacto.DESCRIPCION := ASubCuenta.DESCRIPCION;
|
||||
ASubCuentaContacto.post;
|
||||
end;
|
||||
AsignarSubCuentaAContacto(ASubCuenta, ASubCuentaContacto);
|
||||
end;
|
||||
|
||||
function TSubCuentasController.Eliminar(ASubCuenta: IBizSubCuenta): Boolean;
|
||||
@ -389,6 +407,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSubCuentasController.EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
begin
|
||||
if Assigned(ASubCuentaContacto)
|
||||
and (not ASubCuentaContacto.DataTable.IsEmpty) then
|
||||
ASubCuentaContacto.DataTable.Delete;
|
||||
end;
|
||||
|
||||
function TSubCuentasController.ExtraerSeleccionados(ASubCuentas: IBizSubCuenta): IBizSubCuenta;
|
||||
var
|
||||
ASeleccionados : IBizSubCuenta;
|
||||
@ -458,4 +483,15 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TSubCuentasController.Nuevo: IBizSubCuenta;
|
||||
var
|
||||
ASubCuenta : IBizSubCuenta;
|
||||
begin
|
||||
ASubCuenta := FDataModule.NewSubCuentaItem;
|
||||
FiltrarEjercicio(ASubCuenta);
|
||||
ASubCuenta.DataTable.Active := True;
|
||||
ASubCuenta.Insert;
|
||||
Result := ASubCuenta;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -537,6 +537,14 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
|
||||
Name = 'ID_ASIENTO'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ID_FACTURA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ID_PAGO'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ORDEN_ASIENTO'
|
||||
DataType = datInteger
|
||||
|
||||
@ -41,6 +41,8 @@ type
|
||||
function GetEpigrafeItems: IBizEpigrafe;
|
||||
function GetCuentaItems: IBizCuenta;
|
||||
function GetSubCuentaItems: IBizSubCuenta;
|
||||
function GetSubCuentaItem(const ID: Integer): IBizSubCuenta;
|
||||
function NewSubCuentaItem : IBizSubCuenta;
|
||||
function GetDiarioItems: IBizDiario;
|
||||
function GetAsientoItem(const ID : Integer): IBizAsiento;
|
||||
function GetCuentaEspecialItems: IBizCuentaEspecial;
|
||||
@ -167,6 +169,36 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDataModuleContabilidad.GetSubCuentaItem(const ID: Integer): IBizSubCuenta;
|
||||
var
|
||||
ASubCuenta : TDAMemDataTable;
|
||||
Condicion: TDAWhereExpression;
|
||||
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
ASubCuenta := CloneDataTable(tbl_SubCuentas);
|
||||
ASubCuenta.BusinessRulesID := BIZ_CLIENT_SUBCUENTA;
|
||||
|
||||
//Filtramos por el ID del asiento
|
||||
with ASubCuenta.DynamicWhere do
|
||||
begin
|
||||
// (ID = :ID)
|
||||
Condicion := NewBinaryExpression(NewField('', fld_SubCuentasID), NewConstant(ID, datInteger), dboEqual);
|
||||
|
||||
if IsEmpty then
|
||||
Expression := Condicion
|
||||
else
|
||||
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
|
||||
end;
|
||||
|
||||
Result := (ASubCuenta as IBizSubCuenta);
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
function TDataModuleContabilidad.GetSubCuentaItems: IBizSubCuenta;
|
||||
var
|
||||
AContabilidadSubCuenta : TDAMemDataTable;
|
||||
@ -181,6 +213,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDataModuleContabilidad.NewSubCuentaItem: IBizSubCuenta;
|
||||
begin
|
||||
Result := GetSubCuentaItem(ID_NULO)
|
||||
end;
|
||||
|
||||
function TDataModuleContabilidad._GetApuntes: IBizApunte;
|
||||
var
|
||||
AApuntes : TDAMemDataTable;
|
||||
|
||||
@ -14,6 +14,8 @@ type
|
||||
function GetBalanceItems: IBizBalance;
|
||||
function GetCuentaItems: IBizCuenta;
|
||||
function GetSubCuentaItems: IBizSubCuenta;
|
||||
function GetSubCuentaItem(const ID: Integer): IBizSubCuenta;
|
||||
function NewSubCuentaItem : IBizSubCuenta;
|
||||
function GetDiarioItems: IBizDiario;
|
||||
function GetAsientoItem(const ID : Integer): IBizAsiento;
|
||||
end;
|
||||
|
||||
@ -3,20 +3,20 @@ unit schContabilidadClient_Intf;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, DB, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
|
||||
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
|
||||
|
||||
const
|
||||
{ Data table rules ids
|
||||
Feel free to change them to something more human readable
|
||||
but make sure they are unique in the context of your application }
|
||||
RID_Diario = '{D82D3AB7-DF24-495E-8364-FE35C84A5B98}';
|
||||
RID_Apuntes = '{DB1540B8-60CF-41C1-9583-9DB8B436C90C}';
|
||||
RID_Asientos = '{25DD3D96-A3B1-4D2E-906D-5426063FC28B}';
|
||||
RID_SubCuentas = '{84DF18AF-8F7D-4059-A27D-498675555921}';
|
||||
RID_Cuentas = '{B4E99ED2-DEB9-4329-BAEB-7D68DEABB3BF}';
|
||||
RID_CuentasEspeciales = '{EAE10E2C-BA4C-4EBD-A88B-1E7D7315A189}';
|
||||
RID_Epigrafes = '{404E197C-5984-49EC-AE04-64D0E212112B}';
|
||||
RID_Balances = '{425C6D97-157D-4372-9312-FB797BDEADDF}';
|
||||
RID_Diario = '{0787046F-120C-4A01-8A04-584EE4380231}';
|
||||
RID_Apuntes = '{1E9E82E8-BF6A-4D59-94D2-FCFE941ECC5A}';
|
||||
RID_Asientos = '{FF4D35EE-F484-4318-BF3D-541AC6FF6E1D}';
|
||||
RID_SubCuentas = '{58254752-2847-4AF2-8324-A1420A0A5587}';
|
||||
RID_Cuentas = '{24DC0F53-D8EE-4961-B48B-410B729E42A8}';
|
||||
RID_CuentasEspeciales = '{01080B38-4450-490F-8598-413CF0101622}';
|
||||
RID_Epigrafes = '{A59D6410-3CDA-432F-BE68-4DD6874B49A4}';
|
||||
RID_Balances = '{514D2B6D-C0EA-4888-9961-1B334BC21C7B}';
|
||||
|
||||
{ Data table names }
|
||||
nme_Diario = 'Diario';
|
||||
@ -31,6 +31,8 @@ const
|
||||
{ Diario fields }
|
||||
fld_DiarioID_APUNTE = 'ID_APUNTE';
|
||||
fld_DiarioID_ASIENTO = 'ID_ASIENTO';
|
||||
fld_DiarioID_FACTURA = 'ID_FACTURA';
|
||||
fld_DiarioID_PAGO = 'ID_PAGO';
|
||||
fld_DiarioORDEN_ASIENTO = 'ORDEN_ASIENTO';
|
||||
fld_DiarioFECHA_ASIENTO = 'FECHA_ASIENTO';
|
||||
fld_DiarioID_SUBCUENTA = 'ID_SUBCUENTA';
|
||||
@ -45,16 +47,18 @@ const
|
||||
{ Diario field indexes }
|
||||
idx_DiarioID_APUNTE = 0;
|
||||
idx_DiarioID_ASIENTO = 1;
|
||||
idx_DiarioORDEN_ASIENTO = 2;
|
||||
idx_DiarioFECHA_ASIENTO = 3;
|
||||
idx_DiarioID_SUBCUENTA = 4;
|
||||
idx_DiarioREF_SUBCUENTA = 5;
|
||||
idx_DiarioID_EJERCICIO = 6;
|
||||
idx_DiarioCONCEPTO = 7;
|
||||
idx_DiarioDOCUMENTO = 8;
|
||||
idx_DiarioDEBE = 9;
|
||||
idx_DiarioHABER = 10;
|
||||
idx_DiarioPUNTEADO = 11;
|
||||
idx_DiarioID_FACTURA = 2;
|
||||
idx_DiarioID_PAGO = 3;
|
||||
idx_DiarioORDEN_ASIENTO = 4;
|
||||
idx_DiarioFECHA_ASIENTO = 5;
|
||||
idx_DiarioID_SUBCUENTA = 6;
|
||||
idx_DiarioREF_SUBCUENTA = 7;
|
||||
idx_DiarioID_EJERCICIO = 8;
|
||||
idx_DiarioCONCEPTO = 9;
|
||||
idx_DiarioDOCUMENTO = 10;
|
||||
idx_DiarioDEBE = 11;
|
||||
idx_DiarioHABER = 12;
|
||||
idx_DiarioPUNTEADO = 13;
|
||||
|
||||
{ Apuntes fields }
|
||||
fld_ApuntesID = 'ID';
|
||||
@ -197,7 +201,7 @@ const
|
||||
type
|
||||
{ IDiario }
|
||||
IDiario = interface(IDAStronglyTypedDataTable)
|
||||
['{44E078C5-01C0-49EA-BC54-7D59EC624B99}']
|
||||
['{34F50D3B-CCFF-43ED-93B0-93F76A7E84FB}']
|
||||
{ Property getters and setters }
|
||||
function GetID_APUNTEValue: Integer;
|
||||
procedure SetID_APUNTEValue(const aValue: Integer);
|
||||
@ -207,6 +211,14 @@ type
|
||||
procedure SetID_ASIENTOValue(const aValue: Integer);
|
||||
function GetID_ASIENTOIsNull: Boolean;
|
||||
procedure SetID_ASIENTOIsNull(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_PAGOValue: Integer;
|
||||
procedure SetID_PAGOValue(const aValue: Integer);
|
||||
function GetID_PAGOIsNull: Boolean;
|
||||
procedure SetID_PAGOIsNull(const aValue: Boolean);
|
||||
function GetORDEN_ASIENTOValue: Integer;
|
||||
procedure SetORDEN_ASIENTOValue(const aValue: Integer);
|
||||
function GetORDEN_ASIENTOIsNull: Boolean;
|
||||
@ -254,6 +266,10 @@ type
|
||||
property ID_APUNTEIsNull: Boolean read GetID_APUNTEIsNull write SetID_APUNTEIsNull;
|
||||
property ID_ASIENTO: Integer read GetID_ASIENTOValue write SetID_ASIENTOValue;
|
||||
property ID_ASIENTOIsNull: Boolean read GetID_ASIENTOIsNull write SetID_ASIENTOIsNull;
|
||||
property ID_FACTURA: Integer read GetID_FACTURAValue write SetID_FACTURAValue;
|
||||
property ID_FACTURAIsNull: Boolean read GetID_FACTURAIsNull write SetID_FACTURAIsNull;
|
||||
property ID_PAGO: Integer read GetID_PAGOValue write SetID_PAGOValue;
|
||||
property ID_PAGOIsNull: Boolean read GetID_PAGOIsNull write SetID_PAGOIsNull;
|
||||
property ORDEN_ASIENTO: Integer read GetORDEN_ASIENTOValue write SetORDEN_ASIENTOValue;
|
||||
property ORDEN_ASIENTOIsNull: Boolean read GetORDEN_ASIENTOIsNull write SetORDEN_ASIENTOIsNull;
|
||||
property FECHA_ASIENTO: DateTime read GetFECHA_ASIENTOValue write SetFECHA_ASIENTOValue;
|
||||
@ -277,7 +293,7 @@ type
|
||||
end;
|
||||
|
||||
{ TDiarioDataTableRules }
|
||||
TDiarioDataTableRules = class(TDADataTableRules, IDiario)
|
||||
TDiarioDataTableRules = class(TIntfObjectDADataTableRules, IDiario)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
@ -289,6 +305,14 @@ type
|
||||
procedure SetID_ASIENTOValue(const aValue: Integer); virtual;
|
||||
function GetID_ASIENTOIsNull: Boolean; virtual;
|
||||
procedure SetID_ASIENTOIsNull(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_PAGOValue: Integer; virtual;
|
||||
procedure SetID_PAGOValue(const aValue: Integer); virtual;
|
||||
function GetID_PAGOIsNull: Boolean; virtual;
|
||||
procedure SetID_PAGOIsNull(const aValue: Boolean); virtual;
|
||||
function GetORDEN_ASIENTOValue: Integer; virtual;
|
||||
procedure SetORDEN_ASIENTOValue(const aValue: Integer); virtual;
|
||||
function GetORDEN_ASIENTOIsNull: Boolean; virtual;
|
||||
@ -335,6 +359,10 @@ type
|
||||
property ID_APUNTEIsNull: Boolean read GetID_APUNTEIsNull write SetID_APUNTEIsNull;
|
||||
property ID_ASIENTO: Integer read GetID_ASIENTOValue write SetID_ASIENTOValue;
|
||||
property ID_ASIENTOIsNull: Boolean read GetID_ASIENTOIsNull write SetID_ASIENTOIsNull;
|
||||
property ID_FACTURA: Integer read GetID_FACTURAValue write SetID_FACTURAValue;
|
||||
property ID_FACTURAIsNull: Boolean read GetID_FACTURAIsNull write SetID_FACTURAIsNull;
|
||||
property ID_PAGO: Integer read GetID_PAGOValue write SetID_PAGOValue;
|
||||
property ID_PAGOIsNull: Boolean read GetID_PAGOIsNull write SetID_PAGOIsNull;
|
||||
property ORDEN_ASIENTO: Integer read GetORDEN_ASIENTOValue write SetORDEN_ASIENTOValue;
|
||||
property ORDEN_ASIENTOIsNull: Boolean read GetORDEN_ASIENTOIsNull write SetORDEN_ASIENTOIsNull;
|
||||
property FECHA_ASIENTO: DateTime read GetFECHA_ASIENTOValue write SetFECHA_ASIENTOValue;
|
||||
@ -364,7 +392,7 @@ type
|
||||
|
||||
{ IApuntes }
|
||||
IApuntes = interface(IDAStronglyTypedDataTable)
|
||||
['{FA7E84FE-CFF8-43E4-8BCC-658C8AD5ED92}']
|
||||
['{39419296-F36C-4B17-A285-6AE774DE20EA}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -438,7 +466,7 @@ type
|
||||
end;
|
||||
|
||||
{ TApuntesDataTableRules }
|
||||
TApuntesDataTableRules = class(TDADataTableRules, IApuntes)
|
||||
TApuntesDataTableRules = class(TIntfObjectDADataTableRules, IApuntes)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
@ -519,7 +547,7 @@ type
|
||||
|
||||
{ IAsientos }
|
||||
IAsientos = interface(IDAStronglyTypedDataTable)
|
||||
['{4EDC82EE-6AB5-419D-8A46-4EA93B9FCE62}']
|
||||
['{29F8B64F-FFAF-4EC3-8E00-619240FAD65E}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -557,7 +585,7 @@ type
|
||||
end;
|
||||
|
||||
{ TAsientosDataTableRules }
|
||||
TAsientosDataTableRules = class(TDADataTableRules, IAsientos)
|
||||
TAsientosDataTableRules = class(TIntfObjectDADataTableRules, IAsientos)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
@ -602,7 +630,7 @@ type
|
||||
|
||||
{ ISubCuentas }
|
||||
ISubCuentas = interface(IDAStronglyTypedDataTable)
|
||||
['{2DF97A58-3A87-493F-BE0E-3B3A9AD434D1}']
|
||||
['{69CA1EDA-1F20-4C22-BB2F-CF83E6E20FC9}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -676,7 +704,7 @@ type
|
||||
end;
|
||||
|
||||
{ TSubCuentasDataTableRules }
|
||||
TSubCuentasDataTableRules = class(TDADataTableRules, ISubCuentas)
|
||||
TSubCuentasDataTableRules = class(TIntfObjectDADataTableRules, ISubCuentas)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
@ -757,7 +785,7 @@ type
|
||||
|
||||
{ ICuentas }
|
||||
ICuentas = interface(IDAStronglyTypedDataTable)
|
||||
['{224540E1-2427-45A3-8AE8-098EF584CC48}']
|
||||
['{30AD049D-68C8-42E3-ABCD-A9A23B39E1D4}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -825,7 +853,7 @@ type
|
||||
end;
|
||||
|
||||
{ TCuentasDataTableRules }
|
||||
TCuentasDataTableRules = class(TDADataTableRules, ICuentas)
|
||||
TCuentasDataTableRules = class(TIntfObjectDADataTableRules, ICuentas)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
@ -900,7 +928,7 @@ type
|
||||
|
||||
{ ICuentasEspeciales }
|
||||
ICuentasEspeciales = interface(IDAStronglyTypedDataTable)
|
||||
['{6C618900-0005-4D0E-BCBD-D16CC6943D4D}']
|
||||
['{9073F07B-053C-4FFA-BF6F-1A60A3278740}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -926,7 +954,7 @@ type
|
||||
end;
|
||||
|
||||
{ TCuentasEspecialesDataTableRules }
|
||||
TCuentasEspecialesDataTableRules = class(TDADataTableRules, ICuentasEspeciales)
|
||||
TCuentasEspecialesDataTableRules = class(TIntfObjectDADataTableRules, ICuentasEspeciales)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
@ -959,7 +987,7 @@ type
|
||||
|
||||
{ IEpigrafes }
|
||||
IEpigrafes = interface(IDAStronglyTypedDataTable)
|
||||
['{8D2F3AA1-A5A0-4BD2-AE75-02A77E561AC0}']
|
||||
['{22C174EC-EF8A-4673-9D7B-9B837DDFFC73}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -1003,7 +1031,7 @@ type
|
||||
end;
|
||||
|
||||
{ TEpigrafesDataTableRules }
|
||||
TEpigrafesDataTableRules = class(TDADataTableRules, IEpigrafes)
|
||||
TEpigrafesDataTableRules = class(TIntfObjectDADataTableRules, IEpigrafes)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
@ -1054,7 +1082,7 @@ type
|
||||
|
||||
{ IBalances }
|
||||
IBalances = interface(IDAStronglyTypedDataTable)
|
||||
['{1710F763-139F-4B4C-9AB8-565C7608CDC5}']
|
||||
['{6B889291-1E5D-4F50-90F4-0B0DBDB40031}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -1116,7 +1144,7 @@ type
|
||||
end;
|
||||
|
||||
{ TBalancesDataTableRules }
|
||||
TBalancesDataTableRules = class(TDADataTableRules, IBalances)
|
||||
TBalancesDataTableRules = class(TIntfObjectDADataTableRules, IBalances)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
@ -1240,6 +1268,48 @@ begin
|
||||
DataTable.Fields[idx_DiarioID_ASIENTO].AsVariant := Null;
|
||||
end;
|
||||
|
||||
function TDiarioDataTableRules.GetID_FACTURAValue: Integer;
|
||||
begin
|
||||
result := DataTable.Fields[idx_DiarioID_FACTURA].AsInteger;
|
||||
end;
|
||||
|
||||
procedure TDiarioDataTableRules.SetID_FACTURAValue(const aValue: Integer);
|
||||
begin
|
||||
DataTable.Fields[idx_DiarioID_FACTURA].AsInteger := aValue;
|
||||
end;
|
||||
|
||||
function TDiarioDataTableRules.GetID_FACTURAIsNull: boolean;
|
||||
begin
|
||||
result := DataTable.Fields[idx_DiarioID_FACTURA].IsNull;
|
||||
end;
|
||||
|
||||
procedure TDiarioDataTableRules.SetID_FACTURAIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
DataTable.Fields[idx_DiarioID_FACTURA].AsVariant := Null;
|
||||
end;
|
||||
|
||||
function TDiarioDataTableRules.GetID_PAGOValue: Integer;
|
||||
begin
|
||||
result := DataTable.Fields[idx_DiarioID_PAGO].AsInteger;
|
||||
end;
|
||||
|
||||
procedure TDiarioDataTableRules.SetID_PAGOValue(const aValue: Integer);
|
||||
begin
|
||||
DataTable.Fields[idx_DiarioID_PAGO].AsInteger := aValue;
|
||||
end;
|
||||
|
||||
function TDiarioDataTableRules.GetID_PAGOIsNull: boolean;
|
||||
begin
|
||||
result := DataTable.Fields[idx_DiarioID_PAGO].IsNull;
|
||||
end;
|
||||
|
||||
procedure TDiarioDataTableRules.SetID_PAGOIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
DataTable.Fields[idx_DiarioID_PAGO].AsVariant := Null;
|
||||
end;
|
||||
|
||||
function TDiarioDataTableRules.GetORDEN_ASIENTOValue: Integer;
|
||||
begin
|
||||
result := DataTable.Fields[idx_DiarioORDEN_ASIENTO].AsInteger;
|
||||
|
||||
@ -9,22 +9,24 @@ const
|
||||
{ Delta rules ids
|
||||
Feel free to change them to something more human readable
|
||||
but make sure they are unique in the context of your application }
|
||||
RID_DiarioDelta = '{A2BD28BD-6104-4050-A980-42D308B729CC}';
|
||||
RID_ApuntesDelta = '{77CF8AFF-894E-4CCC-B12B-694EB64A63B5}';
|
||||
RID_AsientosDelta = '{FBC0DED1-4573-4276-A430-60AD20D7CA81}';
|
||||
RID_SubCuentasDelta = '{E8522236-BC04-4A7A-8268-C4BB4CF8C186}';
|
||||
RID_CuentasDelta = '{02901439-401B-4A39-BC7F-9AA5D0AA3BB1}';
|
||||
RID_CuentasEspecialesDelta = '{60CA3AD9-10E2-4A89-B84E-413E469CA851}';
|
||||
RID_EpigrafesDelta = '{32161D74-2F7A-4BD5-8B4B-C2D8BB0B8B4B}';
|
||||
RID_BalancesDelta = '{430B2E47-5249-4A6F-9FE2-5307953BEB95}';
|
||||
RID_DiarioDelta = '{489AF8EC-B8CA-4327-8D7D-1E69C3F5D2CF}';
|
||||
RID_ApuntesDelta = '{63516B07-1307-4ED4-A78D-6A706E53F262}';
|
||||
RID_AsientosDelta = '{4091C97B-82C3-4C9E-AFF7-1A647A9A8F9F}';
|
||||
RID_SubCuentasDelta = '{627EB32A-BD56-4A63-B354-D1E03FAFB7A9}';
|
||||
RID_CuentasDelta = '{7C6308C3-D09C-49BB-8FCD-D557B421747D}';
|
||||
RID_CuentasEspecialesDelta = '{18300F58-6909-4C4A-9755-52B39262CC58}';
|
||||
RID_EpigrafesDelta = '{61340163-241D-4DF6-9CE2-807E5CD1A2E7}';
|
||||
RID_BalancesDelta = '{BB5830B6-4776-4278-B840-4D6453A709CA}';
|
||||
|
||||
type
|
||||
{ IDiarioDelta }
|
||||
IDiarioDelta = interface(IDiario)
|
||||
['{A2BD28BD-6104-4050-A980-42D308B729CC}']
|
||||
['{489AF8EC-B8CA-4327-8D7D-1E69C3F5D2CF}']
|
||||
{ Property getters and setters }
|
||||
function GetOldID_APUNTEValue : Integer;
|
||||
function GetOldID_ASIENTOValue : Integer;
|
||||
function GetOldID_FACTURAValue : Integer;
|
||||
function GetOldID_PAGOValue : Integer;
|
||||
function GetOldORDEN_ASIENTOValue : Integer;
|
||||
function GetOldFECHA_ASIENTOValue : DateTime;
|
||||
function GetOldID_SUBCUENTAValue : Integer;
|
||||
@ -39,6 +41,8 @@ type
|
||||
{ Properties }
|
||||
property OldID_APUNTE : Integer read GetOldID_APUNTEValue;
|
||||
property OldID_ASIENTO : Integer read GetOldID_ASIENTOValue;
|
||||
property OldID_FACTURA : Integer read GetOldID_FACTURAValue;
|
||||
property OldID_PAGO : Integer read GetOldID_PAGOValue;
|
||||
property OldORDEN_ASIENTO : Integer read GetOldORDEN_ASIENTOValue;
|
||||
property OldFECHA_ASIENTO : DateTime read GetOldFECHA_ASIENTOValue;
|
||||
property OldID_SUBCUENTA : Integer read GetOldID_SUBCUENTAValue;
|
||||
@ -68,6 +72,18 @@ type
|
||||
function GetOldID_ASIENTOIsNull: Boolean; virtual;
|
||||
procedure SetID_ASIENTOValue(const aValue: Integer); virtual;
|
||||
procedure SetID_ASIENTOIsNull(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_PAGOValue: Integer; virtual;
|
||||
function GetID_PAGOIsNull: Boolean; virtual;
|
||||
function GetOldID_PAGOValue: Integer; virtual;
|
||||
function GetOldID_PAGOIsNull: Boolean; virtual;
|
||||
procedure SetID_PAGOValue(const aValue: Integer); virtual;
|
||||
procedure SetID_PAGOIsNull(const aValue: Boolean); virtual;
|
||||
function GetORDEN_ASIENTOValue: Integer; virtual;
|
||||
function GetORDEN_ASIENTOIsNull: Boolean; virtual;
|
||||
function GetOldORDEN_ASIENTOValue: Integer; virtual;
|
||||
@ -138,6 +154,14 @@ type
|
||||
property ID_ASIENTOIsNull : Boolean read GetID_ASIENTOIsNull write SetID_ASIENTOIsNull;
|
||||
property OldID_ASIENTO : Integer read GetOldID_ASIENTOValue;
|
||||
property OldID_ASIENTOIsNull : Boolean read GetOldID_ASIENTOIsNull;
|
||||
property 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_PAGO : Integer read GetID_PAGOValue write SetID_PAGOValue;
|
||||
property ID_PAGOIsNull : Boolean read GetID_PAGOIsNull write SetID_PAGOIsNull;
|
||||
property OldID_PAGO : Integer read GetOldID_PAGOValue;
|
||||
property OldID_PAGOIsNull : Boolean read GetOldID_PAGOIsNull;
|
||||
property ORDEN_ASIENTO : Integer read GetORDEN_ASIENTOValue write SetORDEN_ASIENTOValue;
|
||||
property ORDEN_ASIENTOIsNull : Boolean read GetORDEN_ASIENTOIsNull write SetORDEN_ASIENTOIsNull;
|
||||
property OldORDEN_ASIENTO : Integer read GetOldORDEN_ASIENTOValue;
|
||||
@ -187,7 +211,7 @@ type
|
||||
|
||||
{ IApuntesDelta }
|
||||
IApuntesDelta = interface(IApuntes)
|
||||
['{77CF8AFF-894E-4CCC-B12B-694EB64A63B5}']
|
||||
['{63516B07-1307-4ED4-A78D-6A706E53F262}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldID_ASIENTOValue : Integer;
|
||||
@ -341,7 +365,7 @@ type
|
||||
|
||||
{ IAsientosDelta }
|
||||
IAsientosDelta = interface(IAsientos)
|
||||
['{FBC0DED1-4573-4276-A430-60AD20D7CA81}']
|
||||
['{4091C97B-82C3-4C9E-AFF7-1A647A9A8F9F}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldFECHA_ASIENTOValue : DateTime;
|
||||
@ -423,7 +447,7 @@ type
|
||||
|
||||
{ ISubCuentasDelta }
|
||||
ISubCuentasDelta = interface(ISubCuentas)
|
||||
['{E8522236-BC04-4A7A-8268-C4BB4CF8C186}']
|
||||
['{627EB32A-BD56-4A63-B354-D1E03FAFB7A9}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldREF_SUBCUENTAValue : String;
|
||||
@ -577,7 +601,7 @@ type
|
||||
|
||||
{ ICuentasDelta }
|
||||
ICuentasDelta = interface(ICuentas)
|
||||
['{02901439-401B-4A39-BC7F-9AA5D0AA3BB1}']
|
||||
['{7C6308C3-D09C-49BB-8FCD-D557B421747D}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldREF_CUENTAValue : String;
|
||||
@ -719,7 +743,7 @@ type
|
||||
|
||||
{ ICuentasEspecialesDelta }
|
||||
ICuentasEspecialesDelta = interface(ICuentasEspeciales)
|
||||
['{60CA3AD9-10E2-4A89-B84E-413E469CA851}']
|
||||
['{18300F58-6909-4C4A-9755-52B39262CC58}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldREFERENCIAValue : String;
|
||||
@ -777,7 +801,7 @@ type
|
||||
|
||||
{ IEpigrafesDelta }
|
||||
IEpigrafesDelta = interface(IEpigrafes)
|
||||
['{32161D74-2F7A-4BD5-8B4B-C2D8BB0B8B4B}']
|
||||
['{61340163-241D-4DF6-9CE2-807E5CD1A2E7}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldREF_EPIGRAFEValue : String;
|
||||
@ -871,7 +895,7 @@ type
|
||||
|
||||
{ IBalancesDelta }
|
||||
IBalancesDelta = interface(IBalances)
|
||||
['{430B2E47-5249-4A6F-9FE2-5307953BEB95}']
|
||||
['{BB5830B6-4776-4278-B840-4D6453A709CA}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldREF_BALANCEValue : String;
|
||||
@ -1077,6 +1101,68 @@ begin
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_ASIENTO] := Null;
|
||||
end;
|
||||
|
||||
function TDiarioBusinessProcessorRules.GetID_FACTURAValue: Integer;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_FACTURA];
|
||||
end;
|
||||
|
||||
function TDiarioBusinessProcessorRules.GetID_FACTURAIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_FACTURA]);
|
||||
end;
|
||||
|
||||
function TDiarioBusinessProcessorRules.GetOldID_FACTURAValue: Integer;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioID_FACTURA];
|
||||
end;
|
||||
|
||||
function TDiarioBusinessProcessorRules.GetOldID_FACTURAIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioID_FACTURA]);
|
||||
end;
|
||||
|
||||
procedure TDiarioBusinessProcessorRules.SetID_FACTURAValue(const aValue: Integer);
|
||||
begin
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_FACTURA] := aValue;
|
||||
end;
|
||||
|
||||
procedure TDiarioBusinessProcessorRules.SetID_FACTURAIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_FACTURA] := Null;
|
||||
end;
|
||||
|
||||
function TDiarioBusinessProcessorRules.GetID_PAGOValue: Integer;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_PAGO];
|
||||
end;
|
||||
|
||||
function TDiarioBusinessProcessorRules.GetID_PAGOIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_PAGO]);
|
||||
end;
|
||||
|
||||
function TDiarioBusinessProcessorRules.GetOldID_PAGOValue: Integer;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioID_PAGO];
|
||||
end;
|
||||
|
||||
function TDiarioBusinessProcessorRules.GetOldID_PAGOIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DiarioID_PAGO]);
|
||||
end;
|
||||
|
||||
procedure TDiarioBusinessProcessorRules.SetID_PAGOValue(const aValue: Integer);
|
||||
begin
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_PAGO] := aValue;
|
||||
end;
|
||||
|
||||
procedure TDiarioBusinessProcessorRules.SetID_PAGOIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioID_PAGO] := Null;
|
||||
end;
|
||||
|
||||
function TDiarioBusinessProcessorRules.GetORDEN_ASIENTOValue: Integer;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DiarioORDEN_ASIENTO];
|
||||
|
||||
@ -70,7 +70,7 @@ end;
|
||||
|
||||
procedure TBizAsiento.IniciarValoresAsientoNueva;
|
||||
begin
|
||||
// ID_EJERCICIO := AppFactuGES.EjercicioActivo.ID;
|
||||
FECHA_ASIENTO := Date;
|
||||
end;
|
||||
|
||||
procedure TBizAsiento.OnNewRecord(Sender: TDADataTable);
|
||||
|
||||
@ -357,6 +357,10 @@ object srvContabilidad: TsrvContabilidad
|
||||
DatasetField = 'ID_ASIENTO'
|
||||
TableField = 'ID_ASIENTO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_FACTURA'
|
||||
TableField = 'ID_FACTURA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ORDEN_ASIENTO'
|
||||
TableField = 'ORDEN_ASIENTO'
|
||||
@ -396,6 +400,10 @@ object srvContabilidad: TsrvContabilidad
|
||||
item
|
||||
DatasetField = 'PUNTEADO'
|
||||
TableField = 'PUNTEADO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_PAGO'
|
||||
TableField = 'ID_PAGO'
|
||||
end>
|
||||
end>
|
||||
Name = 'Diario'
|
||||
@ -409,6 +417,14 @@ object srvContabilidad: TsrvContabilidad
|
||||
Name = 'ID_ASIENTO'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ID_FACTURA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ID_PAGO'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ORDEN_ASIENTO'
|
||||
DataType = datInteger
|
||||
|
||||
Binary file not shown.
@ -2,6 +2,7 @@ inherited fEditorDiario: TfEditorDiario
|
||||
Left = 489
|
||||
Top = 325
|
||||
Caption = 'Libro de diario'
|
||||
ExplicitWidth = 320
|
||||
ExplicitHeight = 471
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
@ -31,7 +32,7 @@ inherited fEditorDiario: TfEditorDiario
|
||||
end
|
||||
inherited TBXDock: TTBXDock
|
||||
inherited tbxMain: TTBXToolbar
|
||||
ExplicitWidth = 474
|
||||
ExplicitWidth = 403
|
||||
end
|
||||
inherited tbxFiltro: TTBXToolbar
|
||||
ExplicitWidth = 269
|
||||
@ -70,6 +71,27 @@ inherited fEditorDiario: TfEditorDiario
|
||||
Height = 195
|
||||
ExplicitWidth = 543
|
||||
ExplicitHeight = 195
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Format = ',0.00 '#8364';-,0.00 '#8364
|
||||
Kind = skSum
|
||||
Column = frViewDiario1.cxGridViewDEBE
|
||||
end
|
||||
item
|
||||
Format = ',0.00 '#8364';-,0.00 '#8364
|
||||
Kind = skSum
|
||||
Column = frViewDiario1.cxGridViewHABER
|
||||
end
|
||||
item
|
||||
Format = #218'ltimo orden 0'
|
||||
Kind = skMax
|
||||
Column = frViewDiario1.cxGridViewORDEN
|
||||
end>
|
||||
inherited cxGridViewID_ASIENTO: TcxGridDBColumn
|
||||
IsCaptionAssigned = True
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
Width = 543
|
||||
@ -141,6 +163,10 @@ inherited fEditorDiario: TfEditorDiario
|
||||
inherited actNuevo: TAction
|
||||
ImageIndex = 22
|
||||
end
|
||||
inherited actDuplicar: TAction
|
||||
Enabled = False
|
||||
Visible = False
|
||||
end
|
||||
end
|
||||
inherited SmallImages: TPngImageList [5]
|
||||
PngImages = <
|
||||
|
||||
@ -18,6 +18,8 @@ type
|
||||
TfEditorDiario = class(TfEditorGridBase, IEditorDiario)
|
||||
frViewDiario1: TfrViewDiario;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure actModificarUpdate(Sender: TObject);
|
||||
procedure actEliminarUpdate(Sender: TObject);
|
||||
private
|
||||
FDiario: IBizDiario;
|
||||
FController : IAsientosController;
|
||||
@ -84,9 +86,15 @@ begin
|
||||
end;
|
||||
|
||||
procedure TfEditorDiario.NuevoInterno;
|
||||
var
|
||||
NumOrden: Integer;
|
||||
begin
|
||||
inherited;
|
||||
FController.Ver(FController.Anadir);
|
||||
|
||||
NumOrden := ViewGrid._FocusedView.DataController.Summary.FooterSummaryValues[2];
|
||||
Inc(NumOrden);
|
||||
|
||||
FController.Ver(FController.Anadir(NumOrden));
|
||||
end;
|
||||
|
||||
procedure TfEditorDiario.PonerTitulos(const ATitulo: string);
|
||||
@ -147,6 +155,22 @@ begin
|
||||
}
|
||||
end;
|
||||
|
||||
procedure TfEditorDiario.actEliminarUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
if (Sender as TAction).Enabled then
|
||||
if Assigned(Diario) then
|
||||
(Sender as TAction).Enabled := Diario.ID_FACTURAIsNull and Diario.ID_PAGOIsNull;
|
||||
end;
|
||||
|
||||
procedure TfEditorDiario.actModificarUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
if (Sender as TAction).Enabled then
|
||||
if Assigned(Diario) then
|
||||
(Sender as TAction).Enabled := Diario.ID_FACTURAIsNull and Diario.ID_PAGOIsNull;
|
||||
end;
|
||||
|
||||
constructor TfEditorDiario.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
inherited fEditorElegirSubCuentas: TfEditorElegirSubCuentas
|
||||
Caption = 'Seleccionar pedido de cliente'
|
||||
Caption = 'Seleccionar subcuenta'
|
||||
ClientWidth = 656
|
||||
ExplicitWidth = 664
|
||||
PixelsPerInch = 96
|
||||
@ -25,7 +25,7 @@ inherited fEditorElegirSubCuentas: TfEditorElegirSubCuentas
|
||||
SymbolFont.Name = 'Wingdings'
|
||||
SymbolFont.Style = [fsBold]
|
||||
Captions.Strings = (
|
||||
'Seleccione el pedido de proveedor')
|
||||
'Seleccione la subcuenta')
|
||||
Comments.Strings = (
|
||||
' ')
|
||||
Gradient.FromColor = clHighlight
|
||||
@ -37,7 +37,7 @@ inherited fEditorElegirSubCuentas: TfEditorElegirSubCuentas
|
||||
end
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
Width = 656
|
||||
Caption = 'Lista de pedidos de proveedor'
|
||||
Caption = 'Lista de subcuentas'
|
||||
Visible = False
|
||||
ExplicitWidth = 656
|
||||
inherited Image1: TImage
|
||||
@ -164,9 +164,17 @@ inherited fEditorElegirSubCuentas: TfEditorElegirSubCuentas
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
Width = 656
|
||||
ExplicitWidth = 656
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
ExplicitWidth = 273
|
||||
Width = 273
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
ExplicitWidth = 121
|
||||
Width = 121
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Left = 294
|
||||
ExplicitLeft = 294
|
||||
Left = 225
|
||||
ExplicitLeft = 225
|
||||
ExplicitWidth = 421
|
||||
Width = 421
|
||||
end
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -27,6 +27,14 @@ inherited frViewDiario: TfrViewDiario
|
||||
DataBinding.FieldName = 'ID_APUNTE'
|
||||
Visible = False
|
||||
end
|
||||
object cxGridViewID_FACTURA: TcxGridDBColumn
|
||||
Caption = 'Fac.Asoc.'
|
||||
DataBinding.FieldName = 'ID_FACTURA'
|
||||
end
|
||||
object cxGridViewID_PAGO: TcxGridDBColumn
|
||||
Caption = 'Pag.Asoc.'
|
||||
DataBinding.FieldName = 'ID_PAGO'
|
||||
end
|
||||
object cxGridViewFECHA_ASIENTO: TcxGridDBColumn
|
||||
Caption = 'Fecha asiento'
|
||||
DataBinding.FieldName = 'FECHA_ASIENTO'
|
||||
@ -64,9 +72,6 @@ inherited frViewDiario: TfrViewDiario
|
||||
DataBinding.FieldName = 'HABER'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
end
|
||||
object cxGridViewID_FACTURA: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ID_FACTURA'
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
|
||||
@ -36,6 +36,7 @@ type
|
||||
cxGridViewORDEN: TcxGridDBColumn;
|
||||
cxGridViewID_APUNTE: TcxGridDBColumn;
|
||||
cxGridViewID_FACTURA: TcxGridDBColumn;
|
||||
cxGridViewID_PAGO: TcxGridDBColumn;
|
||||
procedure cxGridViewID_AsientoCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
protected
|
||||
|
||||
3276
Source/Modulos/Contabilidad/schContabilidadServer_Intf.pas
Normal file
3276
Source/Modulos/Contabilidad/schContabilidadServer_Intf.pas
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user