diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql
index c6f5c598..226c77f4 100644
--- a/Database/scripts/factuges.sql
+++ b/Database/scripts/factuges.sql
@@ -2542,7 +2542,7 @@ SELECT PEDIDOS_PROVEEDOR_DETALLES.ID_PEDIDO,
SUM(COALESCE(PEDIDOS_PROVEEDOR_DETALLES.CANTIDAD, 0))
FROM PEDIDOS_PROVEEDOR_DETALLES
-LEFT JOIN PEDIDOS_PROVEEDOR
+INNER JOIN PEDIDOS_PROVEEDOR
ON (PEDIDOS_PROVEEDOR_DETALLES.ID_PEDIDO = PEDIDOS_PROVEEDOR.ID)
/*Mantenemos los articulos inventariables y aquellos que no existan en nuestro catálogo con el fin de no falsear la situación de los pedidos
@@ -2955,7 +2955,30 @@ FROM V_PED_PROV_ARTICULOS
GROUP BY V_PED_PROV_ARTICULOS.ID_PEDIDO
;
+CREATE VIEW V_PEDIDOS_PROV_NUM_FAC(
+ ID_PEDIDO,
+ NUM_FACTURAS)
+AS
+select id,
+case
+when sum(num)=0 then null
+else sum(num) || ' factura/s'
+end
+from
+(
+select id as id, 0 as num
+from pedidos_proveedor
+
+union
+
+select ID_PEDIDO as id, count(ID) as num
+from facturas_proveedor
+where ID_PEDIDO is not null
+group by 1
+)
+group by 1
+;
/* View: V_PEDIDOS_PROVEEDOR */
CREATE VIEW V_PEDIDOS_PROVEEDOR(
@@ -2998,7 +3021,8 @@ CREATE VIEW V_PEDIDOS_PROVEEDOR(
BASE_IMPONIBLE,
IVA,
IMPORTE_IVA,
- ID_FORMA_PAGO)
+ ID_FORMA_PAGO,
+ NUM_FACTURAS)
AS
SELECT
PEDIDOS_PROVEEDOR.ID,
@@ -3040,7 +3064,8 @@ SELECT
PEDIDOS_PROVEEDOR.BASE_IMPONIBLE,
PEDIDOS_PROVEEDOR.IVA,
PEDIDOS_PROVEEDOR.IMPORTE_IVA,
- PEDIDOS_PROVEEDOR.ID_FORMA_PAGO
+ PEDIDOS_PROVEEDOR.ID_FORMA_PAGO,
+ V_PEDIDOS_PROV_NUM_FAC.NUM_FACTURAS
FROM
PEDIDOS_PROVEEDOR
@@ -3049,10 +3074,36 @@ FROM
LEFT OUTER JOIN ALMACENES ON (ALMACENES.ID = PEDIDOS_PROVEEDOR.ID_ALMACEN)
LEFT OUTER JOIN ALMACENES OBRAS ON (OBRAS.ID = PEDIDOS_PROVEEDOR.ID_OBRA)
LEFT OUTER JOIN PEDIDOS_CLIENTE ON (PEDIDOS_CLIENTE.ID = PEDIDOS_PROVEEDOR.ID_PEDIDO_CLIENTE)
+ left OUTER join V_PEDIDOS_PROV_NUM_FAC ON (V_PEDIDOS_PROV_NUM_FAC.ID_PEDIDO = PEDIDOS_PROVEEDOR.ID)
;
+CREATE VIEW V_PRESUPUESTOS_NUM_FAC(
+ ID_PRESUPUESTO,
+ NUM_FACTURAS)
+AS
+select id,
+case
+when sum(num)=0 then null
+else sum(num) || ' factura/s'
+end
+
+from
+(
+select id as id, 0 as num
+from presupuestos_cliente
+
+union
+
+select ID_PRESUPUESTO as id, count(ID) as num
+from facturas_cliente
+where ID_PRESUPUESTO is not null
+group by 1
+)
+group by 1
+;
+
/* View: V_PRESUPUESTOS_CLIENTE */
CREATE VIEW V_PRESUPUESTOS_CLIENTE(
ID,
@@ -3088,7 +3139,8 @@ CREATE VIEW V_PRESUPUESTOS_CLIENTE(
PERSONA_CONTACTO,
DESCRIPCION_BONIFICACION,
IMPORTE_BONIFICACION,
- CERTIFICADO_ISO)
+ CERTIFICADO_ISO,
+ NUM_FACTURA)
AS
SELECT
PRESUPUESTOS_CLIENTE.ID,
@@ -3124,10 +3176,12 @@ SELECT
PRESUPUESTOS_CLIENTE.PERSONA_CONTACTO,
PRESUPUESTOS_CLIENTE.DESCRIPCION_BONIFICACION,
PRESUPUESTOS_CLIENTE.IMPORTE_BONIFICACION,
- PRESUPUESTOS_CLIENTE.CERTIFICADO_ISO
+ PRESUPUESTOS_CLIENTE.CERTIFICADO_ISO,
+ V_PRESUPUESTOS_NUM_FAC.NUM_FACTURAS
FROM
PRESUPUESTOS_CLIENTE
- INNER JOIN CONTACTOS ON (CONTACTOS.ID = PRESUPUESTOS_CLIENTE.ID_CLIENTE)
+ inner JOIN CONTACTOS ON (CONTACTOS.ID = PRESUPUESTOS_CLIENTE.ID_CLIENTE)
+ inner join V_PRESUPUESTOS_NUM_FAC ON (V_PRESUPUESTOS_NUM_FAC.ID_PRESUPUESTO = PRESUPUESTOS_CLIENTE.ID)
;
@@ -3794,6 +3848,7 @@ CREATE INDEX IDX_FACTURAS_PROVEEDOR1 ON FACTURAS_PROVEEDOR (ID_FORMA_PAGO);
CREATE INDEX IDX_FACTURAS_PROVEEDOR2 ON FACTURAS_PROVEEDOR (ID_TIPO_IVA);
CREATE INDEX FACTURAS_PROVEEDOR_IDX1 ON FACTURAS_PROVEEDOR (FECHA_FACTURA);
CREATE INDEX FACTURAS_PROVEEDOR_IDX2 ON FACTURAS_PROVEEDOR (FECHA_VENCIMIENTO);
+CREATE INDEX FACTURAS_PROVEEDOR_IDX3 ON FACTURAS_PROVEEDOR (ID_PEDIDO)
CREATE INDEX IDX_FACTURAS_PROVEEDOR_DETALLES ON FACTURAS_PROVEEDOR_DETALLES (ID_ARTICULO);
CREATE INDEX FACTURAS_PROVEEDOR_DETALLE_IDX1 ON FACTURAS_PROVEEDOR_DETALLES (ID_FACTURA);
CREATE INDEX IDX_FACTURAS_PROVEEDOR_PEDIDOS ON FACTURAS_PROVEEDOR_PEDIDOS (ID_PEDIDO);
diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj
index 2aec1ecd..f7fab7e2 100644
--- a/Source/Base/Base.dproj
+++ b/Source/Base/Base.dproj
@@ -54,58 +54,58 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
TForm
diff --git a/Source/Modulos/Pedidos a proveedor/Data/PedidosProveedor_data.dproj b/Source/Modulos/Pedidos a proveedor/Data/PedidosProveedor_data.dproj
index fe9f654b..433e81d8 100644
--- a/Source/Modulos/Pedidos a proveedor/Data/PedidosProveedor_data.dproj
+++ b/Source/Modulos/Pedidos a proveedor/Data/PedidosProveedor_data.dproj
@@ -49,8 +49,8 @@
MainSource
-
-
+
+
diff --git a/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.dfm
index 669d053d..3a110097 100644
--- a/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.dfm
@@ -289,6 +289,11 @@ inherited DataModulePedidosProveedor: TDataModulePedidosProveedor
Name = 'ID_FORMA_PAGO'
DataType = datInteger
DictionaryEntry = 'PedidosProveedor_ID_FORMA_PAGO'
+ end
+ item
+ Name = 'NUM_FACTURAS'
+ DataType = datString
+ Size = 31
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
diff --git a/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorClient_Intf.pas b/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorClient_Intf.pas
index c0d1eb74..359271e3 100644
--- a/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorClient_Intf.pas
+++ b/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorClient_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_ListaAnosPedidos = '{0BE63A2E-B331-4A57-A663-4E77D6E4A12A}';
- RID_PedidosProveedor = '{CD6B65EC-536D-4CF6-A278-D5B2E929094D}';
- RID_PedidosProveedor_Detalles = '{5C269D11-EC6B-4D1E-B1F9-48A80A4F22DC}';
- RID_PedidosProveedor_Articulos_Pendientes = '{3E1EB0DC-A289-4452-B9D4-B57A29E5D8DA}';
+ RID_ListaAnosPedidos = '{7B5AB739-5669-4C14-B0F6-0ACC1BB0DFA0}';
+ RID_PedidosProveedor = '{EC621BE1-911E-4BE4-A060-3DF85084D597}';
+ RID_PedidosProveedor_Detalles = '{B5BC7867-64E7-47CE-A624-6BB07BCEAE4C}';
+ RID_PedidosProveedor_Articulos_Pendientes = '{D3246EE5-5CFD-484B-93CA-98F0A7E02478}';
{ Data table names }
nme_ListaAnosPedidos = 'ListaAnosPedidos';
@@ -67,6 +67,7 @@ const
fld_PedidosProveedorIVA = 'IVA';
fld_PedidosProveedorIMPORTE_IVA = 'IMPORTE_IVA';
fld_PedidosProveedorID_FORMA_PAGO = 'ID_FORMA_PAGO';
+ fld_PedidosProveedorNUM_FACTURAS = 'NUM_FACTURAS';
{ PedidosProveedor field indexes }
idx_PedidosProveedorID = 0;
@@ -109,6 +110,7 @@ const
idx_PedidosProveedorIVA = 37;
idx_PedidosProveedorIMPORTE_IVA = 38;
idx_PedidosProveedorID_FORMA_PAGO = 39;
+ idx_PedidosProveedorNUM_FACTURAS = 40;
{ PedidosProveedor_Detalles fields }
fld_PedidosProveedor_DetallesID = 'ID';
@@ -165,7 +167,7 @@ const
type
{ IListaAnosPedidos }
IListaAnosPedidos = interface(IDAStronglyTypedDataTable)
- ['{444C24ED-7A28-4E70-A26D-6D68F92B116D}']
+ ['{95BAFBE5-EF3F-493E-B32B-B14E17AC88C3}']
{ Property getters and setters }
function GetANOValue: String;
procedure SetANOValue(const aValue: String);
@@ -200,7 +202,7 @@ type
{ IPedidosProveedor }
IPedidosProveedor = interface(IDAStronglyTypedDataTable)
- ['{8227DEFE-3F3E-4F9B-8BD0-0063F47CF363}']
+ ['{0CE0A5A6-6640-4B20-B066-21DB629D9EA3}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -360,6 +362,10 @@ type
procedure SetID_FORMA_PAGOValue(const aValue: Integer);
function GetID_FORMA_PAGOIsNull: Boolean;
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean);
+ function GetNUM_FACTURASValue: String;
+ procedure SetNUM_FACTURASValue(const aValue: String);
+ function GetNUM_FACTURASIsNull: Boolean;
+ procedure SetNUM_FACTURASIsNull(const aValue: Boolean);
{ Properties }
@@ -443,6 +449,8 @@ type
property IMPORTE_IVAIsNull: Boolean read GetIMPORTE_IVAIsNull write SetIMPORTE_IVAIsNull;
property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property ID_FORMA_PAGOIsNull: Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
+ property NUM_FACTURAS: String read GetNUM_FACTURASValue write SetNUM_FACTURASValue;
+ property NUM_FACTURASIsNull: Boolean read GetNUM_FACTURASIsNull write SetNUM_FACTURASIsNull;
end;
{ TPedidosProveedorDataTableRules }
@@ -612,6 +620,10 @@ type
procedure SetID_FORMA_PAGOValue(const aValue: Integer); virtual;
function GetID_FORMA_PAGOIsNull: Boolean; virtual;
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean); virtual;
+ function GetNUM_FACTURASValue: String; virtual;
+ procedure SetNUM_FACTURASValue(const aValue: String); virtual;
+ function GetNUM_FACTURASIsNull: Boolean; virtual;
+ procedure SetNUM_FACTURASIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@@ -694,6 +706,8 @@ type
property IMPORTE_IVAIsNull: Boolean read GetIMPORTE_IVAIsNull write SetIMPORTE_IVAIsNull;
property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property ID_FORMA_PAGOIsNull: Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
+ property NUM_FACTURAS: String read GetNUM_FACTURASValue write SetNUM_FACTURASValue;
+ property NUM_FACTURASIsNull: Boolean read GetNUM_FACTURASIsNull write SetNUM_FACTURASIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@@ -703,7 +717,7 @@ type
{ IPedidosProveedor_Detalles }
IPedidosProveedor_Detalles = interface(IDAStronglyTypedDataTable)
- ['{86705E35-B1C5-4E3D-997C-F320EEA14017}']
+ ['{F87546FE-0DD5-4BFC-A897-D1F3042879C6}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -918,7 +932,7 @@ type
{ IPedidosProveedor_Articulos_Pendientes }
IPedidosProveedor_Articulos_Pendientes = interface(IDAStronglyTypedDataTable)
- ['{46FBB380-02E3-4155-A485-1B6D4122047A}']
+ ['{25860E5A-6817-453D-854D-1D19FF5E9B19}']
{ Property getters and setters }
function GetID_PEDIDOValue: Integer;
procedure SetID_PEDIDOValue(const aValue: Integer);
@@ -1911,6 +1925,27 @@ begin
DataTable.Fields[idx_PedidosProveedorID_FORMA_PAGO].AsVariant := Null;
end;
+function TPedidosProveedorDataTableRules.GetNUM_FACTURASValue: String;
+begin
+ result := DataTable.Fields[idx_PedidosProveedorNUM_FACTURAS].AsString;
+end;
+
+procedure TPedidosProveedorDataTableRules.SetNUM_FACTURASValue(const aValue: String);
+begin
+ DataTable.Fields[idx_PedidosProveedorNUM_FACTURAS].AsString := aValue;
+end;
+
+function TPedidosProveedorDataTableRules.GetNUM_FACTURASIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PedidosProveedorNUM_FACTURAS].IsNull;
+end;
+
+procedure TPedidosProveedorDataTableRules.SetNUM_FACTURASIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PedidosProveedorNUM_FACTURAS].AsVariant := Null;
+end;
+
{ TPedidosProveedor_DetallesDataTableRules }
constructor TPedidosProveedor_DetallesDataTableRules.Create(aDataTable: TDADataTable);
diff --git a/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorServer_Intf.pas b/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorServer_Intf.pas
index ea865eb3..03db245d 100644
--- a/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorServer_Intf.pas
+++ b/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorServer_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_ListaAnosPedidosDelta = '{2CD89CFA-6628-4D1B-AAFD-2143F6E16C6F}';
- RID_PedidosProveedorDelta = '{6510A108-8EDD-4CAF-AA7B-C010D901B2B0}';
- RID_PedidosProveedor_DetallesDelta = '{92F733E7-B35E-4B57-B2F8-CD648B380B90}';
- RID_PedidosProveedor_Articulos_PendientesDelta = '{99E04FCB-79B4-4C08-B667-38699CAD1FE4}';
+ RID_ListaAnosPedidosDelta = '{FAA7A8A0-DB4E-4366-BFCD-067E225BF72F}';
+ RID_PedidosProveedorDelta = '{C5E85239-1B36-4D0D-A58D-C1966AAB1211}';
+ RID_PedidosProveedor_DetallesDelta = '{0D7DD5EF-63B4-4A25-9995-9376405DB7A3}';
+ RID_PedidosProveedor_Articulos_PendientesDelta = '{A159ECAD-282A-46C1-9D12-5B967B93B3ED}';
type
{ IListaAnosPedidosDelta }
IListaAnosPedidosDelta = interface(IListaAnosPedidos)
- ['{2CD89CFA-6628-4D1B-AAFD-2143F6E16C6F}']
+ ['{FAA7A8A0-DB4E-4366-BFCD-067E225BF72F}']
{ Property getters and setters }
function GetOldANOValue : String;
@@ -51,7 +51,7 @@ type
{ IPedidosProveedorDelta }
IPedidosProveedorDelta = interface(IPedidosProveedor)
- ['{6510A108-8EDD-4CAF-AA7B-C010D901B2B0}']
+ ['{C5E85239-1B36-4D0D-A58D-C1966AAB1211}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -93,6 +93,7 @@ type
function GetOldIVAValue : Float;
function GetOldIMPORTE_IVAValue : Currency;
function GetOldID_FORMA_PAGOValue : Integer;
+ function GetOldNUM_FACTURASValue : String;
{ Properties }
property OldID : Integer read GetOldIDValue;
@@ -135,6 +136,7 @@ type
property OldIVA : Float read GetOldIVAValue;
property OldIMPORTE_IVA : Currency read GetOldIMPORTE_IVAValue;
property OldID_FORMA_PAGO : Integer read GetOldID_FORMA_PAGOValue;
+ property OldNUM_FACTURAS : String read GetOldNUM_FACTURASValue;
end;
{ TPedidosProveedorBusinessProcessorRules }
@@ -384,6 +386,12 @@ type
function GetOldID_FORMA_PAGOIsNull: Boolean; virtual;
procedure SetID_FORMA_PAGOValue(const aValue: Integer); virtual;
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean); virtual;
+ function GetNUM_FACTURASValue: String; virtual;
+ function GetNUM_FACTURASIsNull: Boolean; virtual;
+ function GetOldNUM_FACTURASValue: String; virtual;
+ function GetOldNUM_FACTURASIsNull: Boolean; virtual;
+ procedure SetNUM_FACTURASValue(const aValue: String); virtual;
+ procedure SetNUM_FACTURASIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@@ -546,6 +554,10 @@ type
property ID_FORMA_PAGOIsNull : Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
property OldID_FORMA_PAGO : Integer read GetOldID_FORMA_PAGOValue;
property OldID_FORMA_PAGOIsNull : Boolean read GetOldID_FORMA_PAGOIsNull;
+ property NUM_FACTURAS : String read GetNUM_FACTURASValue write SetNUM_FACTURASValue;
+ property NUM_FACTURASIsNull : Boolean read GetNUM_FACTURASIsNull write SetNUM_FACTURASIsNull;
+ property OldNUM_FACTURAS : String read GetOldNUM_FACTURASValue;
+ property OldNUM_FACTURASIsNull : Boolean read GetOldNUM_FACTURASIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@@ -555,7 +567,7 @@ type
{ IPedidosProveedor_DetallesDelta }
IPedidosProveedor_DetallesDelta = interface(IPedidosProveedor_Detalles)
- ['{92F733E7-B35E-4B57-B2F8-CD648B380B90}']
+ ['{0D7DD5EF-63B4-4A25-9995-9376405DB7A3}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_PEDIDOValue : Integer;
@@ -769,7 +781,7 @@ type
{ IPedidosProveedor_Articulos_PendientesDelta }
IPedidosProveedor_Articulos_PendientesDelta = interface(IPedidosProveedor_Articulos_Pendientes)
- ['{99E04FCB-79B4-4C08-B667-38699CAD1FE4}']
+ ['{A159ECAD-282A-46C1-9D12-5B967B93B3ED}']
{ Property getters and setters }
function GetOldID_PEDIDOValue : Integer;
function GetOldREFERENCIAValue : String;
@@ -2174,6 +2186,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorID_FORMA_PAGO] := Null;
end;
+function TPedidosProveedorBusinessProcessorRules.GetNUM_FACTURASValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorNUM_FACTURAS];
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetNUM_FACTURASIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorNUM_FACTURAS]);
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetOldNUM_FACTURASValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedorNUM_FACTURAS];
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetOldNUM_FACTURASIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedorNUM_FACTURAS]);
+end;
+
+procedure TPedidosProveedorBusinessProcessorRules.SetNUM_FACTURASValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorNUM_FACTURAS] := aValue;
+end;
+
+procedure TPedidosProveedorBusinessProcessorRules.SetNUM_FACTURASIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorNUM_FACTURAS] := Null;
+end;
+
{ TPedidosProveedor_DetallesBusinessProcessorRules }
constructor TPedidosProveedor_DetallesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
diff --git a/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.dfm b/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.dfm
index 48a83e61..2ebe8168 100644
--- a/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.dfm
@@ -206,6 +206,10 @@ object srvPedidosProveedor: TsrvPedidosProveedor
item
DatasetField = 'PERSONA_CONTACTO_PROV'
TableField = 'PERSONA_CONTACTO_PROV'
+ end
+ item
+ DatasetField = 'NUM_FACTURAS'
+ TableField = 'NUM_FACTURAS'
end>
end>
Name = 'PedidosProveedor'
@@ -433,6 +437,11 @@ object srvPedidosProveedor: TsrvPedidosProveedor
Name = 'ID_FORMA_PAGO'
DataType = datInteger
DictionaryEntry = 'PedidosProveedor_ID_FORMA_PAGO'
+ end
+ item
+ Name = 'NUM_FACTURAS'
+ DataType = datString
+ Size = 31
end>
end
item
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.dfm
index 7fe251ab..efa65d3d 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.dfm
@@ -147,9 +147,9 @@ inherited frViewPedidosProveedor: TfrViewPedidosProveedor
Visible = False
VisibleForCustomization = False
end
- object cxGridViewREF_FACTURA_PROV: TcxGridDBColumn
- Caption = 'Ref. factura'
- DataBinding.FieldName = 'REF_FACTURA_PROV'
+ object cxGridViewNUM_FACTURAS: TcxGridDBColumn
+ Caption = 'N'#186' facturas'
+ DataBinding.FieldName = 'NUM_FACTURAS'
Width = 95
end
end
@@ -197,22 +197,34 @@ inherited frViewPedidosProveedor: TfrViewPedidosProveedor
Width = 243
end
inherited edtFechaFinFiltro: TcxDateEdit
- Left = 271
+ Left = 224
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 271
+ ExplicitLeft = 224
ExplicitWidth = 482
Width = 482
end
inherited eLista: TcxComboBox
- Left = 673
+ Left = 553
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 673
+ ExplicitLeft = 553
+ ExplicitWidth = 215
+ Width = 215
+ end
+ inherited eLista2: TcxComboBox
+ Left = 716
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ ExplicitLeft = 716
+ ExplicitWidth = 207
+ Width = 207
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
@@ -261,8 +273,8 @@ inherited frViewPedidosProveedor: TfrViewPedidosProveedor
Top = 184
end
inherited cxStyleRepository1: TcxStyleRepository
- Left = 248
- Top = 184
+ Left = 256
+ Top = 168
object cxStylePendientes: TcxStyle
AssignedValues = [svTextColor]
TextColor = clGreen
@@ -273,6 +285,10 @@ inherited frViewPedidosProveedor: TfrViewPedidosProveedor
end
object cxStyleRecibidos: TcxStyle
end
+ object cxStyleConFacturas: TcxStyle
+ AssignedValues = [svTextColor]
+ TextColor = 23737
+ end
end
inherited ActionList1: TActionList
Left = 392
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.pas b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.pas
index 6ba73109..b3410d47 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.pas
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.pas
@@ -54,8 +54,9 @@ type
TBXItem3: TTBXItem;
TBXSeparatorItem2: TTBXSeparatorItem;
cxGridViewINCIDENCIAS: TcxGridDBColumn;
- cxGridViewREF_FACTURA_PROV: TcxGridDBColumn;
+ cxGridViewNUM_FACTURAS: TcxGridDBColumn;
cxGridViewNOMBRE_OBRA: TcxGridDBColumn;
+ cxStyleConFacturas: TcxStyle;
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel:
TcxGridLevel);
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
@@ -91,7 +92,7 @@ type
implementation
uses
- SysUtils, Variants, Windows,
+ SysUtils, Variants, Windows, uStringsUtils,
uDataModulePedidosProveedor, schPedidosProveedorClient_Intf,
uReferenciasUtils, cxVariants;
@@ -224,6 +225,7 @@ procedure TfrViewPedidosProveedor.cxGridViewStylesGetContentStyle(Sender:
var
IndiceCol: Integer;
ASituacion: string;
+ AFacturas: string;
begin
inherited;
if Assigned(ARecord) then
@@ -236,7 +238,14 @@ begin
else if (ASituacion = SITUACION_PEDIDO_PARCIAL) then
AStyle.TextColor := cxStyleParciales.TextColor
else if (ASituacion = SITUACION_PEDIDO_RECIBIDO) then
+ begin
AStyle.TextColor := cxStyleRecibidos.TextColor;
+ //Recibidos y que no tengan factura que resalten en naranja
+ IndiceCol := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_PedidosProveedorNUM_FACTURAS).Index;
+ AFacturas := VarToStr(ARecord.DisplayTexts[IndiceCol]);
+ if EsCadenaVacia(AFacturas) then
+ AStyle.TextColor := cxStyleConFacturas.TextColor;
+ end;
end;
end;
diff --git a/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm
index 84b35de0..f545ed75 100644
--- a/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm
@@ -237,6 +237,11 @@ inherited DataModulePresupuestosCliente: TDataModulePresupuestosCliente
item
Name = 'CERTIFICADO_ISO'
DataType = datSmallInt
+ end
+ item
+ Name = 'NUM_FACTURA'
+ DataType = datString
+ Size = 31
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
diff --git a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas
index db7d30a5..e0467b13 100644
--- a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas
+++ b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_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_ListaAnosPresupuestos = '{1156DC6C-FB6C-42AC-9552-371D052F073D}';
- RID_PresupuestosCliente = '{7776B49F-7541-4ADC-8D5B-01D8C5813FE2}';
- RID_PresupuestosCliente_Detalles = '{69E339B8-A74D-47A0-BC7D-58F9F74B2E27}';
+ RID_ListaAnosPresupuestos = '{FB0C7CCA-A5AD-4DC9-92A7-B1F988BC66F6}';
+ RID_PresupuestosCliente = '{13B7954C-1238-405E-9808-FAFEE50453B2}';
+ RID_PresupuestosCliente_Detalles = '{F440F004-9D8C-4318-A703-B778699FEF40}';
{ Data table names }
nme_ListaAnosPresupuestos = 'ListaAnosPresupuestos';
@@ -59,6 +59,7 @@ const
fld_PresupuestosClienteDESCRIPCION_BONIFICACION = 'DESCRIPCION_BONIFICACION';
fld_PresupuestosClienteIMPORTE_BONIFICACION = 'IMPORTE_BONIFICACION';
fld_PresupuestosClienteCERTIFICADO_ISO = 'CERTIFICADO_ISO';
+ fld_PresupuestosClienteNUM_FACTURA = 'NUM_FACTURA';
{ PresupuestosCliente field indexes }
idx_PresupuestosClienteID = 0;
@@ -95,6 +96,7 @@ const
idx_PresupuestosClienteDESCRIPCION_BONIFICACION = 31;
idx_PresupuestosClienteIMPORTE_BONIFICACION = 32;
idx_PresupuestosClienteCERTIFICADO_ISO = 33;
+ idx_PresupuestosClienteNUM_FACTURA = 34;
{ PresupuestosCliente_Detalles fields }
fld_PresupuestosCliente_DetallesID = 'ID';
@@ -133,7 +135,7 @@ const
type
{ IListaAnosPresupuestos }
IListaAnosPresupuestos = interface(IDAStronglyTypedDataTable)
- ['{7B9FC1A2-4BF9-463D-BFA2-17F1DEDC4914}']
+ ['{A9351889-76CD-4DF9-A713-429A45EEFF0E}']
{ Property getters and setters }
function GetANOValue: String;
procedure SetANOValue(const aValue: String);
@@ -168,7 +170,7 @@ type
{ IPresupuestosCliente }
IPresupuestosCliente = interface(IDAStronglyTypedDataTable)
- ['{FA3103A1-D1C7-4206-8D73-3FC5D91A5A87}']
+ ['{8270147A-7440-4A9F-96C0-4473F3A5103C}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -302,6 +304,10 @@ type
procedure SetCERTIFICADO_ISOValue(const aValue: SmallInt);
function GetCERTIFICADO_ISOIsNull: Boolean;
procedure SetCERTIFICADO_ISOIsNull(const aValue: Boolean);
+ function GetNUM_FACTURAValue: String;
+ procedure SetNUM_FACTURAValue(const aValue: String);
+ function GetNUM_FACTURAIsNull: Boolean;
+ procedure SetNUM_FACTURAIsNull(const aValue: Boolean);
{ Properties }
@@ -373,6 +379,8 @@ type
property IMPORTE_BONIFICACIONIsNull: Boolean read GetIMPORTE_BONIFICACIONIsNull write SetIMPORTE_BONIFICACIONIsNull;
property CERTIFICADO_ISO: SmallInt read GetCERTIFICADO_ISOValue write SetCERTIFICADO_ISOValue;
property CERTIFICADO_ISOIsNull: Boolean read GetCERTIFICADO_ISOIsNull write SetCERTIFICADO_ISOIsNull;
+ property NUM_FACTURA: String read GetNUM_FACTURAValue write SetNUM_FACTURAValue;
+ property NUM_FACTURAIsNull: Boolean read GetNUM_FACTURAIsNull write SetNUM_FACTURAIsNull;
end;
{ TPresupuestosClienteDataTableRules }
@@ -520,6 +528,10 @@ type
procedure SetCERTIFICADO_ISOValue(const aValue: SmallInt); virtual;
function GetCERTIFICADO_ISOIsNull: Boolean; virtual;
procedure SetCERTIFICADO_ISOIsNull(const aValue: Boolean); virtual;
+ function GetNUM_FACTURAValue: String; virtual;
+ procedure SetNUM_FACTURAValue(const aValue: String); virtual;
+ function GetNUM_FACTURAIsNull: Boolean; virtual;
+ procedure SetNUM_FACTURAIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@@ -590,6 +602,8 @@ type
property IMPORTE_BONIFICACIONIsNull: Boolean read GetIMPORTE_BONIFICACIONIsNull write SetIMPORTE_BONIFICACIONIsNull;
property CERTIFICADO_ISO: SmallInt read GetCERTIFICADO_ISOValue write SetCERTIFICADO_ISOValue;
property CERTIFICADO_ISOIsNull: Boolean read GetCERTIFICADO_ISOIsNull write SetCERTIFICADO_ISOIsNull;
+ property NUM_FACTURA: String read GetNUM_FACTURAValue write SetNUM_FACTURAValue;
+ property NUM_FACTURAIsNull: Boolean read GetNUM_FACTURAIsNull write SetNUM_FACTURAIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@@ -599,7 +613,7 @@ type
{ IPresupuestosCliente_Detalles }
IPresupuestosCliente_Detalles = interface(IDAStronglyTypedDataTable)
- ['{341EBBC1-EE9E-46B6-B65A-AB180E04C8A3}']
+ ['{F55BA8B9-B3C5-41E9-A24C-37775DEC3E12}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -1584,6 +1598,27 @@ begin
DataTable.Fields[idx_PresupuestosClienteCERTIFICADO_ISO].AsVariant := Null;
end;
+function TPresupuestosClienteDataTableRules.GetNUM_FACTURAValue: String;
+begin
+ result := DataTable.Fields[idx_PresupuestosClienteNUM_FACTURA].AsString;
+end;
+
+procedure TPresupuestosClienteDataTableRules.SetNUM_FACTURAValue(const aValue: String);
+begin
+ DataTable.Fields[idx_PresupuestosClienteNUM_FACTURA].AsString := aValue;
+end;
+
+function TPresupuestosClienteDataTableRules.GetNUM_FACTURAIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PresupuestosClienteNUM_FACTURA].IsNull;
+end;
+
+procedure TPresupuestosClienteDataTableRules.SetNUM_FACTURAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PresupuestosClienteNUM_FACTURA].AsVariant := Null;
+end;
+
{ TPresupuestosCliente_DetallesDataTableRules }
constructor TPresupuestosCliente_DetallesDataTableRules.Create(aDataTable: TDADataTable);
diff --git a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas
index c2d645e6..483b432b 100644
--- a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas
+++ b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_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_ListaAnosPresupuestosDelta = '{016A4229-E5D0-49BF-95B2-B0D2202975FF}';
- RID_PresupuestosClienteDelta = '{883ECB54-1EFD-49B9-86AD-BAC66B8C72B8}';
- RID_PresupuestosCliente_DetallesDelta = '{7FC6F73A-E858-43F9-8F1E-9907EE547F26}';
+ RID_ListaAnosPresupuestosDelta = '{2A42AFEA-7059-4D2F-9607-2FEF08BA8B18}';
+ RID_PresupuestosClienteDelta = '{C30EFE0E-9528-4EA9-A001-D32D0CBE4A62}';
+ RID_PresupuestosCliente_DetallesDelta = '{BC5B932F-4F80-464F-89B1-D198C455DC79}';
type
{ IListaAnosPresupuestosDelta }
IListaAnosPresupuestosDelta = interface(IListaAnosPresupuestos)
- ['{016A4229-E5D0-49BF-95B2-B0D2202975FF}']
+ ['{2A42AFEA-7059-4D2F-9607-2FEF08BA8B18}']
{ Property getters and setters }
function GetOldANOValue : String;
@@ -50,7 +50,7 @@ type
{ IPresupuestosClienteDelta }
IPresupuestosClienteDelta = interface(IPresupuestosCliente)
- ['{883ECB54-1EFD-49B9-86AD-BAC66B8C72B8}']
+ ['{C30EFE0E-9528-4EA9-A001-D32D0CBE4A62}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -86,6 +86,7 @@ type
function GetOldDESCRIPCION_BONIFICACIONValue : String;
function GetOldIMPORTE_BONIFICACIONValue : Currency;
function GetOldCERTIFICADO_ISOValue : SmallInt;
+ function GetOldNUM_FACTURAValue : String;
{ Properties }
property OldID : Integer read GetOldIDValue;
@@ -122,6 +123,7 @@ type
property OldDESCRIPCION_BONIFICACION : String read GetOldDESCRIPCION_BONIFICACIONValue;
property OldIMPORTE_BONIFICACION : Currency read GetOldIMPORTE_BONIFICACIONValue;
property OldCERTIFICADO_ISO : SmallInt read GetOldCERTIFICADO_ISOValue;
+ property OldNUM_FACTURA : String read GetOldNUM_FACTURAValue;
end;
{ TPresupuestosClienteBusinessProcessorRules }
@@ -337,6 +339,12 @@ type
function GetOldCERTIFICADO_ISOIsNull: Boolean; virtual;
procedure SetCERTIFICADO_ISOValue(const aValue: SmallInt); virtual;
procedure SetCERTIFICADO_ISOIsNull(const aValue: Boolean); virtual;
+ function GetNUM_FACTURAValue: String; virtual;
+ function GetNUM_FACTURAIsNull: Boolean; virtual;
+ function GetOldNUM_FACTURAValue: String; virtual;
+ function GetOldNUM_FACTURAIsNull: Boolean; virtual;
+ procedure SetNUM_FACTURAValue(const aValue: String); virtual;
+ procedure SetNUM_FACTURAIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@@ -475,6 +483,10 @@ type
property CERTIFICADO_ISOIsNull : Boolean read GetCERTIFICADO_ISOIsNull write SetCERTIFICADO_ISOIsNull;
property OldCERTIFICADO_ISO : SmallInt read GetOldCERTIFICADO_ISOValue;
property OldCERTIFICADO_ISOIsNull : Boolean read GetOldCERTIFICADO_ISOIsNull;
+ property NUM_FACTURA : String read GetNUM_FACTURAValue write SetNUM_FACTURAValue;
+ property NUM_FACTURAIsNull : Boolean read GetNUM_FACTURAIsNull write SetNUM_FACTURAIsNull;
+ property OldNUM_FACTURA : String read GetOldNUM_FACTURAValue;
+ property OldNUM_FACTURAIsNull : Boolean read GetOldNUM_FACTURAIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@@ -484,7 +496,7 @@ type
{ IPresupuestosCliente_DetallesDelta }
IPresupuestosCliente_DetallesDelta = interface(IPresupuestosCliente_Detalles)
- ['{7FC6F73A-E858-43F9-8F1E-9907EE547F26}']
+ ['{BC5B932F-4F80-464F-89B1-D198C455DC79}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_PRESUPUESTOValue : Integer;
@@ -1823,6 +1835,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteCERTIFICADO_ISO] := Null;
end;
+function TPresupuestosClienteBusinessProcessorRules.GetNUM_FACTURAValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteNUM_FACTURA];
+end;
+
+function TPresupuestosClienteBusinessProcessorRules.GetNUM_FACTURAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteNUM_FACTURA]);
+end;
+
+function TPresupuestosClienteBusinessProcessorRules.GetOldNUM_FACTURAValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosClienteNUM_FACTURA];
+end;
+
+function TPresupuestosClienteBusinessProcessorRules.GetOldNUM_FACTURAIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosClienteNUM_FACTURA]);
+end;
+
+procedure TPresupuestosClienteBusinessProcessorRules.SetNUM_FACTURAValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteNUM_FACTURA] := aValue;
+end;
+
+procedure TPresupuestosClienteBusinessProcessorRules.SetNUM_FACTURAIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteNUM_FACTURA] := Null;
+end;
+
{ TPresupuestosCliente_DetallesBusinessProcessorRules }
constructor TPresupuestosCliente_DetallesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
diff --git a/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm b/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm
index 66a6292f..fffb8519 100644
--- a/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm
@@ -182,6 +182,10 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
item
DatasetField = 'CERTIFICADO_ISO'
TableField = 'CERTIFICADO_ISO'
+ end
+ item
+ DatasetField = 'NUM_FACTURA'
+ TableField = 'NUM_FACTURA'
end>
end>
Name = 'PresupuestosCliente'
@@ -367,6 +371,11 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
item
Name = 'CERTIFICADO_ISO'
DataType = datSmallInt
+ end
+ item
+ Name = 'NUM_FACTURA'
+ DataType = datString
+ Size = 31
end>
end
item
diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm
index ad78adcb..a7cc1119 100644
--- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm
@@ -136,6 +136,10 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente
HeaderAlignmentHorz = taRightJustify
Width = 63
end
+ object cxGridViewNUM_FACTURAS: TcxGridDBColumn
+ Caption = 'N'#186' facturas'
+ DataBinding.FieldName = 'NUM_FACTURA'
+ end
end
object cxGridDBTableView1: TcxGridDBTableView [1]
NavigatorButtons.ConfirmDelete = False
@@ -181,36 +185,32 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente
Width = 285
end
inherited edtFechaFinFiltro: TcxDateEdit
- Left = 249
+ Left = 292
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 249
+ ExplicitLeft = 292
ExplicitWidth = 504
Width = 504
end
inherited eLista: TcxComboBox
- Left = 645
+ Left = 750
Enabled = False
Properties.OnChange = nil
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 645
- ExplicitWidth = 215
- Width = 215
+ ExplicitLeft = 750
end
inherited eLista2: TcxComboBox
- Left = 776
+ Left = 833
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 776
- ExplicitWidth = 207
- Width = 207
+ ExplicitLeft = 833
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
inherited dxLayoutControl1Group1: TdxLayoutGroup
@@ -295,6 +295,10 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente
AssignedValues = [svTextColor]
TextColor = clGrayText
end
+ object cxStyleConFacturas: TcxStyle
+ AssignedValues = [svTextColor]
+ TextColor = 23737
+ end
end
inherited ActionList1: TActionList
Left = 200
diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas
index 8c704b8f..3a583d19 100644
--- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas
+++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas
@@ -47,6 +47,8 @@ type
cxGridViewINCIDENCIAS: TcxGridDBColumn;
cxStyleRECHAZADO: TcxStyle;
cxGridViewCERTIFICADO_ISO: TcxGridDBColumn;
+ cxGridViewNUM_FACTURAS: TcxGridDBColumn;
+ cxStyleConFacturas: TcxStyle;
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel:
TcxGridLevel);
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
@@ -96,7 +98,7 @@ implementation
uses
SysUtils, variants, uDataModulePresupuestosCliente, schPresupuestosClienteClient_Intf,
- uViewGridBase, uReferenciasUtils, cxVariants;
+ uViewGridBase, uReferenciasUtils, cxVariants, uStringsUtils;
{$R *.dfm}
@@ -325,6 +327,7 @@ procedure TfrViewPresupuestosCliente.cxGridViewStylesGetContentStyle(Sender:
var
IndiceCol: Integer;
ASituacion: string;
+ AFacturas: string;
begin
inherited;
if Assigned(ARecord) then
@@ -334,9 +337,16 @@ begin
if ASituacion = SITUACION_PRESUPUESTO_PENDIENTE then
AStyle.TextColor := cxStylePENDIENTES.TextColor
else if ASituacion = SITUACION_PRESUPUESTO_ACEPTADO then
- AStyle.TextColor := cxStyleACEPTADO.TextColor
+ begin
+ AStyle.TextColor := cxStyleACEPTADO.TextColor;
+ //Si está aceptado y no facturado que resalte
+ IndiceCol := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_PresupuestosClienteNUM_FACTURA).Index;
+ AFacturas := VarToStr(ARecord.DisplayTexts[IndiceCol]);
+ if EsCadenaVacia(AFacturas) then
+ AStyle.TextColor := cxStyleConFacturas.TextColor;
+ end
else if ASituacion = SITUACION_PRESUPUESTO_ANULADO then
- AStyle.TextColor := cxStyleRECHAZADO.TextColor
+ AStyle.TextColor := cxStyleRECHAZADO.TextColor;
end;
end;
diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES
index c67aa017..a965d5c4 100644
Binary files a/Source/Servidor/FactuGES_Server.RES and b/Source/Servidor/FactuGES_Server.RES differ
diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr
index 37d5400c..0eb77a34 100644
--- a/Source/Servidor/FactuGES_Server.dpr
+++ b/Source/Servidor/FactuGES_Server.dpr
@@ -130,10 +130,10 @@ uses
schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas',
schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas',
schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas',
- schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas',
- schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas',
schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas',
schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas',
+ schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas',
+ schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas',
schPedidosProveedorClient_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorClient_Intf.pas',
schPedidosProveedorServer_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorServer_Intf.pas';
diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc
index e6ef7c61..a6c40973 100644
--- a/Source/Servidor/FactuGES_Server.rc
+++ b/Source/Servidor/FactuGES_Server.rc
@@ -16,7 +16,7 @@ BEGIN
VALUE "FileVersion", "2.0.7.0\0"
VALUE "ProductName", "FactuGES Servidor\0"
VALUE "ProductVersion", "2.0.7.0\0"
- VALUE "CompileDate", "jueves, 05 de febrero de 2015 14:11\0"
+ VALUE "CompileDate", "martes, 17 de febrero de 2015 16:12\0"
END
END
BLOCK "VarFileInfo"