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