Tarea #122
Tarea #249 git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@989 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
26314b07a2
commit
68a46c6c23
@ -607,7 +607,8 @@ CREATE TABLE EMPRESAS (
|
|||||||
PARAM_TIEMPO TIPO_IMPORTE,
|
PARAM_TIEMPO TIPO_IMPORTE,
|
||||||
PARAM_MARGEN TIPO_PORCENTAJE,
|
PARAM_MARGEN TIPO_PORCENTAJE,
|
||||||
ID_TIPO_IVA SMALLINT,
|
ID_TIPO_IVA SMALLINT,
|
||||||
ID_FORMA_PAGO SMALLINT
|
ID_FORMA_PAGO SMALLINT,
|
||||||
|
ID_ALMACEN SMALLINT
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE EMPRESAS_CONTACTOS (
|
CREATE TABLE EMPRESAS_CONTACTOS (
|
||||||
|
|||||||
@ -27,8 +27,10 @@ type
|
|||||||
|
|
||||||
function DarListaFormasPago: TStringList;
|
function DarListaFormasPago: TStringList;
|
||||||
function DarListaTiposIVA: TStringList;
|
function DarListaTiposIVA: TStringList;
|
||||||
|
function DarListaAlmacenes(const ID_EMPRESA: Integer): TStringList;
|
||||||
Procedure AsignarIDFormaPago(AEmpresa: IBizEmpresa; const IDFormaPago: Variant);
|
Procedure AsignarIDFormaPago(AEmpresa: IBizEmpresa; const IDFormaPago: Variant);
|
||||||
Procedure AsignarIDTipoIVA(AEmpresa: IBizEmpresa; const IDTipoIVA: Variant);
|
Procedure AsignarIDTipoIVA(AEmpresa: IBizEmpresa; const IDTipoIVA: Variant);
|
||||||
|
Procedure AsignarIDAlmacen(AEmpresa: IBizEmpresa; const IDAlmacen: Variant);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TEmpresasController = class(TControllerBase, IEmpresasController)
|
TEmpresasController = class(TControllerBase, IEmpresasController)
|
||||||
@ -57,8 +59,10 @@ type
|
|||||||
|
|
||||||
function DarListaFormasPago: TStringList;
|
function DarListaFormasPago: TStringList;
|
||||||
function DarListaTiposIVA: TStringList;
|
function DarListaTiposIVA: TStringList;
|
||||||
|
function DarListaAlmacenes(const ID_EMPRESA: Integer): TStringList;
|
||||||
Procedure AsignarIDFormaPago(AEmpresa: IBizEmpresa; const IDFormaPago: Variant);
|
Procedure AsignarIDFormaPago(AEmpresa: IBizEmpresa; const IDFormaPago: Variant);
|
||||||
Procedure AsignarIDTipoIVA(AEmpresa: IBizEmpresa; const IDTipoIVA: Variant);
|
Procedure AsignarIDTipoIVA(AEmpresa: IBizEmpresa; const IDTipoIVA: Variant);
|
||||||
|
Procedure AsignarIDAlmacen(AEmpresa: IBizEmpresa; const IDAlmacen: Variant);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -74,6 +78,22 @@ begin
|
|||||||
AEmpresa.Insert;
|
AEmpresa.Insert;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TEmpresasController.AsignarIDAlmacen(AEmpresa: IBizEmpresa; const IDAlmacen: Variant);
|
||||||
|
begin
|
||||||
|
if Assigned(AEmpresa) then
|
||||||
|
begin
|
||||||
|
if not AEmpresa.DataTable.Editing then
|
||||||
|
AEmpresa.DataTable.Edit;
|
||||||
|
|
||||||
|
if EsCadenaVacia(IDAlmacen) then
|
||||||
|
AEmpresa.ID_ALMACENIsNull := true
|
||||||
|
else
|
||||||
|
AEmpresa.ID_ALMACEN := IDAlmacen;
|
||||||
|
|
||||||
|
AEmpresa.DataTable.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TEmpresasController.AsignarIDFormaPago(AEmpresa: IBizEmpresa;
|
procedure TEmpresasController.AsignarIDFormaPago(AEmpresa: IBizEmpresa;
|
||||||
const IDFormaPago: Variant);
|
const IDFormaPago: Variant);
|
||||||
begin
|
begin
|
||||||
@ -124,6 +144,16 @@ begin
|
|||||||
FDataModule := TDataModuleEmpresas.Create(Nil);
|
FDataModule := TDataModuleEmpresas.Create(Nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TEmpresasController.DarListaAlmacenes(const ID_EMPRESA: Integer): TStringList;
|
||||||
|
begin
|
||||||
|
ShowHourglassCursor;
|
||||||
|
try
|
||||||
|
Result := FDataModule.DarListaAlmacenes(ID_EMPRESA);
|
||||||
|
finally
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TEmpresasController.DarListaCuentasBancarias(
|
function TEmpresasController.DarListaCuentasBancarias(
|
||||||
AEmpresa: IBizEmpresa): TStringList;
|
AEmpresa: IBizEmpresa): TStringList;
|
||||||
var
|
var
|
||||||
|
|||||||
@ -10,12 +10,12 @@ inherited DataModuleEmpresas: TDataModuleEmpresas
|
|||||||
Top = 24
|
Top = 24
|
||||||
end
|
end
|
||||||
object rda_Empresas: TDARemoteDataAdapter
|
object rda_Empresas: TDARemoteDataAdapter
|
||||||
|
DataStreamer = Bin2DataStreamer
|
||||||
GetSchemaCall.RemoteService = RORemoteService
|
GetSchemaCall.RemoteService = RORemoteService
|
||||||
GetDataCall.RemoteService = RORemoteService
|
GetDataCall.RemoteService = RORemoteService
|
||||||
UpdateDataCall.RemoteService = RORemoteService
|
UpdateDataCall.RemoteService = RORemoteService
|
||||||
GetScriptsCall.RemoteService = RORemoteService
|
GetScriptsCall.RemoteService = RORemoteService
|
||||||
RemoteService = RORemoteService
|
RemoteService = RORemoteService
|
||||||
DataStreamer = Bin2DataStreamer
|
|
||||||
Left = 176
|
Left = 176
|
||||||
Top = 24
|
Top = 24
|
||||||
end
|
end
|
||||||
@ -186,7 +186,7 @@ inherited DataModuleEmpresas: TDataModuleEmpresas
|
|||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'PARAM_MARGEN'
|
Name = 'PARAM_MARGEN'
|
||||||
DataType = datFloat
|
DataType = datCurrency
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'ID_TIPO_IVA'
|
Name = 'ID_TIPO_IVA'
|
||||||
@ -195,12 +195,14 @@ inherited DataModuleEmpresas: TDataModuleEmpresas
|
|||||||
item
|
item
|
||||||
Name = 'ID_FORMA_PAGO'
|
Name = 'ID_FORMA_PAGO'
|
||||||
DataType = datSmallInt
|
DataType = datSmallInt
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Name = 'ID_ALMACEN'
|
||||||
|
DataType = datSmallInt
|
||||||
end>
|
end>
|
||||||
Params = <>
|
Params = <>
|
||||||
StreamingOptions = [soDisableEventsWhileStreaming]
|
StreamingOptions = [soDisableEventsWhileStreaming]
|
||||||
RemoteDataAdapter = rda_Empresas
|
RemoteDataAdapter = rda_Empresas
|
||||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
|
||||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
|
||||||
LogicalName = 'Empresas'
|
LogicalName = 'Empresas'
|
||||||
IndexDefs = <>
|
IndexDefs = <>
|
||||||
Left = 176
|
Left = 176
|
||||||
@ -296,8 +298,6 @@ inherited DataModuleEmpresas: TDataModuleEmpresas
|
|||||||
MasterSource = ds_Empresas
|
MasterSource = ds_Empresas
|
||||||
MasterFields = 'ID'
|
MasterFields = 'ID'
|
||||||
DetailFields = 'ID_EMPRESA'
|
DetailFields = 'ID_EMPRESA'
|
||||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
|
||||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
|
||||||
LogicalName = 'EmpresasDatosBanco'
|
LogicalName = 'EmpresasDatosBanco'
|
||||||
IndexDefs = <>
|
IndexDefs = <>
|
||||||
Left = 288
|
Left = 288
|
||||||
|
|||||||
@ -29,6 +29,7 @@ type
|
|||||||
|
|
||||||
function DarListaFormasPago: TStringList;
|
function DarListaFormasPago: TStringList;
|
||||||
function DarListaTiposIVA: TStringList;
|
function DarListaTiposIVA: TStringList;
|
||||||
|
function DarListaAlmacenes(const ID_EMPRESA: Integer): TStringList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -45,6 +46,15 @@ begin
|
|||||||
RORemoteService.Message := dmConexion.Message;
|
RORemoteService.Message := dmConexion.Message;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TDataModuleEmpresas.DarListaAlmacenes(const ID_EMPRESA: Integer): TStringList;
|
||||||
|
var
|
||||||
|
ABinary : Binary;
|
||||||
|
begin
|
||||||
|
ABinary := (RORemoteService as IsrvEmpresas).DarListaAlmacenes(ID_EMPRESA);
|
||||||
|
Result := TStringList.Create;
|
||||||
|
Result.LoadFromStream(ABinary);
|
||||||
|
end;
|
||||||
|
|
||||||
function TDataModuleEmpresas.DarListaFormasPago: TStringList;
|
function TDataModuleEmpresas.DarListaFormasPago: TStringList;
|
||||||
var
|
var
|
||||||
ABinary : Binary;
|
ABinary : Binary;
|
||||||
|
|||||||
@ -14,7 +14,8 @@ type
|
|||||||
function GetItems : IBizEmpresa;
|
function GetItems : IBizEmpresa;
|
||||||
|
|
||||||
function DarListaFormasPago: TStringList;
|
function DarListaFormasPago: TStringList;
|
||||||
function DarListaTiposIVA: TStringList;
|
function DarListaTiposIVA: TStringList;
|
||||||
|
function DarListaAlmacenes(const ID_EMPRESA: Integer): TStringList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|||||||
@ -3,14 +3,14 @@ unit schEmpresasClient_Intf;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
|
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDAInterfaces, uDADataTable, FmtBCD, uROXMLIntf;
|
||||||
|
|
||||||
const
|
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_Empresas = '{79714FFE-2D2C-486D-B2CD-5329B3FD9852}';
|
RID_Empresas = '{85F3347F-FE10-4BF0-AE37-0004F98A0C9B}';
|
||||||
RID_EmpresasDatosBanco = '{871CEF95-5EFE-43A0-8F23-299CB80E4C3C}';
|
RID_EmpresasDatosBanco = '{136900A4-D1E4-4EB2-971E-48636C5033E5}';
|
||||||
|
|
||||||
{ Data table names }
|
{ Data table names }
|
||||||
nme_Empresas = 'Empresas';
|
nme_Empresas = 'Empresas';
|
||||||
@ -43,6 +43,7 @@ const
|
|||||||
fld_EmpresasPARAM_MARGEN = 'PARAM_MARGEN';
|
fld_EmpresasPARAM_MARGEN = 'PARAM_MARGEN';
|
||||||
fld_EmpresasID_TIPO_IVA = 'ID_TIPO_IVA';
|
fld_EmpresasID_TIPO_IVA = 'ID_TIPO_IVA';
|
||||||
fld_EmpresasID_FORMA_PAGO = 'ID_FORMA_PAGO';
|
fld_EmpresasID_FORMA_PAGO = 'ID_FORMA_PAGO';
|
||||||
|
fld_EmpresasID_ALMACEN = 'ID_ALMACEN';
|
||||||
|
|
||||||
{ Empresas field indexes }
|
{ Empresas field indexes }
|
||||||
idx_EmpresasID = 0;
|
idx_EmpresasID = 0;
|
||||||
@ -71,6 +72,7 @@ const
|
|||||||
idx_EmpresasPARAM_MARGEN = 23;
|
idx_EmpresasPARAM_MARGEN = 23;
|
||||||
idx_EmpresasID_TIPO_IVA = 24;
|
idx_EmpresasID_TIPO_IVA = 24;
|
||||||
idx_EmpresasID_FORMA_PAGO = 25;
|
idx_EmpresasID_FORMA_PAGO = 25;
|
||||||
|
idx_EmpresasID_ALMACEN = 26;
|
||||||
|
|
||||||
{ EmpresasDatosBanco fields }
|
{ EmpresasDatosBanco fields }
|
||||||
fld_EmpresasDatosBancoID = 'ID';
|
fld_EmpresasDatosBancoID = 'ID';
|
||||||
@ -101,7 +103,7 @@ const
|
|||||||
type
|
type
|
||||||
{ IEmpresas }
|
{ IEmpresas }
|
||||||
IEmpresas = interface(IDAStronglyTypedDataTable)
|
IEmpresas = interface(IDAStronglyTypedDataTable)
|
||||||
['{50A62753-ECEB-4BBA-8C2D-E76326014139}']
|
['{C3E9B00D-726C-44B6-BB08-7F12DA6AB6AF}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetIDValue: Integer;
|
function GetIDValue: Integer;
|
||||||
procedure SetIDValue(const aValue: Integer);
|
procedure SetIDValue(const aValue: Integer);
|
||||||
@ -193,8 +195,8 @@ type
|
|||||||
procedure SetPARAM_TIEMPOValue(const aValue: Currency);
|
procedure SetPARAM_TIEMPOValue(const aValue: Currency);
|
||||||
function GetPARAM_TIEMPOIsNull: Boolean;
|
function GetPARAM_TIEMPOIsNull: Boolean;
|
||||||
procedure SetPARAM_TIEMPOIsNull(const aValue: Boolean);
|
procedure SetPARAM_TIEMPOIsNull(const aValue: Boolean);
|
||||||
function GetPARAM_MARGENValue: Float;
|
function GetPARAM_MARGENValue: Currency;
|
||||||
procedure SetPARAM_MARGENValue(const aValue: Float);
|
procedure SetPARAM_MARGENValue(const aValue: Currency);
|
||||||
function GetPARAM_MARGENIsNull: Boolean;
|
function GetPARAM_MARGENIsNull: Boolean;
|
||||||
procedure SetPARAM_MARGENIsNull(const aValue: Boolean);
|
procedure SetPARAM_MARGENIsNull(const aValue: Boolean);
|
||||||
function GetID_TIPO_IVAValue: SmallInt;
|
function GetID_TIPO_IVAValue: SmallInt;
|
||||||
@ -205,6 +207,10 @@ type
|
|||||||
procedure SetID_FORMA_PAGOValue(const aValue: SmallInt);
|
procedure SetID_FORMA_PAGOValue(const aValue: SmallInt);
|
||||||
function GetID_FORMA_PAGOIsNull: Boolean;
|
function GetID_FORMA_PAGOIsNull: Boolean;
|
||||||
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean);
|
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean);
|
||||||
|
function GetID_ALMACENValue: SmallInt;
|
||||||
|
procedure SetID_ALMACENValue(const aValue: SmallInt);
|
||||||
|
function GetID_ALMACENIsNull: Boolean;
|
||||||
|
procedure SetID_ALMACENIsNull(const aValue: Boolean);
|
||||||
|
|
||||||
|
|
||||||
{ Properties }
|
{ Properties }
|
||||||
@ -254,12 +260,14 @@ type
|
|||||||
property REGISTRO_MERCANTILIsNull: Boolean read GetREGISTRO_MERCANTILIsNull write SetREGISTRO_MERCANTILIsNull;
|
property REGISTRO_MERCANTILIsNull: Boolean read GetREGISTRO_MERCANTILIsNull write SetREGISTRO_MERCANTILIsNull;
|
||||||
property PARAM_TIEMPO: Currency read GetPARAM_TIEMPOValue write SetPARAM_TIEMPOValue;
|
property PARAM_TIEMPO: Currency read GetPARAM_TIEMPOValue write SetPARAM_TIEMPOValue;
|
||||||
property PARAM_TIEMPOIsNull: Boolean read GetPARAM_TIEMPOIsNull write SetPARAM_TIEMPOIsNull;
|
property PARAM_TIEMPOIsNull: Boolean read GetPARAM_TIEMPOIsNull write SetPARAM_TIEMPOIsNull;
|
||||||
property PARAM_MARGEN: Float read GetPARAM_MARGENValue write SetPARAM_MARGENValue;
|
property PARAM_MARGEN: Currency read GetPARAM_MARGENValue write SetPARAM_MARGENValue;
|
||||||
property PARAM_MARGENIsNull: Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull;
|
property PARAM_MARGENIsNull: Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull;
|
||||||
property ID_TIPO_IVA: SmallInt read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue;
|
property ID_TIPO_IVA: SmallInt read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue;
|
||||||
property ID_TIPO_IVAIsNull: Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull;
|
property ID_TIPO_IVAIsNull: Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull;
|
||||||
property ID_FORMA_PAGO: SmallInt read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
|
property ID_FORMA_PAGO: SmallInt read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
|
||||||
property ID_FORMA_PAGOIsNull: Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
|
property ID_FORMA_PAGOIsNull: Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
|
||||||
|
property ID_ALMACEN: SmallInt read GetID_ALMACENValue write SetID_ALMACENValue;
|
||||||
|
property ID_ALMACENIsNull: Boolean read GetID_ALMACENIsNull write SetID_ALMACENIsNull;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TEmpresasDataTableRules }
|
{ TEmpresasDataTableRules }
|
||||||
@ -361,8 +369,8 @@ type
|
|||||||
procedure SetPARAM_TIEMPOValue(const aValue: Currency); virtual;
|
procedure SetPARAM_TIEMPOValue(const aValue: Currency); virtual;
|
||||||
function GetPARAM_TIEMPOIsNull: Boolean; virtual;
|
function GetPARAM_TIEMPOIsNull: Boolean; virtual;
|
||||||
procedure SetPARAM_TIEMPOIsNull(const aValue: Boolean); virtual;
|
procedure SetPARAM_TIEMPOIsNull(const aValue: Boolean); virtual;
|
||||||
function GetPARAM_MARGENValue: Float; virtual;
|
function GetPARAM_MARGENValue: Currency; virtual;
|
||||||
procedure SetPARAM_MARGENValue(const aValue: Float); virtual;
|
procedure SetPARAM_MARGENValue(const aValue: Currency); virtual;
|
||||||
function GetPARAM_MARGENIsNull: Boolean; virtual;
|
function GetPARAM_MARGENIsNull: Boolean; virtual;
|
||||||
procedure SetPARAM_MARGENIsNull(const aValue: Boolean); virtual;
|
procedure SetPARAM_MARGENIsNull(const aValue: Boolean); virtual;
|
||||||
function GetID_TIPO_IVAValue: SmallInt; virtual;
|
function GetID_TIPO_IVAValue: SmallInt; virtual;
|
||||||
@ -373,6 +381,10 @@ type
|
|||||||
procedure SetID_FORMA_PAGOValue(const aValue: SmallInt); virtual;
|
procedure SetID_FORMA_PAGOValue(const aValue: SmallInt); virtual;
|
||||||
function GetID_FORMA_PAGOIsNull: Boolean; virtual;
|
function GetID_FORMA_PAGOIsNull: Boolean; virtual;
|
||||||
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean); virtual;
|
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean); virtual;
|
||||||
|
function GetID_ALMACENValue: SmallInt; virtual;
|
||||||
|
procedure SetID_ALMACENValue(const aValue: SmallInt); virtual;
|
||||||
|
function GetID_ALMACENIsNull: Boolean; virtual;
|
||||||
|
procedure SetID_ALMACENIsNull(const aValue: Boolean); virtual;
|
||||||
|
|
||||||
{ Properties }
|
{ Properties }
|
||||||
property ID: Integer read GetIDValue write SetIDValue;
|
property ID: Integer read GetIDValue write SetIDValue;
|
||||||
@ -421,12 +433,14 @@ type
|
|||||||
property REGISTRO_MERCANTILIsNull: Boolean read GetREGISTRO_MERCANTILIsNull write SetREGISTRO_MERCANTILIsNull;
|
property REGISTRO_MERCANTILIsNull: Boolean read GetREGISTRO_MERCANTILIsNull write SetREGISTRO_MERCANTILIsNull;
|
||||||
property PARAM_TIEMPO: Currency read GetPARAM_TIEMPOValue write SetPARAM_TIEMPOValue;
|
property PARAM_TIEMPO: Currency read GetPARAM_TIEMPOValue write SetPARAM_TIEMPOValue;
|
||||||
property PARAM_TIEMPOIsNull: Boolean read GetPARAM_TIEMPOIsNull write SetPARAM_TIEMPOIsNull;
|
property PARAM_TIEMPOIsNull: Boolean read GetPARAM_TIEMPOIsNull write SetPARAM_TIEMPOIsNull;
|
||||||
property PARAM_MARGEN: Float read GetPARAM_MARGENValue write SetPARAM_MARGENValue;
|
property PARAM_MARGEN: Currency read GetPARAM_MARGENValue write SetPARAM_MARGENValue;
|
||||||
property PARAM_MARGENIsNull: Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull;
|
property PARAM_MARGENIsNull: Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull;
|
||||||
property ID_TIPO_IVA: SmallInt read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue;
|
property ID_TIPO_IVA: SmallInt read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue;
|
||||||
property ID_TIPO_IVAIsNull: Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull;
|
property ID_TIPO_IVAIsNull: Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull;
|
||||||
property ID_FORMA_PAGO: SmallInt read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
|
property ID_FORMA_PAGO: SmallInt read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
|
||||||
property ID_FORMA_PAGOIsNull: Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
|
property ID_FORMA_PAGOIsNull: Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
|
||||||
|
property ID_ALMACEN: SmallInt read GetID_ALMACENValue write SetID_ALMACENValue;
|
||||||
|
property ID_ALMACENIsNull: Boolean read GetID_ALMACENIsNull write SetID_ALMACENIsNull;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(aDataTable: TDADataTable); override;
|
constructor Create(aDataTable: TDADataTable); override;
|
||||||
@ -436,7 +450,7 @@ type
|
|||||||
|
|
||||||
{ IEmpresasDatosBanco }
|
{ IEmpresasDatosBanco }
|
||||||
IEmpresasDatosBanco = interface(IDAStronglyTypedDataTable)
|
IEmpresasDatosBanco = interface(IDAStronglyTypedDataTable)
|
||||||
['{9C06C77B-A062-4026-962C-ACF5CF7A7965}']
|
['{F703B8E7-3A99-4097-BC8F-9F10A4D3D4F3}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetIDValue: Integer;
|
function GetIDValue: Integer;
|
||||||
procedure SetIDValue(const aValue: Integer);
|
procedure SetIDValue(const aValue: Integer);
|
||||||
@ -1104,14 +1118,14 @@ begin
|
|||||||
DataTable.Fields[idx_EmpresasPARAM_TIEMPO].AsVariant := Null;
|
DataTable.Fields[idx_EmpresasPARAM_TIEMPO].AsVariant := Null;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TEmpresasDataTableRules.GetPARAM_MARGENValue: Float;
|
function TEmpresasDataTableRules.GetPARAM_MARGENValue: Currency;
|
||||||
begin
|
begin
|
||||||
result := DataTable.Fields[idx_EmpresasPARAM_MARGEN].AsFloat;
|
result := DataTable.Fields[idx_EmpresasPARAM_MARGEN].AsCurrency;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEmpresasDataTableRules.SetPARAM_MARGENValue(const aValue: Float);
|
procedure TEmpresasDataTableRules.SetPARAM_MARGENValue(const aValue: Currency);
|
||||||
begin
|
begin
|
||||||
DataTable.Fields[idx_EmpresasPARAM_MARGEN].AsFloat := aValue;
|
DataTable.Fields[idx_EmpresasPARAM_MARGEN].AsCurrency := aValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TEmpresasDataTableRules.GetPARAM_MARGENIsNull: boolean;
|
function TEmpresasDataTableRules.GetPARAM_MARGENIsNull: boolean;
|
||||||
@ -1167,6 +1181,27 @@ begin
|
|||||||
DataTable.Fields[idx_EmpresasID_FORMA_PAGO].AsVariant := Null;
|
DataTable.Fields[idx_EmpresasID_FORMA_PAGO].AsVariant := Null;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TEmpresasDataTableRules.GetID_ALMACENValue: SmallInt;
|
||||||
|
begin
|
||||||
|
result := DataTable.Fields[idx_EmpresasID_ALMACEN].AsSmallInt;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEmpresasDataTableRules.SetID_ALMACENValue(const aValue: SmallInt);
|
||||||
|
begin
|
||||||
|
DataTable.Fields[idx_EmpresasID_ALMACEN].AsSmallInt := aValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TEmpresasDataTableRules.GetID_ALMACENIsNull: boolean;
|
||||||
|
begin
|
||||||
|
result := DataTable.Fields[idx_EmpresasID_ALMACEN].IsNull;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEmpresasDataTableRules.SetID_ALMACENIsNull(const aValue: Boolean);
|
||||||
|
begin
|
||||||
|
if aValue then
|
||||||
|
DataTable.Fields[idx_EmpresasID_ALMACEN].AsVariant := Null;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TEmpresasDatosBancoDataTableRules }
|
{ TEmpresasDatosBancoDataTableRules }
|
||||||
constructor TEmpresasDatosBancoDataTableRules.Create(aDataTable: TDADataTable);
|
constructor TEmpresasDatosBancoDataTableRules.Create(aDataTable: TDADataTable);
|
||||||
|
|||||||
@ -9,13 +9,13 @@ 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_EmpresasDelta = '{6E077CC5-C984-4BCB-BF62-FFF76FF50C8F}';
|
RID_EmpresasDelta = '{73622B14-9061-4F32-977D-AFE85BFD7278}';
|
||||||
RID_EmpresasDatosBancoDelta = '{6451427E-E50D-4E52-BD96-58551144B783}';
|
RID_EmpresasDatosBancoDelta = '{DB55B5DC-17DD-4A0B-A1AE-62E00F888F38}';
|
||||||
|
|
||||||
type
|
type
|
||||||
{ IEmpresasDelta }
|
{ IEmpresasDelta }
|
||||||
IEmpresasDelta = interface(IEmpresas)
|
IEmpresasDelta = interface(IEmpresas)
|
||||||
['{6E077CC5-C984-4BCB-BF62-FFF76FF50C8F}']
|
['{73622B14-9061-4F32-977D-AFE85BFD7278}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetOldIDValue : Integer;
|
function GetOldIDValue : Integer;
|
||||||
function GetOldNIF_CIFValue : String;
|
function GetOldNIF_CIFValue : String;
|
||||||
@ -40,9 +40,10 @@ type
|
|||||||
function GetOldLOGOTIPOValue : IROStream;
|
function GetOldLOGOTIPOValue : IROStream;
|
||||||
function GetOldREGISTRO_MERCANTILValue : String;
|
function GetOldREGISTRO_MERCANTILValue : String;
|
||||||
function GetOldPARAM_TIEMPOValue : Currency;
|
function GetOldPARAM_TIEMPOValue : Currency;
|
||||||
function GetOldPARAM_MARGENValue : Float;
|
function GetOldPARAM_MARGENValue : Currency;
|
||||||
function GetOldID_TIPO_IVAValue : SmallInt;
|
function GetOldID_TIPO_IVAValue : SmallInt;
|
||||||
function GetOldID_FORMA_PAGOValue : SmallInt;
|
function GetOldID_FORMA_PAGOValue : SmallInt;
|
||||||
|
function GetOldID_ALMACENValue : SmallInt;
|
||||||
|
|
||||||
{ Properties }
|
{ Properties }
|
||||||
property OldID : Integer read GetOldIDValue;
|
property OldID : Integer read GetOldIDValue;
|
||||||
@ -68,9 +69,10 @@ type
|
|||||||
property OldLOGOTIPO : IROStream read GetOldLOGOTIPOValue;
|
property OldLOGOTIPO : IROStream read GetOldLOGOTIPOValue;
|
||||||
property OldREGISTRO_MERCANTIL : String read GetOldREGISTRO_MERCANTILValue;
|
property OldREGISTRO_MERCANTIL : String read GetOldREGISTRO_MERCANTILValue;
|
||||||
property OldPARAM_TIEMPO : Currency read GetOldPARAM_TIEMPOValue;
|
property OldPARAM_TIEMPO : Currency read GetOldPARAM_TIEMPOValue;
|
||||||
property OldPARAM_MARGEN : Float read GetOldPARAM_MARGENValue;
|
property OldPARAM_MARGEN : Currency read GetOldPARAM_MARGENValue;
|
||||||
property OldID_TIPO_IVA : SmallInt read GetOldID_TIPO_IVAValue;
|
property OldID_TIPO_IVA : SmallInt read GetOldID_TIPO_IVAValue;
|
||||||
property OldID_FORMA_PAGO : SmallInt read GetOldID_FORMA_PAGOValue;
|
property OldID_FORMA_PAGO : SmallInt read GetOldID_FORMA_PAGOValue;
|
||||||
|
property OldID_ALMACEN : SmallInt read GetOldID_ALMACENValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TEmpresasBusinessProcessorRules }
|
{ TEmpresasBusinessProcessorRules }
|
||||||
@ -218,11 +220,11 @@ type
|
|||||||
function GetOldPARAM_TIEMPOIsNull: Boolean; virtual;
|
function GetOldPARAM_TIEMPOIsNull: Boolean; virtual;
|
||||||
procedure SetPARAM_TIEMPOValue(const aValue: Currency); virtual;
|
procedure SetPARAM_TIEMPOValue(const aValue: Currency); virtual;
|
||||||
procedure SetPARAM_TIEMPOIsNull(const aValue: Boolean); virtual;
|
procedure SetPARAM_TIEMPOIsNull(const aValue: Boolean); virtual;
|
||||||
function GetPARAM_MARGENValue: Float; virtual;
|
function GetPARAM_MARGENValue: Currency; virtual;
|
||||||
function GetPARAM_MARGENIsNull: Boolean; virtual;
|
function GetPARAM_MARGENIsNull: Boolean; virtual;
|
||||||
function GetOldPARAM_MARGENValue: Float; virtual;
|
function GetOldPARAM_MARGENValue: Currency; virtual;
|
||||||
function GetOldPARAM_MARGENIsNull: Boolean; virtual;
|
function GetOldPARAM_MARGENIsNull: Boolean; virtual;
|
||||||
procedure SetPARAM_MARGENValue(const aValue: Float); virtual;
|
procedure SetPARAM_MARGENValue(const aValue: Currency); virtual;
|
||||||
procedure SetPARAM_MARGENIsNull(const aValue: Boolean); virtual;
|
procedure SetPARAM_MARGENIsNull(const aValue: Boolean); virtual;
|
||||||
function GetID_TIPO_IVAValue: SmallInt; virtual;
|
function GetID_TIPO_IVAValue: SmallInt; virtual;
|
||||||
function GetID_TIPO_IVAIsNull: Boolean; virtual;
|
function GetID_TIPO_IVAIsNull: Boolean; virtual;
|
||||||
@ -236,6 +238,12 @@ type
|
|||||||
function GetOldID_FORMA_PAGOIsNull: Boolean; virtual;
|
function GetOldID_FORMA_PAGOIsNull: Boolean; virtual;
|
||||||
procedure SetID_FORMA_PAGOValue(const aValue: SmallInt); virtual;
|
procedure SetID_FORMA_PAGOValue(const aValue: SmallInt); virtual;
|
||||||
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean); virtual;
|
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean); virtual;
|
||||||
|
function GetID_ALMACENValue: SmallInt; virtual;
|
||||||
|
function GetID_ALMACENIsNull: Boolean; virtual;
|
||||||
|
function GetOldID_ALMACENValue: SmallInt; virtual;
|
||||||
|
function GetOldID_ALMACENIsNull: Boolean; virtual;
|
||||||
|
procedure SetID_ALMACENValue(const aValue: SmallInt); virtual;
|
||||||
|
procedure SetID_ALMACENIsNull(const aValue: Boolean); virtual;
|
||||||
|
|
||||||
{ Properties }
|
{ Properties }
|
||||||
property ID : Integer read GetIDValue write SetIDValue;
|
property ID : Integer read GetIDValue write SetIDValue;
|
||||||
@ -330,9 +338,9 @@ type
|
|||||||
property PARAM_TIEMPOIsNull : Boolean read GetPARAM_TIEMPOIsNull write SetPARAM_TIEMPOIsNull;
|
property PARAM_TIEMPOIsNull : Boolean read GetPARAM_TIEMPOIsNull write SetPARAM_TIEMPOIsNull;
|
||||||
property OldPARAM_TIEMPO : Currency read GetOldPARAM_TIEMPOValue;
|
property OldPARAM_TIEMPO : Currency read GetOldPARAM_TIEMPOValue;
|
||||||
property OldPARAM_TIEMPOIsNull : Boolean read GetOldPARAM_TIEMPOIsNull;
|
property OldPARAM_TIEMPOIsNull : Boolean read GetOldPARAM_TIEMPOIsNull;
|
||||||
property PARAM_MARGEN : Float read GetPARAM_MARGENValue write SetPARAM_MARGENValue;
|
property PARAM_MARGEN : Currency read GetPARAM_MARGENValue write SetPARAM_MARGENValue;
|
||||||
property PARAM_MARGENIsNull : Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull;
|
property PARAM_MARGENIsNull : Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull;
|
||||||
property OldPARAM_MARGEN : Float read GetOldPARAM_MARGENValue;
|
property OldPARAM_MARGEN : Currency read GetOldPARAM_MARGENValue;
|
||||||
property OldPARAM_MARGENIsNull : Boolean read GetOldPARAM_MARGENIsNull;
|
property OldPARAM_MARGENIsNull : Boolean read GetOldPARAM_MARGENIsNull;
|
||||||
property ID_TIPO_IVA : SmallInt read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue;
|
property ID_TIPO_IVA : SmallInt read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue;
|
||||||
property ID_TIPO_IVAIsNull : Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull;
|
property ID_TIPO_IVAIsNull : Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull;
|
||||||
@ -342,6 +350,10 @@ type
|
|||||||
property ID_FORMA_PAGOIsNull : Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
|
property ID_FORMA_PAGOIsNull : Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
|
||||||
property OldID_FORMA_PAGO : SmallInt read GetOldID_FORMA_PAGOValue;
|
property OldID_FORMA_PAGO : SmallInt read GetOldID_FORMA_PAGOValue;
|
||||||
property OldID_FORMA_PAGOIsNull : Boolean read GetOldID_FORMA_PAGOIsNull;
|
property OldID_FORMA_PAGOIsNull : Boolean read GetOldID_FORMA_PAGOIsNull;
|
||||||
|
property ID_ALMACEN : SmallInt read GetID_ALMACENValue write SetID_ALMACENValue;
|
||||||
|
property ID_ALMACENIsNull : Boolean read GetID_ALMACENIsNull write SetID_ALMACENIsNull;
|
||||||
|
property OldID_ALMACEN : SmallInt read GetOldID_ALMACENValue;
|
||||||
|
property OldID_ALMACENIsNull : Boolean read GetOldID_ALMACENIsNull;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
|
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
|
||||||
@ -351,7 +363,7 @@ type
|
|||||||
|
|
||||||
{ IEmpresasDatosBancoDelta }
|
{ IEmpresasDatosBancoDelta }
|
||||||
IEmpresasDatosBancoDelta = interface(IEmpresasDatosBanco)
|
IEmpresasDatosBancoDelta = interface(IEmpresasDatosBanco)
|
||||||
['{6451427E-E50D-4E52-BD96-58551144B783}']
|
['{DB55B5DC-17DD-4A0B-A1AE-62E00F888F38}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetOldIDValue : Integer;
|
function GetOldIDValue : Integer;
|
||||||
function GetOldID_EMPRESAValue : Integer;
|
function GetOldID_EMPRESAValue : Integer;
|
||||||
@ -537,7 +549,7 @@ end;
|
|||||||
|
|
||||||
procedure TEmpresasBusinessProcessorRules.LOGOTIPO_OnChange(Sender: TObject);
|
procedure TEmpresasBusinessProcessorRules.LOGOTIPO_OnChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasLOGOTIPO] := VariantBinaryFromBinary((TROStream(Sender) as IROStream).Stream);
|
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasLOGOTIPO] := BinaryToBlobVariant((TROStream(Sender) as IROStream).Stream);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TEmpresasBusinessProcessorRules.GetIDValue: Integer;
|
function TEmpresasBusinessProcessorRules.GetIDValue: Integer;
|
||||||
@ -1162,7 +1174,7 @@ begin
|
|||||||
result := f_LOGOTIPO;
|
result := f_LOGOTIPO;
|
||||||
result.Position := 0;
|
result.Position := 0;
|
||||||
if not Result.InUpdateMode then begin
|
if not Result.InUpdateMode then begin
|
||||||
WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasLOGOTIPO], result.Stream);
|
BlobVariantToBinary(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasLOGOTIPO], result.Stream);
|
||||||
result.Position := 0;
|
result.Position := 0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1175,7 +1187,7 @@ end;
|
|||||||
function TEmpresasBusinessProcessorRules.GetOldLOGOTIPOValue: IROStream;
|
function TEmpresasBusinessProcessorRules.GetOldLOGOTIPOValue: IROStream;
|
||||||
begin
|
begin
|
||||||
result := NewROStream();
|
result := NewROStream();
|
||||||
WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasLOGOTIPO], result.Stream);
|
BlobVariantToBinary(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasLOGOTIPO], result.Stream);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TEmpresasBusinessProcessorRules.GetOldLOGOTIPOIsNull: Boolean;
|
function TEmpresasBusinessProcessorRules.GetOldLOGOTIPOIsNull: Boolean;
|
||||||
@ -1251,7 +1263,7 @@ begin
|
|||||||
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_TIEMPO] := Null;
|
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_TIEMPO] := Null;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TEmpresasBusinessProcessorRules.GetPARAM_MARGENValue: Float;
|
function TEmpresasBusinessProcessorRules.GetPARAM_MARGENValue: Currency;
|
||||||
begin
|
begin
|
||||||
result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_MARGEN];
|
result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_MARGEN];
|
||||||
end;
|
end;
|
||||||
@ -1261,7 +1273,7 @@ begin
|
|||||||
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_MARGEN]);
|
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_MARGEN]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TEmpresasBusinessProcessorRules.GetOldPARAM_MARGENValue: Float;
|
function TEmpresasBusinessProcessorRules.GetOldPARAM_MARGENValue: Currency;
|
||||||
begin
|
begin
|
||||||
result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasPARAM_MARGEN];
|
result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasPARAM_MARGEN];
|
||||||
end;
|
end;
|
||||||
@ -1271,7 +1283,7 @@ begin
|
|||||||
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasPARAM_MARGEN]);
|
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasPARAM_MARGEN]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEmpresasBusinessProcessorRules.SetPARAM_MARGENValue(const aValue: Float);
|
procedure TEmpresasBusinessProcessorRules.SetPARAM_MARGENValue(const aValue: Currency);
|
||||||
begin
|
begin
|
||||||
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_MARGEN] := aValue;
|
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_MARGEN] := aValue;
|
||||||
end;
|
end;
|
||||||
@ -1344,6 +1356,37 @@ begin
|
|||||||
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_FORMA_PAGO] := Null;
|
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_FORMA_PAGO] := Null;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TEmpresasBusinessProcessorRules.GetID_ALMACENValue: SmallInt;
|
||||||
|
begin
|
||||||
|
result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_ALMACEN];
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TEmpresasBusinessProcessorRules.GetID_ALMACENIsNull: Boolean;
|
||||||
|
begin
|
||||||
|
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_ALMACEN]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TEmpresasBusinessProcessorRules.GetOldID_ALMACENValue: SmallInt;
|
||||||
|
begin
|
||||||
|
result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasID_ALMACEN];
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TEmpresasBusinessProcessorRules.GetOldID_ALMACENIsNull: Boolean;
|
||||||
|
begin
|
||||||
|
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasID_ALMACEN]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEmpresasBusinessProcessorRules.SetID_ALMACENValue(const aValue: SmallInt);
|
||||||
|
begin
|
||||||
|
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_ALMACEN] := aValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEmpresasBusinessProcessorRules.SetID_ALMACENIsNull(const aValue: Boolean);
|
||||||
|
begin
|
||||||
|
if aValue then
|
||||||
|
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_ALMACEN] := Null;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TEmpresasDatosBancoBusinessProcessorRules }
|
{ TEmpresasDatosBancoBusinessProcessorRules }
|
||||||
constructor TEmpresasDatosBancoBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
|
constructor TEmpresasDatosBancoBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
|
||||||
|
|||||||
@ -128,6 +128,10 @@ object srvEmpresas: TsrvEmpresas
|
|||||||
item
|
item
|
||||||
DatasetField = 'ID_FORMA_PAGO'
|
DatasetField = 'ID_FORMA_PAGO'
|
||||||
TableField = 'ID_FORMA_PAGO'
|
TableField = 'ID_FORMA_PAGO'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
DatasetField = 'ID_ALMACEN'
|
||||||
|
TableField = 'ID_ALMACEN'
|
||||||
end>
|
end>
|
||||||
end>
|
end>
|
||||||
Name = 'Empresas'
|
Name = 'Empresas'
|
||||||
@ -269,7 +273,7 @@ object srvEmpresas: TsrvEmpresas
|
|||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'PARAM_MARGEN'
|
Name = 'PARAM_MARGEN'
|
||||||
DataType = datFloat
|
DataType = datCurrency
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'ID_TIPO_IVA'
|
Name = 'ID_TIPO_IVA'
|
||||||
@ -278,6 +282,10 @@ object srvEmpresas: TsrvEmpresas
|
|||||||
item
|
item
|
||||||
Name = 'ID_FORMA_PAGO'
|
Name = 'ID_FORMA_PAGO'
|
||||||
DataType = datSmallInt
|
DataType = datSmallInt
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Name = 'ID_ALMACEN'
|
||||||
|
DataType = datSmallInt
|
||||||
end>
|
end>
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
|
|||||||
@ -36,6 +36,7 @@ type
|
|||||||
function DarDatosEmpresa(const EmpresaID: Integer; AEmpresaDataSet: IDADataset): Boolean;
|
function DarDatosEmpresa(const EmpresaID: Integer; AEmpresaDataSet: IDADataset): Boolean;
|
||||||
function DarListaFormasPago: Binary;
|
function DarListaFormasPago: Binary;
|
||||||
function DarListaTiposIVA: Binary;
|
function DarListaTiposIVA: Binary;
|
||||||
|
function DarListaAlmacenes(const ID_EMPRESA: Integer): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function RecuperarEmpresa(const AID: Integer; AEmpresaDataSet: IDADataset): Boolean;
|
function RecuperarEmpresa(const AID: Integer; AEmpresaDataSet: IDADataset): Boolean;
|
||||||
@ -48,7 +49,7 @@ uses
|
|||||||
uDatabaseUtils, Dialogs, Variants, uROStreamSerializer, uROBinaryHelpers,
|
uDatabaseUtils, Dialogs, Variants, uROStreamSerializer, uROBinaryHelpers,
|
||||||
uSesionesUtils, schEmpresasClient_Intf, uUsersManager,
|
uSesionesUtils, schEmpresasClient_Intf, uUsersManager,
|
||||||
uRestriccionesUsuarioUtils, uROClasses, uBizEmpresasServer,
|
uRestriccionesUsuarioUtils, uROClasses, uBizEmpresasServer,
|
||||||
srvFormasPago_Impl, srvTiposIva_Impl;
|
srvFormasPago_Impl, srvTiposIva_Impl, srvAlmacenes_Impl;
|
||||||
|
|
||||||
procedure Create_srvEmpresas(out anInstance : IUnknown);
|
procedure Create_srvEmpresas(out anInstance : IUnknown);
|
||||||
begin
|
begin
|
||||||
@ -123,6 +124,19 @@ begin
|
|||||||
bpEmpresas.BusinessRulesID := BIZ_SERVER_EMPRESAS;
|
bpEmpresas.BusinessRulesID := BIZ_SERVER_EMPRESAS;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TsrvEmpresas.DarListaAlmacenes(const ID_EMPRESA: Integer): Binary;
|
||||||
|
var
|
||||||
|
AAlmacenesServer : TsrvAlmacenes;
|
||||||
|
begin
|
||||||
|
AAlmacenesServer := TsrvAlmacenes.Create(nil);
|
||||||
|
try
|
||||||
|
Result := AAlmacenesServer.DarListaALmacenes(ID_EMPRESA);
|
||||||
|
finally
|
||||||
|
FreeAndNIL(AAlmacenesServer);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
function TsrvEmpresas.DarListaFormasPago: Binary;
|
function TsrvEmpresas.DarListaFormasPago: Binary;
|
||||||
var
|
var
|
||||||
AFormasPagoServer : TsrvFormasPago;
|
AFormasPagoServer : TsrvFormasPago;
|
||||||
|
|||||||
@ -35,7 +35,7 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
end
|
end
|
||||||
object eCalle: TcxDBTextEdit
|
object eCalle: TcxDBTextEdit
|
||||||
Left = 162
|
Left = 162
|
||||||
Top = 277
|
Top = 304
|
||||||
DataBinding.DataField = 'CALLE'
|
DataBinding.DataField = 'CALLE'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
Style.BorderColor = clWindowFrame
|
Style.BorderColor = clWindowFrame
|
||||||
@ -52,12 +52,12 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 7
|
TabOrder = 8
|
||||||
Width = 223
|
Width = 223
|
||||||
end
|
end
|
||||||
object eCodigoPostal: TcxDBTextEdit
|
object eCodigoPostal: TcxDBTextEdit
|
||||||
Left = 312
|
Left = 312
|
||||||
Top = 304
|
Top = 331
|
||||||
DataBinding.DataField = 'CODIGO_POSTAL'
|
DataBinding.DataField = 'CODIGO_POSTAL'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
Style.BorderColor = clWindowFrame
|
Style.BorderColor = clWindowFrame
|
||||||
@ -74,7 +74,7 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 9
|
TabOrder = 10
|
||||||
Width = 73
|
Width = 73
|
||||||
end
|
end
|
||||||
object ePaginaWeb: TcxDBTextEdit
|
object ePaginaWeb: TcxDBTextEdit
|
||||||
@ -96,7 +96,7 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 18
|
TabOrder = 19
|
||||||
Width = 247
|
Width = 247
|
||||||
end
|
end
|
||||||
object eMailParticular: TcxDBTextEdit
|
object eMailParticular: TcxDBTextEdit
|
||||||
@ -118,7 +118,7 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 17
|
TabOrder = 18
|
||||||
Width = 247
|
Width = 247
|
||||||
end
|
end
|
||||||
object eMailTrabajo: TcxDBTextEdit
|
object eMailTrabajo: TcxDBTextEdit
|
||||||
@ -140,12 +140,12 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 16
|
TabOrder = 17
|
||||||
Width = 247
|
Width = 247
|
||||||
end
|
end
|
||||||
object cxDBMemo1: TcxDBMemo
|
object cxDBMemo1: TcxDBMemo
|
||||||
Left = 22
|
Left = 22
|
||||||
Top = 388
|
Top = 415
|
||||||
DataBinding.DataField = 'NOTAS'
|
DataBinding.DataField = 'NOTAS'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
Style.BorderColor = clWindowFrame
|
Style.BorderColor = clWindowFrame
|
||||||
@ -162,7 +162,7 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 11
|
TabOrder = 12
|
||||||
Height = 75
|
Height = 75
|
||||||
Width = 318
|
Width = 318
|
||||||
end
|
end
|
||||||
@ -185,7 +185,7 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 13
|
TabOrder = 14
|
||||||
Width = 247
|
Width = 247
|
||||||
end
|
end
|
||||||
object eTlfTrabajo: TcxDBTextEdit
|
object eTlfTrabajo: TcxDBTextEdit
|
||||||
@ -207,7 +207,7 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 12
|
TabOrder = 13
|
||||||
Width = 247
|
Width = 247
|
||||||
end
|
end
|
||||||
object eTlfMovil: TcxDBTextEdit
|
object eTlfMovil: TcxDBTextEdit
|
||||||
@ -229,7 +229,7 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 14
|
TabOrder = 15
|
||||||
Width = 247
|
Width = 247
|
||||||
end
|
end
|
||||||
object eFax: TcxDBTextEdit
|
object eFax: TcxDBTextEdit
|
||||||
@ -251,7 +251,7 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 15
|
TabOrder = 16
|
||||||
Width = 247
|
Width = 247
|
||||||
end
|
end
|
||||||
object eNombre: TcxDBTextEdit
|
object eNombre: TcxDBTextEdit
|
||||||
@ -341,13 +341,13 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleFocused.LookAndFeel.SkinName = ''
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 19
|
TabOrder = 20
|
||||||
Height = 249
|
Height = 249
|
||||||
Width = 313
|
Width = 313
|
||||||
end
|
end
|
||||||
object eParamMargen: TcxDBSpinEdit
|
object eParamMargen: TcxDBSpinEdit
|
||||||
Left = 162
|
Left = 162
|
||||||
Top = 220
|
Top = 247
|
||||||
DataBinding.DataField = 'PARAM_MARGEN'
|
DataBinding.DataField = 'PARAM_MARGEN'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
Properties.OnValidate = eParamMargenPropertiesValidate
|
Properties.OnValidate = eParamMargenPropertiesValidate
|
||||||
@ -367,12 +367,12 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 5
|
TabOrder = 6
|
||||||
Width = 60
|
Width = 60
|
||||||
end
|
end
|
||||||
object eParamTiempo: TcxDBCurrencyEdit
|
object eParamTiempo: TcxDBCurrencyEdit
|
||||||
Left = 285
|
Left = 285
|
||||||
Top = 220
|
Top = 247
|
||||||
DataBinding.DataField = 'PARAM_TIEMPO'
|
DataBinding.DataField = 'PARAM_TIEMPO'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
Properties.Alignment.Horz = taRightJustify
|
Properties.Alignment.Horz = taRightJustify
|
||||||
@ -392,12 +392,12 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 6
|
TabOrder = 7
|
||||||
Width = 100
|
Width = 100
|
||||||
end
|
end
|
||||||
object cbProvincia: TcxDBComboBox
|
object cbProvincia: TcxDBComboBox
|
||||||
Left = 162
|
Left = 162
|
||||||
Top = 304
|
Top = 331
|
||||||
DataBinding.DataField = 'PROVINCIA'
|
DataBinding.DataField = 'PROVINCIA'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
Properties.ImmediatePost = True
|
Properties.ImmediatePost = True
|
||||||
@ -421,12 +421,12 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 8
|
TabOrder = 9
|
||||||
Width = 80
|
Width = 80
|
||||||
end
|
end
|
||||||
object cbPoblacion: TcxDBComboBox
|
object cbPoblacion: TcxDBComboBox
|
||||||
Left = 162
|
Left = 162
|
||||||
Top = 331
|
Top = 358
|
||||||
DataBinding.DataField = 'POBLACION'
|
DataBinding.DataField = 'POBLACION'
|
||||||
DataBinding.DataSource = DADataSource
|
DataBinding.DataSource = DADataSource
|
||||||
Properties.ImmediatePost = True
|
Properties.ImmediatePost = True
|
||||||
@ -450,7 +450,7 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
TabOrder = 10
|
TabOrder = 11
|
||||||
Width = 223
|
Width = 223
|
||||||
end
|
end
|
||||||
object cbFormaPago: TcxComboBox
|
object cbFormaPago: TcxComboBox
|
||||||
@ -507,6 +507,33 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
Width = 202
|
Width = 202
|
||||||
end
|
end
|
||||||
|
object cbAlmacen: TcxComboBox
|
||||||
|
Left = 162
|
||||||
|
Top = 190
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Properties.DropDownListStyle = lsEditFixedList
|
||||||
|
Properties.DropDownRows = 25
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Style.BorderColor = clWindowFrame
|
||||||
|
Style.BorderStyle = ebs3D
|
||||||
|
Style.HotTrack = False
|
||||||
|
Style.LookAndFeel.Kind = lfStandard
|
||||||
|
Style.LookAndFeel.NativeStyle = True
|
||||||
|
Style.LookAndFeel.SkinName = ''
|
||||||
|
Style.ButtonStyle = bts3D
|
||||||
|
Style.PopupBorderStyle = epbsFrame3D
|
||||||
|
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||||
|
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||||
|
StyleDisabled.LookAndFeel.SkinName = ''
|
||||||
|
StyleFocused.LookAndFeel.Kind = lfStandard
|
||||||
|
StyleFocused.LookAndFeel.NativeStyle = True
|
||||||
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
|
TabOrder = 5
|
||||||
|
Width = 223
|
||||||
|
end
|
||||||
object dxLayoutControl1Group_Root: TdxLayoutGroup
|
object dxLayoutControl1Group_Root: TdxLayoutGroup
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
Hidden = True
|
Hidden = True
|
||||||
@ -548,6 +575,11 @@ inherited frViewEmpresa: TfrViewEmpresa
|
|||||||
Control = cbFormaPago
|
Control = cbFormaPago
|
||||||
ControlOptions.ShowBorder = False
|
ControlOptions.ShowBorder = False
|
||||||
end
|
end
|
||||||
|
object dxLayoutControl1Item23: TdxLayoutItem
|
||||||
|
Caption = 'Almac'#233'n por defecto:'
|
||||||
|
Control = cbAlmacen
|
||||||
|
ControlOptions.ShowBorder = False
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object dxLayoutControl1Group13: TdxLayoutGroup
|
object dxLayoutControl1Group13: TdxLayoutGroup
|
||||||
Caption = 'Datos cat'#225'logo art'#237'culos'
|
Caption = 'Datos cat'#225'logo art'#237'culos'
|
||||||
|
|||||||
@ -90,6 +90,8 @@ type
|
|||||||
cbFormaPago: TcxComboBox;
|
cbFormaPago: TcxComboBox;
|
||||||
dxLayoutControl1Item16: TdxLayoutItem;
|
dxLayoutControl1Item16: TdxLayoutItem;
|
||||||
cbTipoIVA: TcxComboBox;
|
cbTipoIVA: TcxComboBox;
|
||||||
|
dxLayoutControl1Item23: TdxLayoutItem;
|
||||||
|
cbAlmacen: TcxComboBox;
|
||||||
procedure actAnadirExecute(Sender: TObject);
|
procedure actAnadirExecute(Sender: TObject);
|
||||||
procedure actEliminarExecute(Sender: TObject);
|
procedure actEliminarExecute(Sender: TObject);
|
||||||
procedure actEliminarUpdate(Sender: TObject);
|
procedure actEliminarUpdate(Sender: TObject);
|
||||||
@ -102,6 +104,7 @@ type
|
|||||||
procedure cbPoblacionPropertiesInitPopup(Sender: TObject);
|
procedure cbPoblacionPropertiesInitPopup(Sender: TObject);
|
||||||
procedure FormaPagoEditValueChanged(Sender: TObject);
|
procedure FormaPagoEditValueChanged(Sender: TObject);
|
||||||
procedure TipoIVAEditValueChanged(Sender: TObject);
|
procedure TipoIVAEditValueChanged(Sender: TObject);
|
||||||
|
procedure AlmacenEditValueChanged(Sender: TObject);
|
||||||
procedure CustomViewShow(Sender: TObject);
|
procedure CustomViewShow(Sender: TObject);
|
||||||
private
|
private
|
||||||
FEmpresa: IBizEmpresa;
|
FEmpresa: IBizEmpresa;
|
||||||
@ -110,6 +113,7 @@ type
|
|||||||
FPoblaciones : TStringList;
|
FPoblaciones : TStringList;
|
||||||
FFormasPago: TStringList;
|
FFormasPago: TStringList;
|
||||||
FTiposIVA: TStringList;
|
FTiposIVA: TStringList;
|
||||||
|
FAlmacen: TStringList;
|
||||||
procedure CargarProvincias;
|
procedure CargarProvincias;
|
||||||
procedure CargarPoblaciones;
|
procedure CargarPoblaciones;
|
||||||
function GetEmpresa: IBizEmpresa;
|
function GetEmpresa: IBizEmpresa;
|
||||||
@ -184,6 +188,17 @@ begin
|
|||||||
// (Sender as TAction).Enabled := not cxDBImage1.Picture.Graphic.Empty;
|
// (Sender as TAction).Enabled := not cxDBImage1.Picture.Graphic.Empty;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewEmpresa.AlmacenEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
IDAlmacen: String;
|
||||||
|
begin
|
||||||
|
IDAlmacen := '';
|
||||||
|
if Assigned(FAlmacen) then
|
||||||
|
IDAlmacen := FAlmacen.Values[cbAlmacen.EditValue];
|
||||||
|
|
||||||
|
Controller.AsignarIDAlmacen(FEmpresa, IDAlmacen);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrViewEmpresa.CargarPoblaciones;
|
procedure TfrViewEmpresa.CargarPoblaciones;
|
||||||
var
|
var
|
||||||
i : integer;
|
i : integer;
|
||||||
@ -290,6 +305,14 @@ begin
|
|||||||
cbTipoIVA.ItemIndex := i;
|
cbTipoIVA.ItemIndex := i;
|
||||||
|
|
||||||
cbTipoIVA.Properties.OnEditValueChanged := TipoIVAEditValueChanged;
|
cbTipoIVA.Properties.OnEditValueChanged := TipoIVAEditValueChanged;
|
||||||
|
|
||||||
|
//Activamos el alamcen que tenga la empresa
|
||||||
|
cbAlmacen.ItemIndex := 0;
|
||||||
|
for i := 0 to FAlmacen.Count - 1 do
|
||||||
|
if IntToStr(FEmpresa.ID_ALMACEN) = FAlmacen.Values[FAlmacen.Names[i]] then
|
||||||
|
cbAlmacen.ItemIndex := i;
|
||||||
|
|
||||||
|
cbAlmacen.Properties.OnEditValueChanged := AlmacenEditValueChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TfrViewEmpresa.Destroy;
|
destructor TfrViewEmpresa.Destroy;
|
||||||
@ -302,6 +325,9 @@ begin
|
|||||||
if Assigned(FFormasPago) then
|
if Assigned(FFormasPago) then
|
||||||
FreeANDNIL(FFormasPago);
|
FreeANDNIL(FFormasPago);
|
||||||
|
|
||||||
|
if Assigned(FAlmacen) then
|
||||||
|
FreeANDNIL(FAlmacen);
|
||||||
|
|
||||||
if Assigned(FProvincias) then
|
if Assigned(FProvincias) then
|
||||||
FreeANDNIL(FProvincias);
|
FreeANDNIL(FProvincias);
|
||||||
|
|
||||||
@ -389,6 +415,20 @@ begin
|
|||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
FAlmacen := FController.DarListaAlmacenes(FEmpresa.ID);
|
||||||
|
if Assigned(FAlmacen) then
|
||||||
|
with cbAlmacen.Properties.Items do
|
||||||
|
begin
|
||||||
|
BeginUpdate;
|
||||||
|
try
|
||||||
|
Clear;
|
||||||
|
for i := 0 to FAlmacen.Count - 1 do
|
||||||
|
Add(FAlmacen.Names[i]);
|
||||||
|
finally
|
||||||
|
EndUpdate;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -443,9 +443,9 @@ begin
|
|||||||
AGridStatus := TcxGridStatus.Create(TcxGridDBTableView(AGrid.ActiveView));
|
AGridStatus := TcxGridStatus.Create(TcxGridDBTableView(AGrid.ActiveView));
|
||||||
Clipboard.Open;
|
Clipboard.Open;
|
||||||
try
|
try
|
||||||
CopiarGridAlPortapapelesTXT(AGrid);
|
CopiarGridAlPortapapelesTXT(AGrid, True);
|
||||||
CopiarGridAlPortapapelesRTF(AGrid);
|
CopiarGridAlPortapapelesRTF(AGrid, True);
|
||||||
CopiarGridAlPortapapelesHTML(AGrid);
|
CopiarGridAlPortapapelesHTML(AGrid, True);
|
||||||
|
|
||||||
AMemStream := TMemoryStream.Create;
|
AMemStream := TMemoryStream.Create;
|
||||||
try
|
try
|
||||||
|
|||||||
@ -1143,7 +1143,7 @@ procedure TfrViewDetallesBase.actDetallesCopiarExecute(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
try
|
try
|
||||||
CopiarSeleccionGridAlPortapapeles(_Grid, True);
|
CopiarSeleccionGridAlPortapapeles(_Grid);
|
||||||
finally
|
finally
|
||||||
HideHourglassCursor;
|
HideHourglassCursor;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -31,7 +31,7 @@ type
|
|||||||
procedure DARemoteServiceCreate(Sender: TObject);
|
procedure DARemoteServiceCreate(Sender: TObject);
|
||||||
procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject;
|
procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject;
|
||||||
var aConnectionName: string);
|
var aConnectionName: string);
|
||||||
protected
|
public
|
||||||
function DarListaAlmacenes(const IDEmpresa: Integer): Binary;
|
function DarListaAlmacenes(const IDEmpresa: Integer): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -197,6 +197,7 @@ procedure TBizPedidoProveedor.IniciarValoresPedidoNuevo;
|
|||||||
begin
|
begin
|
||||||
ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
|
ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
|
||||||
USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
USUARIO := AppFactuGES.UsuarioActivo.UserName;
|
||||||
|
ID_ALMACEN := AppFactuGES.EmpresaActiva.ID_ALMACEN;
|
||||||
FECHA_PEDIDO := DateOf(Date);
|
FECHA_PEDIDO := DateOf(Date);
|
||||||
SITUACION := SITUACION_PEDIDO_PENDIENTE;
|
SITUACION := SITUACION_PEDIDO_PENDIENTE;
|
||||||
INCIDENCIAS_ACTIVAS := 0;
|
INCIDENCIAS_ACTIVAS := 0;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -105,6 +105,14 @@
|
|||||||
</Parameter>
|
</Parameter>
|
||||||
</Parameters>
|
</Parameters>
|
||||||
</Operation>
|
</Operation>
|
||||||
|
<Operation Name="DarListaAlmacenes" UID="{0A42CA2E-4909-4F74-9C66-11287321D63A}">
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="Result" DataType="Binary" Flag="Result">
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="ID_EMPRESA" DataType="Integer" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
|
</Parameters>
|
||||||
|
</Operation>
|
||||||
</Operations>
|
</Operations>
|
||||||
</Interface>
|
</Interface>
|
||||||
</Interfaces>
|
</Interfaces>
|
||||||
|
|||||||
@ -286,6 +286,7 @@ type
|
|||||||
['{590F06D1-26B4-435B-B636-50CB8FFE6353}']
|
['{590F06D1-26B4-435B-B636-50CB8FFE6353}']
|
||||||
function DarListaFormasPago: Binary;
|
function DarListaFormasPago: Binary;
|
||||||
function DarListaTiposIVA: Binary;
|
function DarListaTiposIVA: Binary;
|
||||||
|
function DarListaAlmacenes(const ID_EMPRESA: Integer): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ CosrvEmpresas }
|
{ CosrvEmpresas }
|
||||||
@ -300,6 +301,7 @@ type
|
|||||||
|
|
||||||
function DarListaFormasPago: Binary;
|
function DarListaFormasPago: Binary;
|
||||||
function DarListaTiposIVA: Binary;
|
function DarListaTiposIVA: Binary;
|
||||||
|
function DarListaAlmacenes(const ID_EMPRESA: Integer): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ IsrvConfiguracion }
|
{ IsrvConfiguracion }
|
||||||
@ -1435,6 +1437,23 @@ begin
|
|||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TsrvEmpresas_Proxy.DarListaAlmacenes(const ID_EMPRESA: Integer): Binary;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
result := nil;
|
||||||
|
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'DarListaAlmacenes');
|
||||||
|
__Message.Write('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
||||||
|
__Message.Finalize;
|
||||||
|
|
||||||
|
__TransportChannel.Dispatch(__Message);
|
||||||
|
|
||||||
|
__Message.Read('Result', TypeInfo(Binary), result, []);
|
||||||
|
finally
|
||||||
|
__Message.UnsetAttributes(__TransportChannel);
|
||||||
|
__Message.FreeStream;
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
|
||||||
{ CosrvConfiguracion }
|
{ CosrvConfiguracion }
|
||||||
|
|
||||||
class function CosrvConfiguracion.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvConfiguracion;
|
class function CosrvConfiguracion.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvConfiguracion;
|
||||||
|
|||||||
@ -67,6 +67,7 @@ type
|
|||||||
published
|
published
|
||||||
procedure Invoke_DarListaFormasPago(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure Invoke_DarListaFormasPago(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
procedure Invoke_DarListaTiposIVA(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure Invoke_DarListaTiposIVA(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
|
procedure Invoke_DarListaAlmacenes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TsrvConfiguracion_Invoker = class(TDataAbstractService_Invoker)
|
TsrvConfiguracion_Invoker = class(TDataAbstractService_Invoker)
|
||||||
@ -557,6 +558,34 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TsrvEmpresas_Invoker.Invoke_DarListaAlmacenes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
|
{ function DarListaAlmacenes(const ID_EMPRESA: Integer): Binary; }
|
||||||
|
var
|
||||||
|
ID_EMPRESA: Integer;
|
||||||
|
lResult: Binary;
|
||||||
|
__lObjectDisposer: TROObjectDisposer;
|
||||||
|
begin
|
||||||
|
lResult := nil;
|
||||||
|
try
|
||||||
|
__Message.Read('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
||||||
|
|
||||||
|
lResult := (__Instance as IsrvEmpresas).DarListaAlmacenes(ID_EMPRESA);
|
||||||
|
|
||||||
|
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvEmpresas', 'DarListaAlmacenesResponse');
|
||||||
|
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
||||||
|
__Message.Finalize;
|
||||||
|
__Message.UnsetAttributes(__Transport);
|
||||||
|
|
||||||
|
finally
|
||||||
|
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
|
||||||
|
try
|
||||||
|
__lObjectDisposer.Add(lResult);
|
||||||
|
finally
|
||||||
|
__lObjectDisposer.Free();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TsrvConfiguracion_Invoker }
|
{ TsrvConfiguracion_Invoker }
|
||||||
|
|
||||||
constructor TsrvConfiguracion_Invoker.Create;
|
constructor TsrvConfiguracion_Invoker.Create;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -119,8 +119,6 @@ uses
|
|||||||
uRptRecibosProveedor_Server in '..\Modulos\Recibos de proveedor\Reports\uRptRecibosProveedor_Server.pas' {RptRecibosProveedor: TDataModule},
|
uRptRecibosProveedor_Server in '..\Modulos\Recibos de proveedor\Reports\uRptRecibosProveedor_Server.pas' {RptRecibosProveedor: TDataModule},
|
||||||
schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas',
|
schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas',
|
||||||
schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas',
|
schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas',
|
||||||
schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
|
|
||||||
schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
|
|
||||||
schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas',
|
schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas',
|
||||||
schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas',
|
schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas',
|
||||||
schPedidosProveedorClient_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorClient_Intf.pas',
|
schPedidosProveedorClient_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorClient_Intf.pas',
|
||||||
@ -135,7 +133,9 @@ uses
|
|||||||
schInventarioClient_Intf in '..\Modulos\Inventario\Model\schInventarioClient_Intf.pas',
|
schInventarioClient_Intf in '..\Modulos\Inventario\Model\schInventarioClient_Intf.pas',
|
||||||
schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas',
|
schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas',
|
||||||
schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas',
|
schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas',
|
||||||
schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas';
|
schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas',
|
||||||
|
schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
|
||||||
|
schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas';
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
{$R ..\Servicios\RODLFile.res}
|
{$R ..\Servicios\RODLFile.res}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileVersion", "1.7.8.0\0"
|
VALUE "FileVersion", "1.7.8.0\0"
|
||||||
VALUE "ProductVersion", "1.7.8.0\0"
|
VALUE "ProductVersion", "1.7.8.0\0"
|
||||||
VALUE "CompileDate", "miércoles, 25 de noviembre de 2009 13:14\0"
|
VALUE "CompileDate", "lunes, 08 de febrero de 2010 19:24\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user