diff --git a/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas b/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas
index 16fd050d..6a63b498 100644
--- a/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas
+++ b/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas
@@ -12,7 +12,8 @@ type
IEmpresasController = interface(IControllerBase)
['{2F0AB21C-4F19-446E-87C4-B9C1038850FC}']
function Buscar(const ID: Integer): IBizEmpresa;
- function BuscarTodos: IBizEmpresa;
+ function BuscarTodos: IBizEmpresa; overload;
+ function BuscarTodos(const ID_PERFIL: Integer): IBizEmpresa; overload;
procedure Ver(AEmpresa : IBizEmpresa);
procedure VerTodos(AEmpresas: IBizEmpresa);
function Nuevo : IBizEmpresa;
@@ -54,7 +55,8 @@ type
procedure Anadir(AEmpresa : IBizEmpresa); virtual;
function Buscar(const ID: Integer): IBizEmpresa; virtual;
- function BuscarTodos: IBizEmpresa; virtual;
+ function BuscarTodos: IBizEmpresa; overload; virtual;
+ function BuscarTodos(const ID_PERFIL: Integer): IBizEmpresa; overload;
function Nuevo : IBizEmpresa; virtual;
procedure Ver(AEmpresa : IBizEmpresa); virtual;
procedure VerTodos(AEmpresas: IBizEmpresa); virtual;
@@ -73,8 +75,8 @@ type
implementation
uses
- uEditorRegistryUtils, cxControls, DB, uFactuGES_App,
- uDataModuleEmpresas, uIEditorEmpresa, uStringsUtils;
+ uDAInterfaces, uEditorRegistryUtils, cxControls, DB, uFactuGES_App,
+ uDataModuleEmpresas, uIEditorEmpresa, uStringsUtils, schEmpresasClient_Intf;
{ TEmpresasController }
@@ -121,6 +123,30 @@ begin
Result := FDataModule.GetItem(ID)
end;
+function TEmpresasController.BuscarTodos(const ID_PERFIL: Integer): IBizEmpresa;
+var
+ Condicion: TDAWhereExpression;
+begin
+ ShowHourglassCursor;
+ try
+ Result := BuscarTodos;
+
+ with Result.DataTable.DynamicWhere do
+ begin
+ // ID_PERFIL
+ Condicion := NewBinaryExpression(NewField('', fld_EmpresasID_PERFIL), NewConstant(ID_PERFIL, datInteger), dboEqual);
+
+ if IsEmpty then
+ Expression := Condicion
+ else
+ Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
+ end;
+Result.open;
+ finally
+ HideHourglassCursor;
+ end;
+end;
+
function TEmpresasController.BuscarTodos: IBizEmpresa;
begin
Result := FDataModule.GetItems;
diff --git a/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm b/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm
index 2e8dc249..f2088830 100644
--- a/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm
+++ b/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm
@@ -195,6 +195,10 @@ inherited DataModuleEmpresas: TDataModuleEmpresas
item
Name = 'NUM_ORDEN'
DataType = datSmallInt
+ end
+ item
+ Name = 'ID_PERFIL'
+ DataType = datInteger
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
diff --git a/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas b/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas
index 1fc454fe..8a858e7a 100644
--- a/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas
+++ b/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas
@@ -9,9 +9,9 @@ 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_EmpresasTiendas = '{2D0CBF0D-F553-4B27-A97E-69F0CB992B85}';
- RID_Empresas = '{5F68CAB3-AA6C-4548-AA3D-9B2892E399D5}';
- RID_EmpresasDatosBanco = '{ADA2DFEA-5B7B-4213-AC8B-052718814CFB}';
+ RID_EmpresasTiendas = '{3533FE9D-1F57-4EAD-ADCF-41E9BAE8E0A8}';
+ RID_Empresas = '{AB7C71EF-D2F3-43E3-928E-83E62A65AD60}';
+ RID_EmpresasDatosBanco = '{6B72546D-7B98-462F-849E-EC7C95FE01B8}';
{ Data table names }
nme_EmpresasTiendas = 'EmpresasTiendas';
@@ -81,6 +81,7 @@ const
fld_EmpresasID_FORMA_PAGO = 'ID_FORMA_PAGO';
fld_EmpresasVALIDEZ_PRESUPUESTOS = 'VALIDEZ_PRESUPUESTOS';
fld_EmpresasNUM_ORDEN = 'NUM_ORDEN';
+ fld_EmpresasID_PERFIL = 'ID_PERFIL';
{ Empresas field indexes }
idx_EmpresasID = 0;
@@ -109,6 +110,7 @@ const
idx_EmpresasID_FORMA_PAGO = 23;
idx_EmpresasVALIDEZ_PRESUPUESTOS = 24;
idx_EmpresasNUM_ORDEN = 25;
+ idx_EmpresasID_PERFIL = 26;
{ EmpresasDatosBanco fields }
fld_EmpresasDatosBancoID = 'ID';
@@ -135,7 +137,7 @@ const
type
{ IEmpresasTiendas }
IEmpresasTiendas = interface(IDAStronglyTypedDataTable)
- ['{B17D4A25-3C95-4075-9307-CC0A359DA23D}']
+ ['{DE6BE283-469C-4253-9A99-60E55A11E17C}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -350,7 +352,7 @@ type
{ IEmpresas }
IEmpresas = interface(IDAStronglyTypedDataTable)
- ['{30C607F7-704F-4BB8-B0A3-60242A0731FC}']
+ ['{D210073A-3C0F-46FD-97FD-3928459451E7}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -454,6 +456,10 @@ type
procedure SetNUM_ORDENValue(const aValue: SmallInt);
function GetNUM_ORDENIsNull: Boolean;
procedure SetNUM_ORDENIsNull(const aValue: Boolean);
+ function GetID_PERFILValue: Integer;
+ procedure SetID_PERFILValue(const aValue: Integer);
+ function GetID_PERFILIsNull: Boolean;
+ procedure SetID_PERFILIsNull(const aValue: Boolean);
{ Properties }
@@ -509,6 +515,8 @@ type
property VALIDEZ_PRESUPUESTOSIsNull: Boolean read GetVALIDEZ_PRESUPUESTOSIsNull write SetVALIDEZ_PRESUPUESTOSIsNull;
property NUM_ORDEN: SmallInt read GetNUM_ORDENValue write SetNUM_ORDENValue;
property NUM_ORDENIsNull: Boolean read GetNUM_ORDENIsNull write SetNUM_ORDENIsNull;
+ property ID_PERFIL: Integer read GetID_PERFILValue write SetID_PERFILValue;
+ property ID_PERFILIsNull: Boolean read GetID_PERFILIsNull write SetID_PERFILIsNull;
end;
{ TEmpresasDataTableRules }
@@ -622,6 +630,10 @@ type
procedure SetNUM_ORDENValue(const aValue: SmallInt); virtual;
function GetNUM_ORDENIsNull: Boolean; virtual;
procedure SetNUM_ORDENIsNull(const aValue: Boolean); virtual;
+ function GetID_PERFILValue: Integer; virtual;
+ procedure SetID_PERFILValue(const aValue: Integer); virtual;
+ function GetID_PERFILIsNull: Boolean; virtual;
+ procedure SetID_PERFILIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@@ -676,6 +688,8 @@ type
property VALIDEZ_PRESUPUESTOSIsNull: Boolean read GetVALIDEZ_PRESUPUESTOSIsNull write SetVALIDEZ_PRESUPUESTOSIsNull;
property NUM_ORDEN: SmallInt read GetNUM_ORDENValue write SetNUM_ORDENValue;
property NUM_ORDENIsNull: Boolean read GetNUM_ORDENIsNull write SetNUM_ORDENIsNull;
+ property ID_PERFIL: Integer read GetID_PERFILValue write SetID_PERFILValue;
+ property ID_PERFILIsNull: Boolean read GetID_PERFILIsNull write SetID_PERFILIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@@ -685,7 +699,7 @@ type
{ IEmpresasDatosBanco }
IEmpresasDatosBanco = interface(IDAStronglyTypedDataTable)
- ['{F7F1B489-BB1D-40BC-A59A-22B602496003}']
+ ['{DF6BEEB5-1CC8-4419-A432-D1FC275D5852}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -1747,6 +1761,27 @@ begin
DataTable.Fields[idx_EmpresasNUM_ORDEN].AsVariant := Null;
end;
+function TEmpresasDataTableRules.GetID_PERFILValue: Integer;
+begin
+ result := DataTable.Fields[idx_EmpresasID_PERFIL].AsInteger;
+end;
+
+procedure TEmpresasDataTableRules.SetID_PERFILValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_EmpresasID_PERFIL].AsInteger := aValue;
+end;
+
+function TEmpresasDataTableRules.GetID_PERFILIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_EmpresasID_PERFIL].IsNull;
+end;
+
+procedure TEmpresasDataTableRules.SetID_PERFILIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_EmpresasID_PERFIL].AsVariant := Null;
+end;
+
{ TEmpresasDatosBancoDataTableRules }
constructor TEmpresasDatosBancoDataTableRules.Create(aDataTable: TDADataTable);
diff --git a/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas b/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas
index bb18629a..d0cfccb9 100644
--- a/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas
+++ b/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas
@@ -9,14 +9,14 @@ 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_EmpresasTiendasDelta = '{2B441BBC-0852-4F43-9F92-A80D1AEA0015}';
- RID_EmpresasDelta = '{075BBDAF-2A9C-4297-B998-07956394B428}';
- RID_EmpresasDatosBancoDelta = '{CF3899EF-A340-48E6-ACC6-463D9FB867F1}';
+ RID_EmpresasTiendasDelta = '{13E84D72-2300-4184-9F8C-B1F4F117CD4A}';
+ RID_EmpresasDelta = '{C652CB8F-D35A-4C25-80C6-C18C214FF9F8}';
+ RID_EmpresasDatosBancoDelta = '{D8E33A1D-2CF4-408D-A7EE-68711A3EE24F}';
type
{ IEmpresasTiendasDelta }
IEmpresasTiendasDelta = interface(IEmpresasTiendas)
- ['{2B441BBC-0852-4F43-9F92-A80D1AEA0015}']
+ ['{13E84D72-2300-4184-9F8C-B1F4F117CD4A}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -231,7 +231,7 @@ type
{ IEmpresasDelta }
IEmpresasDelta = interface(IEmpresas)
- ['{075BBDAF-2A9C-4297-B998-07956394B428}']
+ ['{C652CB8F-D35A-4C25-80C6-C18C214FF9F8}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldNIF_CIFValue : String;
@@ -259,6 +259,7 @@ type
function GetOldID_FORMA_PAGOValue : SmallInt;
function GetOldVALIDEZ_PRESUPUESTOSValue : SmallInt;
function GetOldNUM_ORDENValue : SmallInt;
+ function GetOldID_PERFILValue : Integer;
{ Properties }
property OldID : Integer read GetOldIDValue;
@@ -287,6 +288,7 @@ type
property OldID_FORMA_PAGO : SmallInt read GetOldID_FORMA_PAGOValue;
property OldVALIDEZ_PRESUPUESTOS : SmallInt read GetOldVALIDEZ_PRESUPUESTOSValue;
property OldNUM_ORDEN : SmallInt read GetOldNUM_ORDENValue;
+ property OldID_PERFIL : Integer read GetOldID_PERFILValue;
end;
{ TEmpresasBusinessProcessorRules }
@@ -452,6 +454,12 @@ type
function GetOldNUM_ORDENIsNull: Boolean; virtual;
procedure SetNUM_ORDENValue(const aValue: SmallInt); virtual;
procedure SetNUM_ORDENIsNull(const aValue: Boolean); virtual;
+ function GetID_PERFILValue: Integer; virtual;
+ function GetID_PERFILIsNull: Boolean; virtual;
+ function GetOldID_PERFILValue: Integer; virtual;
+ function GetOldID_PERFILIsNull: Boolean; virtual;
+ procedure SetID_PERFILValue(const aValue: Integer); virtual;
+ procedure SetID_PERFILIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@@ -558,6 +566,10 @@ type
property NUM_ORDENIsNull : Boolean read GetNUM_ORDENIsNull write SetNUM_ORDENIsNull;
property OldNUM_ORDEN : SmallInt read GetOldNUM_ORDENValue;
property OldNUM_ORDENIsNull : Boolean read GetOldNUM_ORDENIsNull;
+ property ID_PERFIL : Integer read GetID_PERFILValue write SetID_PERFILValue;
+ property ID_PERFILIsNull : Boolean read GetID_PERFILIsNull write SetID_PERFILIsNull;
+ property OldID_PERFIL : Integer read GetOldID_PERFILValue;
+ property OldID_PERFILIsNull : Boolean read GetOldID_PERFILIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@@ -567,7 +579,7 @@ type
{ IEmpresasDatosBancoDelta }
IEmpresasDatosBancoDelta = interface(IEmpresasDatosBanco)
- ['{CF3899EF-A340-48E6-ACC6-463D9FB867F1}']
+ ['{D8E33A1D-2CF4-408D-A7EE-68711A3EE24F}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -2052,6 +2064,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasNUM_ORDEN] := Null;
end;
+function TEmpresasBusinessProcessorRules.GetID_PERFILValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_PERFIL];
+end;
+
+function TEmpresasBusinessProcessorRules.GetID_PERFILIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_PERFIL]);
+end;
+
+function TEmpresasBusinessProcessorRules.GetOldID_PERFILValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasID_PERFIL];
+end;
+
+function TEmpresasBusinessProcessorRules.GetOldID_PERFILIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasID_PERFIL]);
+end;
+
+procedure TEmpresasBusinessProcessorRules.SetID_PERFILValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_PERFIL] := aValue;
+end;
+
+procedure TEmpresasBusinessProcessorRules.SetID_PERFILIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_PERFIL] := Null;
+end;
+
{ TEmpresasDatosBancoBusinessProcessorRules }
constructor TEmpresasDatosBancoBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
diff --git a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm
index c08efce4..ea5a14f0 100644
--- a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm
+++ b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm
@@ -299,6 +299,10 @@ object srvEmpresas: TsrvEmpresas
item
DatasetField = 'NUM_ORDEN'
TableField = 'NUM_ORDEN'
+ end
+ item
+ DatasetField = 'ID_PERFIL'
+ TableField = 'ID_PERFIL'
end>
end>
Name = 'Empresas'
@@ -449,6 +453,10 @@ object srvEmpresas: TsrvEmpresas
item
Name = 'NUM_ORDEN'
DataType = datSmallInt
+ end
+ item
+ Name = 'ID_PERFIL'
+ DataType = datInteger
end>
end
item
@@ -1228,9 +1236,9 @@ object srvEmpresas: TsrvEmpresas
Top = 90
DiagramData =
''#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10
+ 'idth="400" Height="300">'#13#10' '#13#10' '#13#10' '#13#10''#13#10
end
object DABin2DataStreamer: TDABin2DataStreamer
Left = 48
diff --git a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.pas b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.pas
index 9e525dea..52f2d82b 100644
--- a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.pas
+++ b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.pas
@@ -22,9 +22,9 @@ type
TsrvEmpresas = class(TDataAbstractService, IsrvEmpresas)
Diagrams: TDADiagrams;
DABin2DataStreamer: TDABin2DataStreamer;
+ bpEmpresas: TDABusinessProcessor;
schEmpresas: TDASchema;
DataDictionary: TDADataDictionary;
- bpEmpresas: TDABusinessProcessor;
procedure DARemoteServiceCreate(Sender: TObject);
procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject;
var aConnectionName: string);
diff --git a/Source/ApplicationBase/uFactuGES_App.pas b/Source/ApplicationBase/uFactuGES_App.pas
index 38c946e4..6e9f9eb3 100644
--- a/Source/ApplicationBase/uFactuGES_App.pas
+++ b/Source/ApplicationBase/uFactuGES_App.pas
@@ -552,7 +552,7 @@ begin
//Añadimos las diferentes empresas que existan
AEmpresasController := TEmpresasController.Create;
- AEmpresas := AEmpresasController.BuscarTodos;
+ AEmpresas := AEmpresasController.BuscarTodos(AppFactuGES.UsuarioActivo.ID_PERFIL);
AEmpresas.DataTable.Active := True;
AEmpresas.Datatable.First;
diff --git a/Source/ApplicationBase/uPlugins_Intf.pas b/Source/ApplicationBase/uPlugins_Intf.pas
index c8717db4..4c562372 100644
--- a/Source/ApplicationBase/uPlugins_Intf.pas
+++ b/Source/ApplicationBase/uPlugins_Intf.pas
@@ -14,10 +14,11 @@ const
MODULENAME_RECIBOS_CLIENTE = 'RecibosCliente_plugin.bpl';
}
MODULENAME_PEDIDOS_PROVEEDOR = 'PedidosProveedor_plugin.bpl';
-
+ MODULENAME_FACTURAS_PROVEEDOR = 'FacturasProveedor_plugin.bpl';
+
{
MODULENAME_ALBARANES_PROVEEDOR = 'AlbaranesProveedor_plugin.bpl';
- MODULENAME_FACTURAS_PROVEEDOR = 'FacturasProveedor_plugin.bpl';
+
MODULENAME_RECIBOS_PROVEEDOR = 'RecibosProveedor_plugin.bpl';
MODULENAME_PROCESO_PRESUPUESTOS_CLIENTE = 'ProcesoPresupuestosCliente_plugin.bpl';
}
@@ -81,12 +82,12 @@ type
end;
}
-// IMCFacturasProveedor = interface(IInterface)
-// ['{8A48058F-490E-4BF4-9BBB-09654B66CEED}']
-{ procedure VerFacturas(const ID_Proveedor: Integer;
- const ANombreProveedor : String = '');
+ IMCFacturasProveedor = interface(IInterface)
+ ['{8A48058F-490E-4BF4-9BBB-09654B66CEED}']
+// procedure VerFacturas(const ID_Proveedor: Integer; const ANombreProveedor : String = '');
+ procedure VerFacturasContrato(Const ID_Contrato: Integer; Ref_Contrato: String = ''; NomCLi_Contrato: String = '');
end;
-}
+
// IMCRecibosProveedor = interface(IInterface)
// ['{24A23E95-D148-404C-9987-B1ED4A19D3CA}']
diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj
index b79886f5..afb554c2 100644
--- a/Source/Base/Base.dproj
+++ b/Source/Base/Base.dproj
@@ -57,13 +57,6 @@
-
-
-
-
-
-
-
VCL for the Web Design Package for CodeGear RAD Studio
CodeGear WebSnap Components
@@ -79,54 +72,54 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Cliente/uMainMenuController.pas b/Source/Cliente/uMainMenuController.pas
index a6eda53b..8e44eaba 100644
--- a/Source/Cliente/uMainMenuController.pas
+++ b/Source/Cliente/uMainMenuController.pas
@@ -78,7 +78,7 @@ begin
if Assigned(AListaEmpresasItem) then
begin
- AEmpresas := AppFactuGES.EmpresasController.BuscarTodos;
+ AEmpresas := AppFactuGES.EmpresasController.BuscarTodos(AppFactuGES.UsuarioActivo.ID_PERFIL);;
try
AEmpresas.DataTable.Active := True;
while not AEmpresas.DataTable.EOF do
diff --git a/Source/Cliente/uNavPaneController.pas b/Source/Cliente/uNavPaneController.pas
index 0db4937d..201ede10 100644
--- a/Source/Cliente/uNavPaneController.pas
+++ b/Source/Cliente/uNavPaneController.pas
@@ -127,7 +127,7 @@ begin
end;
// Crear páginas con empresas y rellenarlas
- AEmpresas := AppFactuGES.EmpresasController.BuscarTodos;
+ AEmpresas := AppFactuGES.EmpresasController.BuscarTodos(AppFactuGES.UsuarioActivo.ID_PERFIL);;
try
AEmpresas.DataTable.Active := True;
diff --git a/Source/Cliente/uPantallaPrincipal.dfm b/Source/Cliente/uPantallaPrincipal.dfm
index a7a55828..715d7c56 100644
--- a/Source/Cliente/uPantallaPrincipal.dfm
+++ b/Source/Cliente/uPantallaPrincipal.dfm
@@ -273,8 +273,6 @@ object fPantallaPrincipal: TfPantallaPrincipal
object actMenuLogistica: TAction
Category = 'Menus'
Caption = 'Log'#237'stica'
- Enabled = False
- Visible = False
OnExecute = actMenuLogisticaExecute
OnUpdate = actMenuComprasUpdate
end
diff --git a/Source/Cliente/uPantallaPrincipal.pas b/Source/Cliente/uPantallaPrincipal.pas
index 1fa72541..84d516d5 100644
--- a/Source/Cliente/uPantallaPrincipal.pas
+++ b/Source/Cliente/uPantallaPrincipal.pas
@@ -195,7 +195,29 @@ end;
procedure TfPantallaPrincipal.FormShow(Sender: TObject);
begin
+ //El usuario vendedor y logistica será restringido
+ if ((AppFactuGES.UsuarioActivo.ID_PERFIL = 5) OR (AppFactuGES.UsuarioActivo.ID_PERFIL = 4)) then
+ begin
+ Informes1.Enabled := False;
+ Informes1.Visible := False;
+ Contabilidad1.Enabled := False;
+ Contabilidad1.Visible := False;
+ Informacindeempresa1.Visible := False;
+ end;
+
InicializarUI;
+
+ //Solo verá administracion de usuarios el perfil Administrador(3), están en la tabla usuarios
+ if (AppFactuGES.UsuarioActivo.ID_PERFIL <> 2) then
+ begin
+ Administracin1.Visible := False;
+ if (AppFactuGES.UsuarioActivo.ID_PERFIL <> 3) then
+ ConfigurarFactuGES1.Visible := False;
+ end;
+
+ //perfil logistica
+ if (AppFactuGES.UsuarioActivo.ID_PERFIL <> 5) then
+ Logistica1.Visible := False;
end;
procedure TfPantallaPrincipal.RefrescarUI;
@@ -346,7 +368,7 @@ begin
NavPaneController.InitNavPane;
try
- AListaEmpresas := AppFactuGES.EmpresasController.BuscarTodos;
+ AListaEmpresas := AppFactuGES.EmpresasController.BuscarTodos(AppFactuGES.UsuarioActivo.ID_PERFIL);
if Assigned(AListaEmpresas) then
begin
AListaEmpresas.Active := True;
diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj
index f5d41b84..8409acc9 100644
--- a/Source/GUIBase/GUIBase.dproj
+++ b/Source/GUIBase/GUIBase.dproj
@@ -58,34 +58,34 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Modulos/Comisiones/Plugin/uPluginComisiones.pas b/Source/Modulos/Comisiones/Plugin/uPluginComisiones.pas
index 6dc845d2..adfe7073 100644
--- a/Source/Modulos/Comisiones/Plugin/uPluginComisiones.pas
+++ b/Source/Modulos/Comisiones/Plugin/uPluginComisiones.pas
@@ -62,6 +62,11 @@ constructor TPluginComisiones.Create(AOwner: TComponent);
begin
inherited;
uComisionesViewRegister.RegisterViews;
+
+ //El usuario vendedor y logistica será restringido
+ if ((AppFactuGES.UsuarioActivo.ID_PERFIL = 5) OR (AppFactuGES.UsuarioActivo.ID_PERFIL = 4)) then
+ actComisiones.Visible := False;
+
end;
destructor TPluginComisiones.Destroy;
diff --git a/Source/Modulos/Contabilidad/Plugin/uPluginContabilidad.pas b/Source/Modulos/Contabilidad/Plugin/uPluginContabilidad.pas
index 08d293f7..7fb497e6 100644
--- a/Source/Modulos/Contabilidad/Plugin/uPluginContabilidad.pas
+++ b/Source/Modulos/Contabilidad/Plugin/uPluginContabilidad.pas
@@ -183,6 +183,14 @@ constructor TPluginContabilidad.Create(AOwner: TComponent);
begin
inherited;
uContabilidadViewRegister.RegisterViews;
+
+ //El usuario vendedor y logistica será restringido
+ if ((AppFactuGES.UsuarioActivo.ID_PERFIL = 5) OR (AppFactuGES.UsuarioActivo.ID_PERFIL = 4)) then
+ begin
+ actCuentasEspeciales.Visible := False;
+ actBalances.Visible := False;
+ end;
+
end;
destructor TPluginContabilidad.Destroy;
diff --git a/Source/Modulos/Contactos/Contactos_Group.groupproj b/Source/Modulos/Contactos/Contactos_Group.groupproj
index 1b534ecd..8f0342d3 100644
--- a/Source/Modulos/Contactos/Contactos_Group.groupproj
+++ b/Source/Modulos/Contactos/Contactos_Group.groupproj
@@ -97,15 +97,6 @@
-
-
-
-
-
-
-
-
-
@@ -115,6 +106,15 @@
+
+
+
+
+
+
+
+
+
@@ -152,13 +152,13 @@
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Contactos/Plugin/uPluginContactos.pas b/Source/Modulos/Contactos/Plugin/uPluginContactos.pas
index e7228635..617e99d0 100644
--- a/Source/Modulos/Contactos/Plugin/uPluginContactos.pas
+++ b/Source/Modulos/Contactos/Plugin/uPluginContactos.pas
@@ -143,6 +143,10 @@ constructor TPluginContactos.Create(AOwner: TComponent);
begin
inherited;
uContactosViewRegister.RegisterViews;
+
+ //El usuario vendedor y logistica será restringido
+ if ((AppFactuGES.UsuarioActivo.ID_PERFIL = 5) OR (AppFactuGES.UsuarioActivo.ID_PERFIL = 4)) then
+ actVendedores.Visible := False;
end;
destructor TPluginContactos.Destroy;
diff --git a/Source/Modulos/Contactos/Views/uEditorContactos.dfm b/Source/Modulos/Contactos/Views/uEditorContactos.dfm
index 1870c0bc..357b0213 100644
--- a/Source/Modulos/Contactos/Views/uEditorContactos.dfm
+++ b/Source/Modulos/Contactos/Views/uEditorContactos.dfm
@@ -2,6 +2,8 @@ inherited fEditorContactos: TfEditorContactos
Left = 285
Top = 448
Caption = 'Lista de contactos'
+ ExplicitWidth = 320
+ ExplicitHeight = 240
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
diff --git a/Source/Modulos/Contratos de cliente/ContratosCliente_Group.groupproj b/Source/Modulos/Contratos de cliente/ContratosCliente_Group.groupproj
index 29e2d4aa..fdecb19b 100644
--- a/Source/Modulos/Contratos de cliente/ContratosCliente_Group.groupproj
+++ b/Source/Modulos/Contratos de cliente/ContratosCliente_Group.groupproj
@@ -16,6 +16,8 @@
+
+
@@ -261,14 +263,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Contratos de cliente/Controller/ContratosCliente_controller.dproj b/Source/Modulos/Contratos de cliente/Controller/ContratosCliente_controller.dproj
index 07d8277c..211de5cc 100644
--- a/Source/Modulos/Contratos de cliente/Controller/ContratosCliente_controller.dproj
+++ b/Source/Modulos/Contratos de cliente/Controller/ContratosCliente_controller.dproj
@@ -49,15 +49,15 @@
MainSource
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas
index da955c2b..005e696f 100644
--- a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas
+++ b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas
@@ -64,6 +64,7 @@ type
procedure FiltrarAno(AContrato: IBizContratoCliente; ADynWhereDataTable: WideString; const Ano: String);
procedure VerListadoBeneficios;
procedure VerPedidosProveedor(AContrato : IBizContratoCliente);
+ procedure VerFacturasProveedor(AContrato : IBizContratoCliente);
procedure CopiarDireccion (const ADireccion: IBizDireccionesContacto; AContrato: IBizContratoCliente);
end;
@@ -140,6 +141,7 @@ type
procedure FiltrarAno(AContrato: IBizContratoCliente; ADynWhereDataTable: WideString; const Ano: String);
procedure VerListadoBeneficios;
procedure VerPedidosProveedor(AContrato : IBizContratoCliente);
+ procedure VerFacturasProveedor(AContrato : IBizContratoCliente);
procedure CopiarDireccion (const ADireccion: IBizDireccionesContacto; AContrato: IBizContratoCliente);
end;
@@ -524,6 +526,27 @@ begin
end;
end;
+procedure TContratosClienteController.VerFacturasProveedor(AContrato: IBizContratoCliente);
+var
+ AModule : TModuleController;
+ APlugin : IMCFacturasProveedor;
+begin
+ if not Assigned(AContrato) then
+ raise Exception.Create ('Contrato no asignado (VerFacturasProveedor)');
+
+ if not AContrato.DataTable.Active then
+ AContrato.DataTable.Active := True;
+
+ AModule := AppFactuGES.GetModule(MODULENAME_FACTURAS_PROVEEDOR);
+ if Assigned(AModule) then
+ try
+ if Supports(AModule, IMCFacturasProveedor, APlugin) then
+ APlugin.VerFacturasContrato(AContrato.ID, AContrato.REFERENCIA, AContrato.NOMBRE);
+ finally
+ APlugin := NIL;
+ end;
+end;
+
procedure TContratosClienteController.VerListadoBeneficios;
var
AContratosClienteBeneficios: IBizContratosClienteBeneficios;
diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm
index 38c58aa5..9323731c 100644
--- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm
+++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm
@@ -202,7 +202,7 @@ inherited fEditorContratosCliente: TfEditorContratosCliente
DockPos = 343
Visible = True
ExplicitLeft = 431
- ExplicitWidth = 687
+ ExplicitWidth = 688
object TBXSeparatorItem18: TTBXSeparatorItem
end
object TBXItem44: TTBXItem
@@ -232,6 +232,9 @@ inherited fEditorContratosCliente: TfEditorContratosCliente
Action = actListadoBeneficios
DisplayMode = nbdmImageAndText
end
+ object TBXItem49: TTBXItem
+ Action = actVerFacturasProveedor
+ end
end
end
inherited StatusBar: TJvStatusBar
@@ -298,6 +301,12 @@ inherited fEditorContratosCliente: TfEditorContratosCliente
ImageIndex = 6
OnExecute = actVerPedidosProveedorExecute
end
+ object actVerFacturasProveedor: TAction
+ Category = 'Acciones'
+ Caption = 'Ver facturas prov relacionadas'
+ ImageIndex = 6
+ OnExecute = actVerFacturasProveedorExecute
+ end
end
inherited SmallImages: TPngImageList
PngImages = <
diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas
index 07a3694f..523fca93 100644
--- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas
+++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas
@@ -52,6 +52,8 @@ type
actVerPedidosProveedor: TAction;
TBXItem48: TTBXItem;
TBXSeparatorItem20: TTBXSeparatorItem;
+ actVerFacturasProveedor: TAction;
+ TBXItem49: TTBXItem;
procedure FormShow(Sender: TObject);
procedure actGenerarAlbaranCliExecute(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject);
@@ -78,6 +80,7 @@ type
procedure actGenerarPedidoProvExecute(Sender: TObject);
procedure actGenerarPedidoProvUpdate(Sender: TObject);
procedure actVerPedidosProveedorExecute(Sender: TObject);
+ procedure actVerFacturasProveedorExecute(Sender: TObject);
protected
FContratos: IBizContratoCliente;
@@ -358,6 +361,13 @@ begin
FController.VerListadoBeneficios;
end;
+procedure TfEditorContratosCliente.actVerFacturasProveedorExecute(
+ Sender: TObject);
+begin
+ inherited;
+ FController.VerFacturasProveedor(Contratos);
+end;
+
procedure TfEditorContratosCliente.actVerPedidosProveedorExecute(
Sender: TObject);
begin
diff --git a/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm b/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm
index b8f97af6..eec87926 100644
--- a/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm
+++ b/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm
@@ -471,6 +471,20 @@ inherited DataModuleFacturasProveedor: TDataModuleFacturasProveedor
DataType = datCurrency
DisplayLabel = 'FacturasProveedor_Contratos_IMPORTE'
DictionaryEntry = 'FacturasProveedor_Contratos_IMPORTE'
+ end
+ item
+ Name = 'REFERENCIA1'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'NOMBRE1'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'BASE_IMPONIBLE'
+ DataType = datCurrency
end>
Params = <>
MasterMappingMode = mmWhere
diff --git a/Source/Modulos/Facturas de proveedor/FacturasProveedor_Group.groupproj b/Source/Modulos/Facturas de proveedor/FacturasProveedor_Group.groupproj
index a067af86..18c352db 100644
--- a/Source/Modulos/Facturas de proveedor/FacturasProveedor_Group.groupproj
+++ b/Source/Modulos/Facturas de proveedor/FacturasProveedor_Group.groupproj
@@ -20,6 +20,7 @@
+
@@ -241,14 +242,23 @@
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas
index a7acb476..6afff84c 100644
--- a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas
+++ b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas
@@ -9,10 +9,10 @@ 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_ListaAnosFacturas = '{E4006E34-9471-4B45-8BFB-34D795EE5B47}';
- RID_FacturasProveedor_Contratos = '{AEFE41C5-3FCA-46FB-8174-2704B20E2905}';
- RID_FacturasProveedor = '{4621460A-3688-408C-9676-B526823EC8EF}';
- RID_FacturasProveedor_Detalles = '{13D46CB1-CC91-4B2C-83B0-6265D005B1E1}';
+ RID_ListaAnosFacturas = '{9DA12B35-FF8C-4FC7-B9B2-D27D6192588D}';
+ RID_FacturasProveedor_Contratos = '{0B279D2E-FC78-4842-A4C9-2C3CA9C0B5AD}';
+ RID_FacturasProveedor = '{BE1C4615-1771-48A5-A934-4BCF08BF02A4}';
+ RID_FacturasProveedor_Detalles = '{F91F9389-AE70-46CB-AA45-D3F63027E132}';
{ Data table names }
nme_ListaAnosFacturas = 'ListaAnosFacturas';
@@ -34,6 +34,9 @@ const
fld_FacturasProveedor_ContratosNOMBRE = 'NOMBRE';
fld_FacturasProveedor_ContratosNIF_CIF = 'NIF_CIF';
fld_FacturasProveedor_ContratosIMPORTE = 'IMPORTE';
+ fld_FacturasProveedor_ContratosREFERENCIA1 = 'REFERENCIA1';
+ fld_FacturasProveedor_ContratosNOMBRE1 = 'NOMBRE1';
+ fld_FacturasProveedor_ContratosBASE_IMPONIBLE = 'BASE_IMPONIBLE';
{ FacturasProveedor_Contratos field indexes }
idx_FacturasProveedor_ContratosID = 0;
@@ -43,6 +46,9 @@ const
idx_FacturasProveedor_ContratosNOMBRE = 4;
idx_FacturasProveedor_ContratosNIF_CIF = 5;
idx_FacturasProveedor_ContratosIMPORTE = 6;
+ idx_FacturasProveedor_ContratosREFERENCIA1 = 7;
+ idx_FacturasProveedor_ContratosNOMBRE1 = 8;
+ idx_FacturasProveedor_ContratosBASE_IMPONIBLE = 9;
{ FacturasProveedor fields }
fld_FacturasProveedorID = 'ID';
@@ -167,7 +173,7 @@ const
type
{ IListaAnosFacturas }
IListaAnosFacturas = interface(IDAStronglyTypedDataTable)
- ['{FC0D46EE-86BF-4511-819E-E9791181DC39}']
+ ['{D700BF3D-8D70-44CF-ACC3-8B9E567A3713}']
{ Property getters and setters }
function GetANOValue: String;
procedure SetANOValue(const aValue: String);
@@ -202,7 +208,7 @@ type
{ IFacturasProveedor_Contratos }
IFacturasProveedor_Contratos = interface(IDAStronglyTypedDataTable)
- ['{DDCB3A4E-D047-4E73-8B5C-7E5879061F5E}']
+ ['{E9A001E7-1B6C-4C4B-B04A-ABBF9A035D58}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -232,6 +238,18 @@ type
procedure SetIMPORTEValue(const aValue: Currency);
function GetIMPORTEIsNull: Boolean;
procedure SetIMPORTEIsNull(const aValue: Boolean);
+ function GetREFERENCIA1Value: String;
+ procedure SetREFERENCIA1Value(const aValue: String);
+ function GetREFERENCIA1IsNull: Boolean;
+ procedure SetREFERENCIA1IsNull(const aValue: Boolean);
+ function GetNOMBRE1Value: String;
+ procedure SetNOMBRE1Value(const aValue: String);
+ function GetNOMBRE1IsNull: Boolean;
+ procedure SetNOMBRE1IsNull(const aValue: Boolean);
+ function GetBASE_IMPONIBLEValue: Currency;
+ procedure SetBASE_IMPONIBLEValue(const aValue: Currency);
+ function GetBASE_IMPONIBLEIsNull: Boolean;
+ procedure SetBASE_IMPONIBLEIsNull(const aValue: Boolean);
{ Properties }
@@ -249,6 +267,12 @@ type
property NIF_CIFIsNull: Boolean read GetNIF_CIFIsNull write SetNIF_CIFIsNull;
property IMPORTE: Currency read GetIMPORTEValue write SetIMPORTEValue;
property IMPORTEIsNull: Boolean read GetIMPORTEIsNull write SetIMPORTEIsNull;
+ property REFERENCIA1: String read GetREFERENCIA1Value write SetREFERENCIA1Value;
+ property REFERENCIA1IsNull: Boolean read GetREFERENCIA1IsNull write SetREFERENCIA1IsNull;
+ property NOMBRE1: String read GetNOMBRE1Value write SetNOMBRE1Value;
+ property NOMBRE1IsNull: Boolean read GetNOMBRE1IsNull write SetNOMBRE1IsNull;
+ property BASE_IMPONIBLE: Currency read GetBASE_IMPONIBLEValue write SetBASE_IMPONIBLEValue;
+ property BASE_IMPONIBLEIsNull: Boolean read GetBASE_IMPONIBLEIsNull write SetBASE_IMPONIBLEIsNull;
end;
{ TFacturasProveedor_ContratosDataTableRules }
@@ -284,6 +308,18 @@ type
procedure SetIMPORTEValue(const aValue: Currency); virtual;
function GetIMPORTEIsNull: Boolean; virtual;
procedure SetIMPORTEIsNull(const aValue: Boolean); virtual;
+ function GetREFERENCIA1Value: String; virtual;
+ procedure SetREFERENCIA1Value(const aValue: String); virtual;
+ function GetREFERENCIA1IsNull: Boolean; virtual;
+ procedure SetREFERENCIA1IsNull(const aValue: Boolean); virtual;
+ function GetNOMBRE1Value: String; virtual;
+ procedure SetNOMBRE1Value(const aValue: String); virtual;
+ function GetNOMBRE1IsNull: Boolean; virtual;
+ procedure SetNOMBRE1IsNull(const aValue: Boolean); virtual;
+ function GetBASE_IMPONIBLEValue: Currency; virtual;
+ procedure SetBASE_IMPONIBLEValue(const aValue: Currency); virtual;
+ function GetBASE_IMPONIBLEIsNull: Boolean; virtual;
+ procedure SetBASE_IMPONIBLEIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@@ -300,6 +336,12 @@ type
property NIF_CIFIsNull: Boolean read GetNIF_CIFIsNull write SetNIF_CIFIsNull;
property IMPORTE: Currency read GetIMPORTEValue write SetIMPORTEValue;
property IMPORTEIsNull: Boolean read GetIMPORTEIsNull write SetIMPORTEIsNull;
+ property REFERENCIA1: String read GetREFERENCIA1Value write SetREFERENCIA1Value;
+ property REFERENCIA1IsNull: Boolean read GetREFERENCIA1IsNull write SetREFERENCIA1IsNull;
+ property NOMBRE1: String read GetNOMBRE1Value write SetNOMBRE1Value;
+ property NOMBRE1IsNull: Boolean read GetNOMBRE1IsNull write SetNOMBRE1IsNull;
+ property BASE_IMPONIBLE: Currency read GetBASE_IMPONIBLEValue write SetBASE_IMPONIBLEValue;
+ property BASE_IMPONIBLEIsNull: Boolean read GetBASE_IMPONIBLEIsNull write SetBASE_IMPONIBLEIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@@ -309,7 +351,7 @@ type
{ IFacturasProveedor }
IFacturasProveedor = interface(IDAStronglyTypedDataTable)
- ['{1D01094B-37F3-499C-84DD-5C94D01CE360}']
+ ['{95F785E2-C98F-4DDC-A1BB-95E6F3A32493}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -836,7 +878,7 @@ type
{ IFacturasProveedor_Detalles }
IFacturasProveedor_Detalles = interface(IDAStronglyTypedDataTable)
- ['{4D3A6663-3708-42B0-8D14-5C4E213D48FC}']
+ ['{8682A80B-C184-4AAB-8184-A571B747DF3C}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -1220,6 +1262,69 @@ begin
DataTable.Fields[idx_FacturasProveedor_ContratosIMPORTE].AsVariant := Null;
end;
+function TFacturasProveedor_ContratosDataTableRules.GetREFERENCIA1Value: String;
+begin
+ result := DataTable.Fields[idx_FacturasProveedor_ContratosREFERENCIA1].AsString;
+end;
+
+procedure TFacturasProveedor_ContratosDataTableRules.SetREFERENCIA1Value(const aValue: String);
+begin
+ DataTable.Fields[idx_FacturasProveedor_ContratosREFERENCIA1].AsString := aValue;
+end;
+
+function TFacturasProveedor_ContratosDataTableRules.GetREFERENCIA1IsNull: boolean;
+begin
+ result := DataTable.Fields[idx_FacturasProveedor_ContratosREFERENCIA1].IsNull;
+end;
+
+procedure TFacturasProveedor_ContratosDataTableRules.SetREFERENCIA1IsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_FacturasProveedor_ContratosREFERENCIA1].AsVariant := Null;
+end;
+
+function TFacturasProveedor_ContratosDataTableRules.GetNOMBRE1Value: String;
+begin
+ result := DataTable.Fields[idx_FacturasProveedor_ContratosNOMBRE1].AsString;
+end;
+
+procedure TFacturasProveedor_ContratosDataTableRules.SetNOMBRE1Value(const aValue: String);
+begin
+ DataTable.Fields[idx_FacturasProveedor_ContratosNOMBRE1].AsString := aValue;
+end;
+
+function TFacturasProveedor_ContratosDataTableRules.GetNOMBRE1IsNull: boolean;
+begin
+ result := DataTable.Fields[idx_FacturasProveedor_ContratosNOMBRE1].IsNull;
+end;
+
+procedure TFacturasProveedor_ContratosDataTableRules.SetNOMBRE1IsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_FacturasProveedor_ContratosNOMBRE1].AsVariant := Null;
+end;
+
+function TFacturasProveedor_ContratosDataTableRules.GetBASE_IMPONIBLEValue: Currency;
+begin
+ result := DataTable.Fields[idx_FacturasProveedor_ContratosBASE_IMPONIBLE].AsCurrency;
+end;
+
+procedure TFacturasProveedor_ContratosDataTableRules.SetBASE_IMPONIBLEValue(const aValue: Currency);
+begin
+ DataTable.Fields[idx_FacturasProveedor_ContratosBASE_IMPONIBLE].AsCurrency := aValue;
+end;
+
+function TFacturasProveedor_ContratosDataTableRules.GetBASE_IMPONIBLEIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_FacturasProveedor_ContratosBASE_IMPONIBLE].IsNull;
+end;
+
+procedure TFacturasProveedor_ContratosDataTableRules.SetBASE_IMPONIBLEIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_FacturasProveedor_ContratosBASE_IMPONIBLE].AsVariant := Null;
+end;
+
{ TFacturasProveedorDataTableRules }
constructor TFacturasProveedorDataTableRules.Create(aDataTable: TDADataTable);
diff --git a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas
index 7604f721..941f5e45 100644
--- a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas
+++ b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas
@@ -9,15 +9,15 @@ 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_ListaAnosFacturasDelta = '{89FAA336-EE10-4D08-A890-EFD959DA9FB3}';
- RID_FacturasProveedor_ContratosDelta = '{2BF7C867-86B7-42EB-9FFA-92DF6E9874F0}';
- RID_FacturasProveedorDelta = '{FB90A42D-E182-4F49-9873-E549CD6C3519}';
- RID_FacturasProveedor_DetallesDelta = '{25250ECD-8E6B-4B25-9F0A-00B4B207C317}';
+ RID_ListaAnosFacturasDelta = '{AC0CC688-6329-4EF0-93EF-6AC7B08E5101}';
+ RID_FacturasProveedor_ContratosDelta = '{D7D38D2A-1168-4C6B-B57D-7BD5119CA3F5}';
+ RID_FacturasProveedorDelta = '{456F1F41-BBFB-4A9C-9565-1F8FF749CC34}';
+ RID_FacturasProveedor_DetallesDelta = '{6C81FBAB-0CDF-488E-BD58-F27BF4B72866}';
type
{ IListaAnosFacturasDelta }
IListaAnosFacturasDelta = interface(IListaAnosFacturas)
- ['{89FAA336-EE10-4D08-A890-EFD959DA9FB3}']
+ ['{AC0CC688-6329-4EF0-93EF-6AC7B08E5101}']
{ Property getters and setters }
function GetOldANOValue : String;
@@ -51,7 +51,7 @@ type
{ IFacturasProveedor_ContratosDelta }
IFacturasProveedor_ContratosDelta = interface(IFacturasProveedor_Contratos)
- ['{2BF7C867-86B7-42EB-9FFA-92DF6E9874F0}']
+ ['{D7D38D2A-1168-4C6B-B57D-7BD5119CA3F5}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_FACTURAValue : Integer;
@@ -60,6 +60,9 @@ type
function GetOldNOMBREValue : String;
function GetOldNIF_CIFValue : String;
function GetOldIMPORTEValue : Currency;
+ function GetOldREFERENCIA1Value : String;
+ function GetOldNOMBRE1Value : String;
+ function GetOldBASE_IMPONIBLEValue : Currency;
{ Properties }
property OldID : Integer read GetOldIDValue;
@@ -69,6 +72,9 @@ type
property OldNOMBRE : String read GetOldNOMBREValue;
property OldNIF_CIF : String read GetOldNIF_CIFValue;
property OldIMPORTE : Currency read GetOldIMPORTEValue;
+ property OldREFERENCIA1 : String read GetOldREFERENCIA1Value;
+ property OldNOMBRE1 : String read GetOldNOMBRE1Value;
+ property OldBASE_IMPONIBLE : Currency read GetOldBASE_IMPONIBLEValue;
end;
{ TFacturasProveedor_ContratosBusinessProcessorRules }
@@ -118,6 +124,24 @@ type
function GetOldIMPORTEIsNull: Boolean; virtual;
procedure SetIMPORTEValue(const aValue: Currency); virtual;
procedure SetIMPORTEIsNull(const aValue: Boolean); virtual;
+ function GetREFERENCIA1Value: String; virtual;
+ function GetREFERENCIA1IsNull: Boolean; virtual;
+ function GetOldREFERENCIA1Value: String; virtual;
+ function GetOldREFERENCIA1IsNull: Boolean; virtual;
+ procedure SetREFERENCIA1Value(const aValue: String); virtual;
+ procedure SetREFERENCIA1IsNull(const aValue: Boolean); virtual;
+ function GetNOMBRE1Value: String; virtual;
+ function GetNOMBRE1IsNull: Boolean; virtual;
+ function GetOldNOMBRE1Value: String; virtual;
+ function GetOldNOMBRE1IsNull: Boolean; virtual;
+ procedure SetNOMBRE1Value(const aValue: String); virtual;
+ procedure SetNOMBRE1IsNull(const aValue: Boolean); virtual;
+ function GetBASE_IMPONIBLEValue: Currency; virtual;
+ function GetBASE_IMPONIBLEIsNull: Boolean; virtual;
+ function GetOldBASE_IMPONIBLEValue: Currency; virtual;
+ function GetOldBASE_IMPONIBLEIsNull: Boolean; virtual;
+ procedure SetBASE_IMPONIBLEValue(const aValue: Currency); virtual;
+ procedure SetBASE_IMPONIBLEIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@@ -148,6 +172,18 @@ type
property IMPORTEIsNull : Boolean read GetIMPORTEIsNull write SetIMPORTEIsNull;
property OldIMPORTE : Currency read GetOldIMPORTEValue;
property OldIMPORTEIsNull : Boolean read GetOldIMPORTEIsNull;
+ property REFERENCIA1 : String read GetREFERENCIA1Value write SetREFERENCIA1Value;
+ property REFERENCIA1IsNull : Boolean read GetREFERENCIA1IsNull write SetREFERENCIA1IsNull;
+ property OldREFERENCIA1 : String read GetOldREFERENCIA1Value;
+ property OldREFERENCIA1IsNull : Boolean read GetOldREFERENCIA1IsNull;
+ property NOMBRE1 : String read GetNOMBRE1Value write SetNOMBRE1Value;
+ property NOMBRE1IsNull : Boolean read GetNOMBRE1IsNull write SetNOMBRE1IsNull;
+ property OldNOMBRE1 : String read GetOldNOMBRE1Value;
+ property OldNOMBRE1IsNull : Boolean read GetOldNOMBRE1IsNull;
+ property BASE_IMPONIBLE : Currency read GetBASE_IMPONIBLEValue write SetBASE_IMPONIBLEValue;
+ property BASE_IMPONIBLEIsNull : Boolean read GetBASE_IMPONIBLEIsNull write SetBASE_IMPONIBLEIsNull;
+ property OldBASE_IMPONIBLE : Currency read GetOldBASE_IMPONIBLEValue;
+ property OldBASE_IMPONIBLEIsNull : Boolean read GetOldBASE_IMPONIBLEIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@@ -157,7 +193,7 @@ type
{ IFacturasProveedorDelta }
IFacturasProveedorDelta = interface(IFacturasProveedor)
- ['{FB90A42D-E182-4F49-9873-E549CD6C3519}']
+ ['{456F1F41-BBFB-4A9C-9565-1F8FF749CC34}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -684,7 +720,7 @@ type
{ IFacturasProveedor_DetallesDelta }
IFacturasProveedor_DetallesDelta = interface(IFacturasProveedor_Detalles)
- ['{25250ECD-8E6B-4B25-9F0A-00B4B207C317}']
+ ['{6C81FBAB-0CDF-488E-BD58-F27BF4B72866}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_FACTURAValue : Integer;
@@ -1148,6 +1184,99 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_ContratosIMPORTE] := Null;
end;
+function TFacturasProveedor_ContratosBusinessProcessorRules.GetREFERENCIA1Value: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_ContratosREFERENCIA1];
+end;
+
+function TFacturasProveedor_ContratosBusinessProcessorRules.GetREFERENCIA1IsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_ContratosREFERENCIA1]);
+end;
+
+function TFacturasProveedor_ContratosBusinessProcessorRules.GetOldREFERENCIA1Value: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedor_ContratosREFERENCIA1];
+end;
+
+function TFacturasProveedor_ContratosBusinessProcessorRules.GetOldREFERENCIA1IsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedor_ContratosREFERENCIA1]);
+end;
+
+procedure TFacturasProveedor_ContratosBusinessProcessorRules.SetREFERENCIA1Value(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_ContratosREFERENCIA1] := aValue;
+end;
+
+procedure TFacturasProveedor_ContratosBusinessProcessorRules.SetREFERENCIA1IsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_ContratosREFERENCIA1] := Null;
+end;
+
+function TFacturasProveedor_ContratosBusinessProcessorRules.GetNOMBRE1Value: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_ContratosNOMBRE1];
+end;
+
+function TFacturasProveedor_ContratosBusinessProcessorRules.GetNOMBRE1IsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_ContratosNOMBRE1]);
+end;
+
+function TFacturasProveedor_ContratosBusinessProcessorRules.GetOldNOMBRE1Value: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedor_ContratosNOMBRE1];
+end;
+
+function TFacturasProveedor_ContratosBusinessProcessorRules.GetOldNOMBRE1IsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedor_ContratosNOMBRE1]);
+end;
+
+procedure TFacturasProveedor_ContratosBusinessProcessorRules.SetNOMBRE1Value(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_ContratosNOMBRE1] := aValue;
+end;
+
+procedure TFacturasProveedor_ContratosBusinessProcessorRules.SetNOMBRE1IsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_ContratosNOMBRE1] := Null;
+end;
+
+function TFacturasProveedor_ContratosBusinessProcessorRules.GetBASE_IMPONIBLEValue: Currency;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_ContratosBASE_IMPONIBLE];
+end;
+
+function TFacturasProveedor_ContratosBusinessProcessorRules.GetBASE_IMPONIBLEIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_ContratosBASE_IMPONIBLE]);
+end;
+
+function TFacturasProveedor_ContratosBusinessProcessorRules.GetOldBASE_IMPONIBLEValue: Currency;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedor_ContratosBASE_IMPONIBLE];
+end;
+
+function TFacturasProveedor_ContratosBusinessProcessorRules.GetOldBASE_IMPONIBLEIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedor_ContratosBASE_IMPONIBLE]);
+end;
+
+procedure TFacturasProveedor_ContratosBusinessProcessorRules.SetBASE_IMPONIBLEValue(const aValue: Currency);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_ContratosBASE_IMPONIBLE] := aValue;
+end;
+
+procedure TFacturasProveedor_ContratosBusinessProcessorRules.SetBASE_IMPONIBLEIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_ContratosBASE_IMPONIBLE] := Null;
+end;
+
{ TFacturasProveedorBusinessProcessorRules }
constructor TFacturasProveedorBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
diff --git a/Source/Modulos/Facturas de proveedor/Plugin/uPluginFacturasProveedor.pas b/Source/Modulos/Facturas de proveedor/Plugin/uPluginFacturasProveedor.pas
index d7948777..0a4ebb40 100644
--- a/Source/Modulos/Facturas de proveedor/Plugin/uPluginFacturasProveedor.pas
+++ b/Source/Modulos/Facturas de proveedor/Plugin/uPluginFacturasProveedor.pas
@@ -4,13 +4,9 @@ interface
uses
uModuleController, uInterfaces, uHostManager, Menus, Classes, ActnList,
- ImgList, Controls, PngImageList;
+ ImgList, Controls, PngImageList, uPlugins_Intf;
type
- IMCFacturasProveedor = interface(IInterface)
- ['{271C68BC-F755-46B1-AEFF-769AC5172815}']
- end;
-
TPluginFacturasProveedor = class(TModuleController, IMCFacturasProveedor)
actFacturasProveedor: TAction;
ExtraImages: TPngImageList;
@@ -24,6 +20,7 @@ type
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
+ procedure VerFacturasContrato(Const ID_Contrato: Integer; Ref_Contrato: String = ''; NomCLi_Contrato: String = '');
end;
implementation
@@ -31,7 +28,7 @@ implementation
{$R *.dfm}
uses
- Forms, Dialogs, SysUtils,
+ Forms, Dialogs, SysUtils, cxControls,
uFacturasProveedorController, uBizFacturasProveedor, uFacturasProveedorViewRegister;
function GetModule : TModuleController;
@@ -56,6 +53,7 @@ end;
constructor TPluginFacturasProveedor.Create(AOwner: TComponent);
begin
inherited;
+ ModuleName := MODULENAME_FACTURAS_PROVEEDOR;
uFacturasProveedorViewRegister.RegisterViews;
end;
@@ -65,6 +63,29 @@ begin
inherited;
end;
+procedure TPluginFacturasProveedor.VerFacturasContrato(
+ const ID_Contrato: Integer; Ref_Contrato, NomCLi_Contrato: String);
+var
+ AFacturasProveedorController : IFacturasProveedorController;
+ AFacturas : IBizFacturaProveedor;
+ AText : String;
+begin
+ AText := Format('Lista de facturas a proveedor del contrato %s - %s', [Ref_Contrato, NomCLi_Contrato]);
+ AFacturasProveedorController := TFacturasProveedorController.Create;
+ try
+ ShowHourglassCursor;
+ try
+ AFacturas := AFacturasProveedorController.BuscarTodos; // BuscarDelContrato(ID_Contrato);
+ finally
+ HideHourglassCursor;
+ end;
+ AFacturasProveedorController.VerTodos(AFacturas); //, True, AText);
+ finally
+ AFacturas := NIL;
+ AFacturasProveedorController := NIL;
+ end;
+end;
+
initialization
RegisterModuleClass(TPluginFacturasProveedor);
diff --git a/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm b/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm
index bc885c21..ac03da90 100644
--- a/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm
+++ b/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm
@@ -52,10 +52,13 @@ object srvFacturasProveedor: TsrvFacturasProveedor
'SELECT '#10' FACTURAS_PROVEEDOR_CONTRATOS.ID, FACTURAS_PROVEEDOR_' +
'CONTRATOS.ID_FACTURA, FACTURAS_PROVEEDOR_CONTRATOS.ID_CONTRATO,'#10 +
' contratos_cliente.referencia, contratos_cliente.nombre, cont' +
- 'ratos_cliente.nif_cif,'#10' FACTURAS_PROVEEDOR_CONTRATOS.IMPORTE'#10 +
- ' FROM'#10' FACTURAS_PROVEEDOR_CONTRATOS'#10' left join contratos_cl' +
- 'iente on (contratos_cliente.id = FACTURAS_PROVEEDOR_CONTRATOS.id' +
- '_contrato)'#10' WHERE {Where}'#10
+ 'ratos_cliente.nif_cif,'#10' FACTURAS_PROVEEDOR_CONTRATOS.IMPORTE,' +
+ ' facturas_proveedor.REFERENCIA, facturas_proveedor.nombre, factu' +
+ 'ras_proveedor.base_imponible'#10' FROM'#10' FACTURAS_PROVEEDOR_CONTR' +
+ 'ATOS'#10' left join contratos_cliente on (contratos_cliente.id = FA' +
+ 'CTURAS_PROVEEDOR_CONTRATOS.id_contrato)'#10' left join facturas_pro' +
+ 'veedor on (facturas_proveedor.id = FACTURAS_PROVEEDOR_CONTRATOS.' +
+ 'id_factura)'#10' WHERE {Where}'#10
StatementType = stSQL
ColumnMappings = <
item
@@ -88,6 +91,21 @@ object srvFacturasProveedor: TsrvFacturasProveedor
DatasetField = 'REFERENCIA'
TableField = ''
SQLOrigin = 'REFERENCIA'
+ end
+ item
+ DatasetField = 'REFERENCIA1'
+ TableField = ''
+ SQLOrigin = 'REFERENCIA1'
+ end
+ item
+ DatasetField = 'NOMBRE1'
+ TableField = ''
+ SQLOrigin = 'NOMBRE1'
+ end
+ item
+ DatasetField = 'BASE_IMPONIBLE'
+ TableField = ''
+ SQLOrigin = 'BASE_IMPONIBLE'
end>
end>
Name = 'FacturasProveedor_Contratos'
@@ -131,6 +149,20 @@ object srvFacturasProveedor: TsrvFacturasProveedor
Name = 'IMPORTE'
DataType = datCurrency
DictionaryEntry = 'FacturasProveedor_Contratos_IMPORTE'
+ end
+ item
+ Name = 'REFERENCIA1'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'NOMBRE1'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'BASE_IMPONIBLE'
+ DataType = datCurrency
end>
end
item
diff --git a/Source/Modulos/Inventario/Data/uDataModuleInventario.dfm b/Source/Modulos/Inventario/Data/uDataModuleInventario.dfm
index cd399caf..834f2cdf 100644
--- a/Source/Modulos/Inventario/Data/uDataModuleInventario.dfm
+++ b/Source/Modulos/Inventario/Data/uDataModuleInventario.dfm
@@ -144,121 +144,121 @@ inherited DataModuleInventario: TDataModuleInventario
item
Name = 'ID_ALMACEN'
DataType = datInteger
- DictionaryEntry = 'INVENTARIO_ID_ALMACEN'
+ DictionaryEntry = 'Inventario_ID_ALMACEN'
end
item
Name = 'ID_ARTICULO'
DataType = datInteger
- DictionaryEntry = 'INVENTARIO_ID_ARTICULO'
+ DictionaryEntry = 'Inventario_ID_ARTICULO'
end
item
Name = 'ALMACEN'
DataType = datString
Size = 255
- DictionaryEntry = 'INVENTARIO_ALMACEN'
+ DictionaryEntry = 'Inventario_ALMACEN'
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
- DictionaryEntry = 'INVENTARIO_ID_EMPRESA'
+ DictionaryEntry = 'Inventario_ID_EMPRESA'
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
DisplayLabel = 'INVENTARIO_REFERENCIA'
- DictionaryEntry = 'INVENTARIO_REFERENCIA'
+ DictionaryEntry = 'Inventario_REFERENCIA'
end
item
Name = 'FAMILIA'
DataType = datString
Size = 255
- DictionaryEntry = 'INVENTARIO_FAMILIA'
+ DictionaryEntry = 'Inventario_FAMILIA'
end
item
Name = 'DESCRIPCION'
DataType = datString
Size = 255
- DictionaryEntry = 'INVENTARIO_DESCRIPCION'
+ DictionaryEntry = 'Inventario_DESCRIPCION'
end
item
Name = 'REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
- DictionaryEntry = 'INVENTARIO_REFERENCIA_PROVEEDOR'
+ DictionaryEntry = 'Inventario_REFERENCIA_PROVEEDOR'
end
item
Name = 'PRECIO_NETO'
DataType = datCurrency
DisplayLabel = 'Precio unidad'
Alignment = taRightJustify
- DictionaryEntry = 'INVENTARIO_PRECIO_NETO'
+ DictionaryEntry = 'Inventario_PRECIO_NETO'
end
item
Name = 'STOCK'
- DataType = datLargeInt
+ DataType = datFloat
DisplayLabel = 'Stock disponible'
- DictionaryEntry = 'INVENTARIO_STOCK'
+ DictionaryEntry = 'Inventario_STOCK'
end
item
Name = 'UNIDADES_ALMACEN'
- DataType = datLargeInt
- DisplayLabel = 'U. Almac'#195#169'n'
- DictionaryEntry = 'INVENTARIO_UNIDADES_ALMACEN'
+ DataType = datFloat
+ DisplayLabel = 'U. Almac'#233'n'
+ DictionaryEntry = 'Inventario_UNIDADES_ALMACEN'
end
item
Name = 'COSTE_UNIDADES'
DataType = datCurrency
DisplayLabel = 'Coste unidades'
Alignment = taRightJustify
- DictionaryEntry = 'INVENTARIO_COSTE_UNIDADES'
+ DictionaryEntry = 'Inventario_COSTE_UNIDADES'
end
item
Name = 'RESERVA'
- DataType = datLargeInt
+ DataType = datFloat
DisplayLabel = 'Reservado'
- DictionaryEntry = 'INVENTARIO_RESERVA'
+ DictionaryEntry = 'Inventario_RESERVA'
end
item
Name = 'PENDIENTE_RECEPCION'
- DataType = datLargeInt
+ DataType = datFloat
DisplayLabel = 'Pendiente de recibir'
- DictionaryEntry = 'INVENTARIO_PENDIENTE_RECEPCION'
+ DictionaryEntry = 'Inventario_PENDIENTE_RECEPCION'
end
item
Name = 'ID'
DataType = datInteger
LogChanges = False
DisplayLabel = 'INVENTARIO_ID'
- DictionaryEntry = 'INVENTARIO_ID'
+ DictionaryEntry = 'Inventario_ID'
InPrimaryKey = True
Calculated = True
end
item
Name = 'CANTIDAD'
- DataType = datInteger
+ DataType = datFloat
DisplayLabel = 'INVENTARIO_CANTIDAD'
- DictionaryEntry = 'INVENTARIO_CANTIDAD'
+ DictionaryEntry = 'Inventario_CANTIDAD'
end
item
Name = 'FECHA_MOVIMIENTO'
DataType = datDateTime
DisplayLabel = 'INVENTARIO_FECHA_MOVIMIENTO'
- DictionaryEntry = 'INVENTARIO_FECHA_MOVIMIENTO'
+ DictionaryEntry = 'Inventario_FECHA_MOVIMIENTO'
end
item
Name = 'CAUSA'
DataType = datString
- Size = 255
+ Size = 1
DisplayLabel = 'INVENTARIO_CAUSA'
- DictionaryEntry = 'INVENTARIO_CAUSA'
+ DictionaryEntry = 'Inventario_CAUSA'
end
item
Name = 'TIPO'
DataType = datString
Size = 1
DisplayLabel = 'INVENTARIO_TIPO'
- DictionaryEntry = 'INVENTARIO_TIPO'
+ DictionaryEntry = 'Inventario_TIPO'
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
diff --git a/Source/Modulos/Inventario/Views/uEditorInventario.dfm b/Source/Modulos/Inventario/Views/uEditorInventario.dfm
index 85d165e9..c6f364c2 100644
--- a/Source/Modulos/Inventario/Views/uEditorInventario.dfm
+++ b/Source/Modulos/Inventario/Views/uEditorInventario.dfm
@@ -170,15 +170,27 @@ inherited fEditorInventario: TfEditorInventario
Width = 669
ExplicitWidth = 669
inherited txtFiltroTodo: TcxTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 468
Width = 468
end
inherited edtFechaIniFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 246
Width = 246
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 412
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 412
ExplicitWidth = 205
Width = 205
@@ -252,6 +264,7 @@ inherited fEditorInventario: TfEditorInventario
object actRecibirPedido: TAction
Category = 'Logistica'
Caption = 'Recibir pedido'
+ Enabled = False
ImageIndex = 24
OnExecute = actRecibirPedidoExecute
end
@@ -292,6 +305,7 @@ inherited fEditorInventario: TfEditorInventario
end
object actReservados: TAction
Caption = 'Ver reservados'
+ Enabled = False
ImageIndex = 25
OnExecute = actReservadosExecute
OnUpdate = actReservadosUpdate
diff --git a/Source/Modulos/Inventario/Views/uEditorInventario.pas b/Source/Modulos/Inventario/Views/uEditorInventario.pas
index 7391844b..144b7b4a 100644
--- a/Source/Modulos/Inventario/Views/uEditorInventario.pas
+++ b/Source/Modulos/Inventario/Views/uEditorInventario.pas
@@ -17,7 +17,7 @@ uses
type
TfEditorInventario = class(TfEditorGridBase, IEditorInventario)
- actRecibirPedido: TAction;
+ actRecibirPedido: TAction;
actTrasladar: TAction;
actReservar: TAction;
actLiberar: TAction;
diff --git a/Source/Modulos/Inventario/Views/uViewDetalleReservas.dfm b/Source/Modulos/Inventario/Views/uViewDetalleReservas.dfm
index 7c23c859..8c6affce 100644
--- a/Source/Modulos/Inventario/Views/uViewDetalleReservas.dfm
+++ b/Source/Modulos/Inventario/Views/uViewDetalleReservas.dfm
@@ -46,7 +46,6 @@ inherited frViewDetalleReservas: TfrViewDetalleReservas
end>
OptionsCustomize.ColumnHidingOnGrouping = False
OptionsCustomize.GroupBySorting = True
- OptionsView.GroupRowStyle = grsOffice11
object cxGridViewRecID: TcxGridDBColumn
DataBinding.FieldName = 'RecID'
Visible = False
@@ -105,14 +104,26 @@ inherited frViewDetalleReservas: TfrViewDetalleReservas
inherited TBXDockablePanel1: TTBXDockablePanel
inherited dxLayoutControl1: TdxLayoutControl
inherited txtFiltroTodo: TcxTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 121
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 121
Width = 121
end
@@ -125,13 +136,12 @@ inherited frViewDetalleReservas: TfrViewDetalleReservas
BuiltInReportLink = True
end
end
- inherited cxStyleRepository1: TcxStyleRepository
- inherited cxStyleEven: TcxStyle
- AssignedValues = [svFont]
- end
- inherited cxStyleOdd: TcxStyle
+ inherited cxStyleRepositoryInforme: TcxStyleRepository
+ inherited cxStyleContentInforme: TcxStyle
AssignedValues = [svColor, svFont]
end
+ end
+ inherited cxStyleRepository1: TcxStyleRepository
inherited cxStyleSelection: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
end
diff --git a/Source/Modulos/Inventario/Views/uViewDetalleReservas.pas b/Source/Modulos/Inventario/Views/uViewDetalleReservas.pas
index 51b6d4f7..e463dd69 100644
Binary files a/Source/Modulos/Inventario/Views/uViewDetalleReservas.pas and b/Source/Modulos/Inventario/Views/uViewDetalleReservas.pas differ
diff --git a/Source/Modulos/Inventario/Views/uViewElegirArticulosCatalogo.dfm b/Source/Modulos/Inventario/Views/uViewElegirArticulosCatalogo.dfm
index e3c83940..57e5f252 100644
--- a/Source/Modulos/Inventario/Views/uViewElegirArticulosCatalogo.dfm
+++ b/Source/Modulos/Inventario/Views/uViewElegirArticulosCatalogo.dfm
@@ -4,29 +4,32 @@ inherited frViewElegirArticulosCatalogo: TfrViewElegirArticulosCatalogo
inherited cxGridViewPRECIO_COSTE: TcxGridDBColumn
Visible = False
end
- inherited cxGridViewDESCUENTO: TcxGridDBColumn
- Visible = False
- end
- inherited cxGridViewPRECIO_NETO: TcxGridDBColumn
- Visible = False
- end
- inherited cxGridViewPRECIO_PORTE: TcxGridDBColumn
- Visible = False
- end
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
inherited TBXDockablePanel1: TTBXDockablePanel
inherited dxLayoutControl1: TdxLayoutControl
inherited txtFiltroTodo: TcxTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 121
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 121
Width = 121
end
diff --git a/Source/Modulos/Inventario/Views/uViewElegirArticulosCatalogo.pas b/Source/Modulos/Inventario/Views/uViewElegirArticulosCatalogo.pas
index a0eb410a..232173b0 100644
Binary files a/Source/Modulos/Inventario/Views/uViewElegirArticulosCatalogo.pas and b/Source/Modulos/Inventario/Views/uViewElegirArticulosCatalogo.pas differ
diff --git a/Source/Modulos/Inventario/Views/uViewInventario.dfm b/Source/Modulos/Inventario/Views/uViewInventario.dfm
index 3ebd9f5e..d73c6002 100644
--- a/Source/Modulos/Inventario/Views/uViewInventario.dfm
+++ b/Source/Modulos/Inventario/Views/uViewInventario.dfm
@@ -9,7 +9,7 @@ inherited frViewInventario: TfrViewInventario
Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Position = spFooter
- Column = cxGridViewCOSTE_UNIDADES
+ Column = cxGridViewCOSTE_UNIDADES
end>
DataController.Summary.FooterSummaryItems = <
item
@@ -48,7 +48,6 @@ inherited frViewInventario: TfrViewInventario
end>
OptionsCustomize.ColumnHidingOnGrouping = False
OptionsCustomize.GroupBySorting = True
- OptionsView.GroupRowStyle = grsOffice11
object cxGridViewID_ALMACEN: TcxGridDBColumn
DataBinding.FieldName = 'ID_ALMACEN'
Visible = False
@@ -147,14 +146,26 @@ inherited frViewInventario: TfrViewInventario
inherited TBXDockablePanel1: TTBXDockablePanel
inherited dxLayoutControl1: TdxLayoutControl
inherited txtFiltroTodo: TcxTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 121
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 121
Width = 121
end
@@ -168,12 +179,6 @@ inherited frViewInventario: TfrViewInventario
end
end
inherited cxStyleRepository1: TcxStyleRepository
- inherited cxStyleEven: TcxStyle
- AssignedValues = [svFont]
- end
- inherited cxStyleOdd: TcxStyle
- AssignedValues = [svColor, svFont]
- end
inherited cxStyleSelection: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
end
diff --git a/Source/Modulos/Inventario/Views/uViewInventario.pas b/Source/Modulos/Inventario/Views/uViewInventario.pas
index 5b556253..3a955a3d 100644
Binary files a/Source/Modulos/Inventario/Views/uViewInventario.pas and b/Source/Modulos/Inventario/Views/uViewInventario.pas differ
diff --git a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas
index 9e5a4288..d1793e5e 100644
--- a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas
+++ b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas
@@ -276,7 +276,8 @@ begin
APedido.FECHA_ENTREGA := AFechaRecepcion;
APedido.Post;
if DoPost then
- Guardar(APedido);
+ APedido.DataTable.ApplyUpdates;
+// Guardar(APedido); Hace que cambie el proveedor asignado al pedido en la validación ya que se reasigna el id del proveedor al validar el pedido
Result := True;
finally
APedido.DataTable.EnableControls;
@@ -805,7 +806,7 @@ begin
try
APedido.DataTable.ApplyUpdates;
-
+
Result := True;
finally
HideHourglassCursor;
diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr
index 1d36f360..45c966c1 100644
--- a/Source/Servidor/FactuGES_Server.dpr
+++ b/Source/Servidor/FactuGES_Server.dpr
@@ -111,14 +111,10 @@ uses
schAlbaranesProveedorServer_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorServer_Intf.pas',
schInventarioClient_Intf in '..\Modulos\Inventario\Model\schInventarioClient_Intf.pas',
schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas',
- schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas',
- schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas',
schFamiliasClient_Intf in '..\Modulos\Familias\Model\schFamiliasClient_Intf.pas',
schFamiliasServer_Intf in '..\Modulos\Familias\Model\schFamiliasServer_Intf.pas',
schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas',
schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas',
- schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
- schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas',
schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas',
schContratosClienteClient_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteClient_Intf.pas',
@@ -138,7 +134,11 @@ uses
schRecibosProveedorClient_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorClient_Intf.pas',
schRecibosProveedorServer_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorServer_Intf.pas',
schFormasPagoClient_Intf in '..\Modulos\Formas de pago\Model\schFormasPagoClient_Intf.pas',
- schFormasPagoServer_Intf in '..\Modulos\Formas de pago\Model\schFormasPagoServer_Intf.pas';
+ schFormasPagoServer_Intf in '..\Modulos\Formas de pago\Model\schFormasPagoServer_Intf.pas',
+ schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas',
+ schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_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}
diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc
index 04303a86..0f92c084 100644
--- a/Source/Servidor/FactuGES_Server.rc
+++ b/Source/Servidor/FactuGES_Server.rc
@@ -16,7 +16,7 @@ BEGIN
VALUE "FileVersion", "2.8.8.0\0"
VALUE "ProductName", "FactuGES (Servidor)\0"
VALUE "ProductVersion", "2.8.8.0\0"
- VALUE "CompileDate", "miércoles, 10 de octubre de 2018 16:29\0"
+ VALUE "CompileDate", "martes, 19 de marzo de 2019 17:24\0"
END
END
BLOCK "VarFileInfo"
diff --git a/Source/Servidor/FactuGES_Server.res b/Source/Servidor/FactuGES_Server.res
index b5598183..ba4918b6 100644
Binary files a/Source/Servidor/FactuGES_Server.res and b/Source/Servidor/FactuGES_Server.res differ