diff --git a/Build/Build.fbl6 b/Build/Build.fbl6
index c30df1b..3a8a12d 100644
Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ
diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql
index 82656fe..a4a8bb2 100644
--- a/Database/scripts/factuges.sql
+++ b/Database/scripts/factuges.sql
@@ -262,6 +262,12 @@ SET GENERATOR GEN_UNIDADES_MEDIDA_ID TO 1;
CREATE GENERATOR GEN_USUARIOS_ID;
SET GENERATOR GEN_USUARIOS_ID TO 1;
+CREATE GENERATOR GEN_OBJETIVOS_ALB_ID;
+SET GENERATOR GEN_OBJETIVOS_ALB_ID TO 1;
+
+CREATE GENERATOR GEN_OBJETIVOS_FAC_ID;
+SET GENERATOR GEN_OBJETIVOS_FAC_ID TO 1;
+
/******************************************************************************/
/**** Tables ****/
/******************************************************************************/
@@ -1272,6 +1278,23 @@ CREATE TABLE USUARIOS_LOGON (
DATA VARCHAR(14)
);
+CREATE TABLE AGENTES_OBJETIVOS_ALB (
+ ID TIPO_ID NOT NULL,
+ ID_AGENTE TIPO_ID,
+ ANO SMALLINT,
+ MES SMALLINT,
+ UNIDADES_OBJETIVO SMALLINT,
+ IMPORTE_OBJETIVO TIPO_IMPORTE
+);
+
+CREATE TABLE AGENTES_OBJETIVOS_FAC (
+ ID TIPO_ID NOT NULL,
+ ID_AGENTE TIPO_ID,
+ ANO SMALLINT,
+ MES SMALLINT,
+ UNIDADES_OBJETIVO SMALLINT,
+ IMPORTE_OBJETIVO TIPO_IMPORTE
+);
/******************************************************************************/
@@ -4499,6 +4522,123 @@ left join ALBARANES_CLIENTE A on (V.ID_ALBARAN = A.ID)
;
+CREATE VIEW V_INF_OBJETIVOS_ALBARANES_AUX(
+ ID_EMPRESA,
+ ID_AGENTE,
+ AGENTE,
+ ANO,
+ MES,
+ CANTIDAD_CONSEGUIDA,
+ CANTIDAD_DEVUELTA,
+ IMPORTE_CONSEGUIDO,
+ IMPORTE_DEVUELTO)
+AS
+select
+albaranes_cliente.ID_EMPRESA,
+coalesce (clientes_datos.id_agente, -1) as ID_AGENTE,
+coalesce (contactos.nombre, 'N/A') as AGENTE,
+EXTRACT(YEAR FROM albaranes_cliente.FECHA_ALBARAN) as ANO,
+EXTRACT(MONTH FROM albaranes_cliente.FECHA_ALBARAN) as MES,
+case when (albaranes_cliente_detalles.cantidad > 0) then albaranes_cliente_detalles.cantidad
+else 0
+end as cantidad,
+case when (albaranes_cliente_detalles.cantidad < 0) then albaranes_cliente_detalles.cantidad
+else 0
+end as cantidad_dev,
+case when (albaranes_cliente_detalles.importe_total > 0) then albaranes_cliente_detalles.importe_total
+else 0
+end as importe_total,
+case when (albaranes_cliente_detalles.importe_total < 0) then albaranes_cliente_detalles.importe_total
+else 0
+end as importe_total_dev
+
+from albaranes_cliente_detalles
+
+left join albaranes_cliente on (albaranes_cliente.id = albaranes_cliente_detalles.id_albaran)
+left join articulos on (articulos.id = albaranes_cliente_detalles.id_articulo)
+left join clientes_datos on (clientes_datos.id_cliente = albaranes_cliente.id_cliente)
+left join contactos on (contactos.id = clientes_datos.id_agente)
+where ((ARTICULOS.COMISIONABLE = 1) and (albaranes_cliente.FECHA_ALBARAN is not null))
+;
+
+
+
+CREATE VIEW V_INF_OBJETIVOS_ALBARANES(
+ ID_EMPRESA,
+ ID_AGENTE,
+ AGENTE,
+ ANO,
+ SEMESTRE,
+ TRIMESTRE,
+ MES,
+ CANTIDAD_CONSEGUIDA,
+ CANTIDAD_DEVUELTA,
+ IMPORTE_CONSEGUIDO,
+ IMPORTE_DEVUELTO)
+AS
+select
+ID_EMPRESA,
+ID_AGENTE,
+AGENTE,
+ANO,
+CAST((DIV(MES,7)+1) AS SMALLINT) as SEMESTRE,
+CAST((DIV((MES+2),3)) AS SMALLINT) as TRIMESTRE,
+MES,
+sum(cantidad_conseguida),
+sum(cantidad_devuelta),
+sum(importe_conseguido),
+sum(importe_devuelto)
+
+from v_inf_objetivos_albaranes_aux
+group by 1,2,3,4,5,6,7
+;
+
+
+CREATE VIEW V_INF_OBJETIVOS_ALB_AGENTES(
+ ID_AGENTE,
+ ANO,
+ SEMESTRE,
+ TRIMESTRE,
+ MES,
+ CANTIDAD_OBJETIVO,
+ IMPORTE_OBJETIVO)
+AS
+select
+id_agente,
+ANO,
+CAST((DIV(MES,7)+1) AS SMALLINT) as SEMESTRE,
+CAST((DIV((MES+2),3)) AS SMALLINT) as TRIMESTRE,
+MES,
+coalesce(UNIDADES_OBJETIVO,0),
+coalesce(IMPORTE_OBJETIVO,0)
+
+from agentes_objetivos_alb
+;
+
+
+CREATE VIEW V_INF_OBJ_CLIENTES_AGENTES(
+ ID_AGENTE,
+ ANO,
+ SEMESTRE,
+ TRIMESTRE,
+ MES,
+ ID_CLIENTE,
+ NOMBRE)
+AS
+select CD.id_agente, EXTRACT(YEAR FROM C.fecha_alta) as ANO,
+CAST((DIV(EXTRACT(MONTH FROM C.fecha_alta),7)+1) AS SMALLINT) as SEMESTRE,
+CAST((DIV((EXTRACT(MONTH FROM C.fecha_alta)+2),3)) AS SMALLINT) as TRIMESTRE,
+EXTRACT(MONTH FROM C.fecha_alta) as MES,
+C.id, C.nombre
+
+from contactos C
+inner join contactos_categorias CC on (CC.id_contacto = C.id)
+left join clientes_datos CD on (CD.id_cliente = C.id)
+where (CC.id_categoria = 1)
+and (CD.id_agente is not null)
+;
+
+
/******************************************************************************/
/**** Primary Keys ****/
/******************************************************************************/
@@ -4570,7 +4710,8 @@ ALTER TABLE TIPOS_IVA ADD PRIMARY KEY (ID);
ALTER TABLE UNIDADES_MEDIDA ADD PRIMARY KEY (ID);
ALTER TABLE USUARIOS ADD CONSTRAINT PK_USUARIOS PRIMARY KEY (ID);
ALTER TABLE USUARIOS_LOGON ADD CONSTRAINT PK_USUARIOS_LOGON PRIMARY KEY (LOGONID);
-
+ALTER TABLE AGENTES_OBJETIVOS_ALB ADD CONSTRAINT PK_AGENTES_OBJETIVOS_ALB PRIMARY KEY (ID);
+ALTER TABLE AGENTES_OBJETIVOS_FAC ADD CONSTRAINT PK_AGENTES_OBJETIVOS_FAC PRIMARY KEY (ID);
/******************************************************************************/
/**** Foreign Keys ****/
@@ -4831,10 +4972,13 @@ BEGIN
SUSPEND;
END^
-
-
-SET TERM ; ^
-
+CREATE PROCEDURE PRO_ANADIR_OBJETIVOS (
+ id_agente integer,
+ ano integer)
+as
+BEGIN
+ SUSPEND;
+END^
/******************************************************************************/
/**** Stored Procedures ****/
@@ -5208,3 +5352,54 @@ end
SET TERM ; ^
+ALTER PROCEDURE PRO_ANADIR_OBJETIVOS (
+ id_agente integer,
+ ano integer)
+as
+declare variable num_filas integer;
+begin
+select count(ID_AGENTE)
+from AGENTES_OBJETIVOS_ALB
+where ID_AGENTE = :ID_AGENTE and ANO = :ANO
+into :num_filas;
+
+if (num_filas = 0) then
+begin
+ INSERT INTO AGENTES_OBJETIVOS_ALB (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_ALB_ID, 1), :ID_AGENTE, :ANO, 1, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_ALB (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_ALB_ID, 1), :ID_AGENTE, :ANO, 2, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_ALB (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_ALB_ID, 1), :ID_AGENTE, :ANO, 3, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_ALB (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_ALB_ID, 1), :ID_AGENTE, :ANO, 4, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_ALB (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_ALB_ID, 1), :ID_AGENTE, :ANO, 5, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_ALB (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_ALB_ID, 1), :ID_AGENTE, :ANO, 6, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_ALB (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_ALB_ID, 1), :ID_AGENTE, :ANO, 7, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_ALB (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_ALB_ID, 1), :ID_AGENTE, :ANO, 8, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_ALB (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_ALB_ID, 1), :ID_AGENTE, :ANO, 9, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_ALB (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_ALB_ID, 1), :ID_AGENTE, :ANO, 10, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_ALB (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_ALB_ID, 1), :ID_AGENTE, :ANO, 11, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_ALB (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_ALB_ID, 1), :ID_AGENTE, :ANO, 12, null, null);
+end
+
+select count(ID_AGENTE)
+from AGENTES_OBJETIVOS_FAC
+where ID_AGENTE = :ID_AGENTE and ANO = :ANO
+into :num_filas;
+
+if (num_filas = 0) then
+begin
+ INSERT INTO AGENTES_OBJETIVOS_FAC (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_FAC_ID, 1), :ID_AGENTE, :ANO, 1, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_FAC (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_FAC_ID, 1), :ID_AGENTE, :ANO, 2, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_FAC (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_FAC_ID, 1), :ID_AGENTE, :ANO, 3, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_FAC (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_FAC_ID, 1), :ID_AGENTE, :ANO, 4, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_FAC (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_FAC_ID, 1), :ID_AGENTE, :ANO, 5, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_FAC (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_FAC_ID, 1), :ID_AGENTE, :ANO, 6, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_FAC (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_FAC_ID, 1), :ID_AGENTE, :ANO, 7, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_FAC (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_FAC_ID, 1), :ID_AGENTE, :ANO, 8, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_FAC (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_FAC_ID, 1), :ID_AGENTE, :ANO, 9, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_FAC (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_FAC_ID, 1), :ID_AGENTE, :ANO, 10, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_FAC (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_FAC_ID, 1), :ID_AGENTE, :ANO, 11, null, null);
+ INSERT INTO AGENTES_OBJETIVOS_FAC (ID, ID_AGENTE, ANO, MES, UNIDADES_OBJETIVO, IMPORTE_OBJETIVO) VALUES (GEN_ID(GEN_OBJETIVOS_FAC_ID, 1), :ID_AGENTE, :ANO, 12, null, null);
+end
+
+end^
+
+SET TERM ; ^
\ No newline at end of file
diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj
index 553497e..beed61a 100644
--- a/Source/Base/Base.dproj
+++ b/Source/Base/Base.dproj
@@ -54,6 +54,58 @@
MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
TDataModule
@@ -63,58 +115,6 @@
TDataModule
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
TForm
diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj
index 5473f53..f044104 100644
--- a/Source/Cliente/FactuGES.dproj
+++ b/Source/Cliente/FactuGES.dproj
@@ -53,7 +53,7 @@
Delphi.Personality
VCLApplication
-FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse4200FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.2.0.0FactuGESFactuGES4.2.0.0FactuGES.dprFalse
+FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse4210FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.2.1.0FactuGESFactuGES4.2.1.0FactuGES.dprFalse
diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj
index 8659a94..bc01909 100644
--- a/Source/GUIBase/GUIBase.dproj
+++ b/Source/GUIBase/GUIBase.dproj
@@ -59,30 +59,30 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/GUIBase/uEditorDBItem.dfm b/Source/GUIBase/uEditorDBItem.dfm
index 5608817..e064508 100644
--- a/Source/GUIBase/uEditorDBItem.dfm
+++ b/Source/GUIBase/uEditorDBItem.dfm
@@ -77,10 +77,6 @@ inherited fEditorDBItem: TfEditorDBItem
TabOrder = 2
object pagGeneral: TTabSheet
Caption = 'General'
- ExplicitLeft = 0
- ExplicitTop = 0
- ExplicitWidth = 0
- ExplicitHeight = 0
end
end
inherited StatusBar: TJvStatusBar
@@ -127,6 +123,9 @@ inherited fEditorDBItem: TfEditorDBItem
ShortCut = 0
end
end
+ inherited SmallImages: TPngImageList
+ Bitmap = {}
+ end
inherited dsDataTable: TDADataSource
Left = 48
Top = 112
diff --git a/Source/Informes/1/InformeObjetivosAgentesAlbaranes.fr3 b/Source/Informes/1/InformeObjetivosAgentesAlbaranes.fr3
index cdfc371..2eecd5d 100644
--- a/Source/Informes/1/InformeObjetivosAgentesAlbaranes.fr3
+++ b/Source/Informes/1/InformeObjetivosAgentesAlbaranes.fr3
@@ -1,5 +1,5 @@
-
+
@@ -30,23 +30,23 @@
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/Source/Informes/2/InformeObjetivosAgentesAlbaranes.fr3 b/Source/Informes/2/InformeObjetivosAgentesAlbaranes.fr3
new file mode 100644
index 0000000..2eecd5d
--- /dev/null
+++ b/Source/Informes/2/InformeObjetivosAgentesAlbaranes.fr3
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm
index ffb463d..f1a60bf 100644
--- a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm
+++ b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm
@@ -620,28 +620,42 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
Name = 'IBX'
SQL =
'select OBJETIVOS.ID_AGENTE, OBJETIVOS.AGENTE, OBJETIVOS.ANO,'#10' ' +
- ' OBJETIVOS.MES,'#10' OBJETIVOS.descripcion,'#10' OBJETIVOS.CANTIDA' +
- 'D_OBJETIVO,'#10' OBJETIVOS.IMPORTE_OBJETIVO,'#10' ALCANZADO.CANTID' +
- 'AD_CONSEGUIDA,'#10' ALCANZADO.CANTIDAD_DEVUELTA,'#10' ALCANZADO.IM' +
- 'PORTE_CONSEGUIDO,'#10' ALCANZADO.IMPORTE_DEVUELTO,'#10' (ALCANZADO' +
- '.CANTIDAD_CONSEGUIDA - OBJETIVOS.CANTIDAD_OBJETIVO) as CANTIDAD_' +
- 'RESULTADO,'#10' (ALCANZADO.IMPORTE_CONSEGUIDO - OBJETIVOS.IMPORTE' +
- '_OBJETIVO) as IMPORTE_RESULTADO'#10'from'#10#10'(select AO.ID_AGENTE, C.NO' +
- 'MBRE as AGENTE, AO.ANO,'#10' AO.MES,'#10' P.descripcion,'#10' sum(A' +
- 'O.CANTIDAD_OBJETIVO) as CANTIDAD_OBJETIVO,'#10' sum(AO.IMPORTE_OB' +
- 'JETIVO) as IMPORTE_OBJETIVO'#10'from V_INF_OBJETIVOS_ALB_AGENTES AO'#10 +
- 'left join periodos_aux P on ((P.periodo = '#39'MENSUAL'#39') and (P.valo' +
- 'r = AO.MES))'#10'left join contactos C on (C.ID = AO.ID_AGENTE)'#10'wher' +
- 'e (AO.ANO = :ANO1)'#10'group by 1,2,3,4,5'#10'order by 1,2,3,4,5) OBJETI' +
- 'VOS'#10#10#10'left join'#10'(select ID_AGENTE, AGENTE, ANO, MES, sum(CANTIDA' +
- 'D_CONSEGUIDA) as CANTIDAD_CONSEGUIDA,'#10' sum(CANTIDAD_DEVUELTA) as' +
- ' CANTIDAD_DEVUELTA, sum(IMPORTE_CONSEGUIDO) as IMPORTE_CONSEGUID' +
- 'O,'#10' sum(IMPORTE_DEVUELTO) as IMPORTE_DEVUELTO'#10' from v_inf_objeti' +
- 'vos_albaranes'#10' where ((v_inf_objetivos_albaranes.id_empresa = :I' +
- 'D_EMPRESA) and (v_inf_objetivos_albaranes.ANO = :ANO1))'#10' group b' +
- 'y 1,2,3,4'#10' order by 1,2,3,4) ALCANZADO on ((OBJETIVOS.id_agente ' +
- '= ALCANZADO.id_agente) and (OBJETIVOS.ano = ALCANZADO.ANO) and (' +
- 'OBJETIVOS.mes = ALCANZADO.MES))'#10#10'where {where}'#10
+ ' OBJETIVOS.MES,'#10' OBJETIVOS.descripcion,'#10' CLIENTES_NUEVOS.C' +
+ 'ANTIDAD as ALTAS_CLIENTE,'#10' CLIENTES_TOTALES.CANTIDAD as CLIEN' +
+ 'TES_TOTALES,'#10' OBJETIVOS.CANTIDAD_OBJETIVO,'#10' OBJETIVOS.IMPO' +
+ 'RTE_OBJETIVO,'#10' ALCANZADO.CANTIDAD_CONSEGUIDA,'#10' ALCANZADO.C' +
+ 'ANTIDAD_DEVUELTA,'#10' ALCANZADO.IMPORTE_CONSEGUIDO,'#10' ALCANZAD' +
+ 'O.IMPORTE_DEVUELTO,'#10' (ALCANZADO.CANTIDAD_CONSEGUIDA - OBJETIV' +
+ 'OS.CANTIDAD_OBJETIVO) as CANTIDAD_RESULTADO,'#10' (ALCANZADO.IMPO' +
+ 'RTE_CONSEGUIDO - OBJETIVOS.IMPORTE_OBJETIVO) as IMPORTE_RESULTAD' +
+ 'O,'#10' case when (ALCANZADO.IMPORTE_CONSEGUIDO > 0) then (ALCANZ' +
+ 'ADO.IMPORTE_CONSEGUIDO/ALCANZADO.CANTIDAD_CONSEGUIDA)'#10' else 0' +
+ #10' end as IMPORTE_MEDIO_UNIDAD,'#10' case when (ALCANZADO.IMPOR' +
+ 'TE_CONSEGUIDO > 0) then (ALCANZADO.IMPORTE_CONSEGUIDO/CLIENTES_T' +
+ 'OTALES.CANTIDAD)'#10' else 0'#10' end as IMPORTE_MEDIO_CLIENTE'#10#10'fr' +
+ 'om'#10#10'(select AO.ID_AGENTE, C.NOMBRE as AGENTE, AO.ANO,'#10' AO.MES' +
+ ','#10' P.descripcion,'#10' sum(AO.CANTIDAD_OBJETIVO) as CANTIDAD_O' +
+ 'BJETIVO,'#10' sum(AO.IMPORTE_OBJETIVO) as IMPORTE_OBJETIVO'#10'from V' +
+ '_INF_OBJETIVOS_ALB_AGENTES AO'#10'left join periodos_aux P on ((P.pe' +
+ 'riodo = '#39'MENSUAL'#39') and (P.valor = AO.MES))'#10'left join contactos C' +
+ ' on (C.ID = AO.ID_AGENTE)'#10'where (AO.ANO = :ANO1)'#10'group by 1,2,3,' +
+ '4,5'#10'order by 1,2,3,4,5) OBJETIVOS'#10#10#10'left join'#10'(select ID_AGENTE,' +
+ ' AGENTE, ANO, MES, sum(CANTIDAD_CONSEGUIDA) as CANTIDAD_CONSEGUI' +
+ 'DA,'#10' sum(CANTIDAD_DEVUELTA) as CANTIDAD_DEVUELTA, sum(IMPORTE_CO' +
+ 'NSEGUIDO) as IMPORTE_CONSEGUIDO,'#10' sum(IMPORTE_DEVUELTO) as IMPOR' +
+ 'TE_DEVUELTO'#10' from v_inf_objetivos_albaranes'#10' where ((v_inf_objet' +
+ 'ivos_albaranes.id_empresa = :ID_EMPRESA) and (v_inf_objetivos_al' +
+ 'baranes.ANO = :ANO1))'#10' group by 1,2,3,4'#10' order by 1,2,3,4) ALCAN' +
+ 'ZADO on ((OBJETIVOS.id_agente = ALCANZADO.id_agente) and (OBJETI' +
+ 'VOS.ano = ALCANZADO.ANO) and (OBJETIVOS.mes = ALCANZADO.MES))'#10#10'l' +
+ 'eft join'#10'(select ID_AGENTE, ANO, MES, count(ID_CLIENTE) as CANTI' +
+ 'DAD'#10'from v_inf_obj_clientes_agentes'#10'where (ANO = :ANO1)'#10'group by' +
+ ' 1,2,3'#10'order by 1,2,3) CLIENTES_NUEVOS on ((OBJETIVOS.id_agente ' +
+ '= CLIENTES_NUEVOS.id_agente) and (OBJETIVOS.ano = CLIENTES_NUEVO' +
+ 'S.ANO) and (OBJETIVOS.mes = CLIENTES_NUEVOS.MES))'#10#10'left join'#10'(se' +
+ 'lect ID_AGENTE, count(ID_CLIENTE) as CANTIDAD'#10'from v_inf_obj_cli' +
+ 'entes_agentes'#10'group by 1'#10'order by 1) CLIENTES_TOTALES on (OBJETI' +
+ 'VOS.id_agente = CLIENTES_TOTALES.id_agente)'#10#10#10'where {where}'#10
StatementType = stSQL
ColumnMappings = <
item
@@ -695,6 +709,22 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
item
DatasetField = 'ID_AGENTE'
TableField = 'ID_AGENTE'
+ end
+ item
+ DatasetField = 'ALTAS_CLIENTE'
+ TableField = 'ALTAS_CLIENTE'
+ end
+ item
+ DatasetField = 'CLIENTES_TOTALES'
+ TableField = 'CLIENTES_TOTALES'
+ end
+ item
+ DatasetField = 'IMPORTE_MEDIO_UNIDAD'
+ TableField = 'IMPORTE_MEDIO_UNIDAD'
+ end
+ item
+ DatasetField = 'IMPORTE_MEDIO_CLIENTE'
+ TableField = 'IMPORTE_MEDIO_CLIENTE'
end>
end>
Name = 'InformeListadoObjetivosMensual'
@@ -721,6 +751,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
DataType = datString
Size = 20
end
+ item
+ Name = 'ALTAS_CLIENTE'
+ DataType = datInteger
+ end
+ item
+ Name = 'CLIENTES_TOTALES'
+ DataType = datInteger
+ end
item
Name = 'CANTIDAD_OBJETIVO'
DataType = datLargeInt
@@ -752,6 +790,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
item
Name = 'IMPORTE_RESULTADO'
DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_MEDIO_UNIDAD'
+ DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_MEDIO_CLIENTE'
+ DataType = datCurrency
end>
end
item
@@ -2084,29 +2130,43 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
Default = True
SQL =
'select OBJETIVOS.ID_AGENTE, OBJETIVOS.AGENTE, OBJETIVOS.ANO,'#10' ' +
- ' OBJETIVOS.TRIMESTRE,'#10' OBJETIVOS.descripcion,'#10' OBJETIVOS.C' +
- 'ANTIDAD_OBJETIVO,'#10' OBJETIVOS.IMPORTE_OBJETIVO,'#10' ALCANZADO.' +
- 'CANTIDAD_CONSEGUIDA,'#10' ALCANZADO.CANTIDAD_DEVUELTA,'#10' ALCANZ' +
- 'ADO.IMPORTE_CONSEGUIDO,'#10' ALCANZADO.IMPORTE_DEVUELTO,'#10' (ALC' +
- 'ANZADO.CANTIDAD_CONSEGUIDA - OBJETIVOS.CANTIDAD_OBJETIVO) as CAN' +
- 'TIDAD_RESULTADO,'#10' (ALCANZADO.IMPORTE_CONSEGUIDO - OBJETIVOS.I' +
- 'MPORTE_OBJETIVO) as IMPORTE_RESULTADO'#10'from'#10#10'(select AO.ID_AGENTE' +
- ', C.NOMBRE AS AGENTE, AO.ANO,'#10' AO.TRIMESTRE,'#10' P.descripcio' +
- 'n,'#10' sum(AO.CANTIDAD_OBJETIVO) as CANTIDAD_OBJETIVO,'#10' sum(A' +
- 'O.IMPORTE_OBJETIVO) as IMPORTE_OBJETIVO'#10'from V_INF_OBJETIVOS_ALB' +
- '_AGENTES AO'#10'left join periodos_aux P on ((P.periodo = '#39'TRIMESTRA' +
- 'L'#39') and (P.valor = AO.TRIMESTRE))'#10'left join contactos C on (C.ID' +
- ' = AO.ID_AGENTE)'#10'where (AO.ANO = :ANO1)'#10'group by 1,2,3,4,5'#10'order' +
- ' by 1,2,3,4,5) OBJETIVOS'#10#10#10'left join'#10'(select ID_AGENTE, AGENTE, ' +
- 'ANO, TRIMESTRE, sum(CANTIDAD_CONSEGUIDA) as CANTIDAD_CONSEGUIDA,' +
- #10' sum(CANTIDAD_DEVUELTA) as CANTIDAD_DEVUELTA, sum(IMPORTE_CONSE' +
- 'GUIDO) as IMPORTE_CONSEGUIDO,'#10' sum(IMPORTE_DEVUELTO) as IMPORTE_' +
- 'DEVUELTO'#10' from v_inf_objetivos_albaranes'#10' where ((v_inf_objetivo' +
- 's_albaranes.id_empresa = :ID_EMPRESA) and (v_inf_objetivos_albar' +
- 'anes.ANO = :ANO1))'#10' group by 1,2,3,4'#10' order by 1,2,3,4) ALCANZAD' +
- 'O on ((OBJETIVOS.id_agente = ALCANZADO.id_agente) and (OBJETIVOS' +
- '.ano = ALCANZADO.ANO) and (OBJETIVOS.TRIMESTRE = ALCANZADO.TRIME' +
- 'STRE))'#10#10' where {where}'#10#10#10
+ ' OBJETIVOS.TRIMESTRE,'#10' OBJETIVOS.descripcion,'#10' CLIENTES_NU' +
+ 'EVOS.CANTIDAD as ALTAS_CLIENTE,'#10' CLIENTES_TOTALES.CANTIDAD as' +
+ ' CLIENTES_TOTALES,'#10' OBJETIVOS.CANTIDAD_OBJETIVO,'#10' OBJETIVO' +
+ 'S.IMPORTE_OBJETIVO,'#10' ALCANZADO.CANTIDAD_CONSEGUIDA,'#10' ALCAN' +
+ 'ZADO.CANTIDAD_DEVUELTA,'#10' ALCANZADO.IMPORTE_CONSEGUIDO,'#10' AL' +
+ 'CANZADO.IMPORTE_DEVUELTO,'#10' (ALCANZADO.CANTIDAD_CONSEGUIDA - O' +
+ 'BJETIVOS.CANTIDAD_OBJETIVO) as CANTIDAD_RESULTADO,'#10' (ALCANZAD' +
+ 'O.IMPORTE_CONSEGUIDO - OBJETIVOS.IMPORTE_OBJETIVO) as IMPORTE_RE' +
+ 'SULTADO,'#10' case when (ALCANZADO.IMPORTE_CONSEGUIDO > 0) then (' +
+ 'ALCANZADO.IMPORTE_CONSEGUIDO/ALCANZADO.CANTIDAD_CONSEGUIDA)'#10' ' +
+ 'else 0'#10' end as IMPORTE_MEDIO_UNIDAD,'#10' case when (ALCANZADO' +
+ '.IMPORTE_CONSEGUIDO > 0) then (ALCANZADO.IMPORTE_CONSEGUIDO/CLIE' +
+ 'NTES_TOTALES.CANTIDAD)'#10' else 0'#10' end as IMPORTE_MEDIO_CLIEN' +
+ 'TE'#10#10'from'#10#10'(select AO.ID_AGENTE, C.NOMBRE AS AGENTE, AO.ANO,'#10' ' +
+ 'AO.TRIMESTRE,'#10' P.descripcion,'#10' sum(AO.CANTIDAD_OBJETIVO) a' +
+ 's CANTIDAD_OBJETIVO,'#10' sum(AO.IMPORTE_OBJETIVO) as IMPORTE_OBJ' +
+ 'ETIVO'#10'from V_INF_OBJETIVOS_ALB_AGENTES AO'#10'left join periodos_aux' +
+ ' P on ((P.periodo = '#39'TRIMESTRAL'#39') and (P.valor = AO.TRIMESTRE))'#10 +
+ 'left join contactos C on (C.ID = AO.ID_AGENTE)'#10'where (AO.ANO = :' +
+ 'ANO1)'#10'group by 1,2,3,4,5'#10'order by 1,2,3,4,5) OBJETIVOS'#10#10'left joi' +
+ 'n'#10'(select ID_AGENTE, AGENTE, ANO, TRIMESTRE, sum(CANTIDAD_CONSEG' +
+ 'UIDA) as CANTIDAD_CONSEGUIDA,'#10' sum(CANTIDAD_DEVUELTA) as CANTIDA' +
+ 'D_DEVUELTA, sum(IMPORTE_CONSEGUIDO) as IMPORTE_CONSEGUIDO,'#10' sum(' +
+ 'IMPORTE_DEVUELTO) as IMPORTE_DEVUELTO'#10' from v_inf_objetivos_alba' +
+ 'ranes'#10' where ((v_inf_objetivos_albaranes.id_empresa = :ID_EMPRES' +
+ 'A) and (v_inf_objetivos_albaranes.ANO = :ANO1))'#10' group by 1,2,3,' +
+ '4'#10' order by 1,2,3,4) ALCANZADO on ((OBJETIVOS.id_agente = ALCANZ' +
+ 'ADO.id_agente) and (OBJETIVOS.ano = ALCANZADO.ANO) and (OBJETIVO' +
+ 'S.TRIMESTRE = ALCANZADO.TRIMESTRE))'#10#10'left join'#10'(select ID_AGENTE' +
+ ', ANO, TRIMESTRE, count(ID_CLIENTE) as CANTIDAD'#10'from v_inf_obj_c' +
+ 'lientes_agentes'#10'where (ANO = :ANO1)'#10'group by 1,2,3'#10'order by 1,2,' +
+ '3) CLIENTES_NUEVOS on ((OBJETIVOS.id_agente = CLIENTES_NUEVOS.id' +
+ '_agente) and (OBJETIVOS.ano = CLIENTES_NUEVOS.ANO) and (OBJETIVO' +
+ 'S.trimestre = CLIENTES_NUEVOS.TRIMESTRE))'#10#10'left join'#10'(select ID_' +
+ 'AGENTE, count(ID_CLIENTE) as CANTIDAD'#10'from v_inf_obj_clientes_ag' +
+ 'entes'#10'group by 1'#10'order by 1) CLIENTES_TOTALES on (OBJETIVOS.id_a' +
+ 'gente = CLIENTES_TOTALES.id_agente)'#10#10' where {where}'#10#10#10#10#10#10
StatementType = stSQL
ColumnMappings = <
item
@@ -2160,6 +2220,22 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
item
DatasetField = 'ID_AGENTE'
TableField = 'ID_AGENTE'
+ end
+ item
+ DatasetField = 'ALTAS_CLIENTE'
+ TableField = 'ALTAS_CLIENTE'
+ end
+ item
+ DatasetField = 'CLIENTES_TOTALES'
+ TableField = 'CLIENTES_TOTALES'
+ end
+ item
+ DatasetField = 'IMPORTE_MEDIO_UNIDAD'
+ TableField = 'IMPORTE_MEDIO_UNIDAD'
+ end
+ item
+ DatasetField = 'IMPORTE_MEDIO_CLIENTE'
+ TableField = 'IMPORTE_MEDIO_CLIENTE'
end>
end>
Name = 'InformeListadoObjetivosTrimestral'
@@ -2186,6 +2262,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
DataType = datString
Size = 20
end
+ item
+ Name = 'ALTAS_CLIENTE'
+ DataType = datInteger
+ end
+ item
+ Name = 'CLIENTES_TOTALES'
+ DataType = datInteger
+ end
item
Name = 'CANTIDAD_OBJETIVO'
DataType = datLargeInt
@@ -2217,6 +2301,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
item
Name = 'IMPORTE_RESULTADO'
DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_MEDIO_UNIDAD'
+ DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_MEDIO_CLIENTE'
+ DataType = datCurrency
end>
end
item
@@ -2236,29 +2328,43 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
Default = True
SQL =
'select OBJETIVOS.ID_AGENTE, OBJETIVOS.AGENTE, OBJETIVOS.ANO,'#10' ' +
- ' OBJETIVOS.SEMESTRE,'#10' OBJETIVOS.descripcion,'#10' OBJETIVOS.CA' +
- 'NTIDAD_OBJETIVO,'#10' OBJETIVOS.IMPORTE_OBJETIVO,'#10' ALCANZADO.C' +
- 'ANTIDAD_CONSEGUIDA,'#10' ALCANZADO.CANTIDAD_DEVUELTA,'#10' ALCANZA' +
- 'DO.IMPORTE_CONSEGUIDO,'#10' ALCANZADO.IMPORTE_DEVUELTO,'#10' (ALCA' +
- 'NZADO.CANTIDAD_CONSEGUIDA - OBJETIVOS.CANTIDAD_OBJETIVO) as CANT' +
- 'IDAD_RESULTADO,'#10' (ALCANZADO.IMPORTE_CONSEGUIDO - OBJETIVOS.IM' +
- 'PORTE_OBJETIVO) as IMPORTE_RESULTADO'#10'from'#10#10'(select AO.ID_AGENTE,' +
- ' C.NOMBRE as AGENTE, AO.ANO,'#10' AO.SEMESTRE,'#10' P.descripcion,' +
- #10' sum(AO.CANTIDAD_OBJETIVO) as CANTIDAD_OBJETIVO,'#10' sum(AO.' +
- 'IMPORTE_OBJETIVO) as IMPORTE_OBJETIVO'#10'from V_INF_OBJETIVOS_ALB_A' +
- 'GENTES AO'#10'left join periodos_aux P on ((P.periodo = '#39'SEMESTRAL'#39')' +
- ' and (P.valor = AO.SEMESTRE))'#10'left join contactos C on (C.ID = A' +
- 'O.ID_AGENTE)'#10'where (AO.ANO = :ANO1)'#10'group by 1,2,3,4,5'#10'order by ' +
- '1,2,3,4,5) OBJETIVOS'#10#10#10'left join'#10'(select ID_AGENTE, AGENTE, ANO,' +
- ' SEMESTRE, sum(CANTIDAD_CONSEGUIDA) as CANTIDAD_CONSEGUIDA,'#10' sum' +
- '(CANTIDAD_DEVUELTA) as CANTIDAD_DEVUELTA, sum(IMPORTE_CONSEGUIDO' +
- ') as IMPORTE_CONSEGUIDO,'#10' sum(IMPORTE_DEVUELTO) as IMPORTE_DEVUE' +
- 'LTO'#10' from v_inf_objetivos_albaranes'#10' where ((v_inf_objetivos_alb' +
- 'aranes.id_empresa = :ID_EMPRESA) and (v_inf_objetivos_albaranes.' +
- 'ANO = :ANO1))'#10' group by 1,2,3,4'#10' order by 1,2,3,4) ALCANZADO on ' +
- '((OBJETIVOS.id_agente = ALCANZADO.id_agente) and (OBJETIVOS.ano ' +
- '= ALCANZADO.ANO) and (OBJETIVOS.SEMESTRE = ALCANZADO.SEMESTRE))'#10 +
- #10'where {where}'#10
+ ' OBJETIVOS.SEMESTRE,'#10' OBJETIVOS.descripcion,'#10' CLIENTES_NUE' +
+ 'VOS.CANTIDAD as ALTAS_CLIENTE,'#10' CLIENTES_TOTALES.CANTIDAD as ' +
+ 'CLIENTES_TOTALES,'#10' OBJETIVOS.CANTIDAD_OBJETIVO,'#10' OBJETIVOS' +
+ '.IMPORTE_OBJETIVO,'#10' ALCANZADO.CANTIDAD_CONSEGUIDA,'#10' ALCANZ' +
+ 'ADO.CANTIDAD_DEVUELTA,'#10' ALCANZADO.IMPORTE_CONSEGUIDO,'#10' ALC' +
+ 'ANZADO.IMPORTE_DEVUELTO,'#10' (ALCANZADO.CANTIDAD_CONSEGUIDA - OB' +
+ 'JETIVOS.CANTIDAD_OBJETIVO) as CANTIDAD_RESULTADO,'#10' (ALCANZADO' +
+ '.IMPORTE_CONSEGUIDO - OBJETIVOS.IMPORTE_OBJETIVO) as IMPORTE_RES' +
+ 'ULTADO,'#10' case when (ALCANZADO.IMPORTE_CONSEGUIDO > 0) then (A' +
+ 'LCANZADO.IMPORTE_CONSEGUIDO/ALCANZADO.CANTIDAD_CONSEGUIDA)'#10' e' +
+ 'lse 0'#10' end as IMPORTE_MEDIO_UNIDAD,'#10' case when (ALCANZADO.' +
+ 'IMPORTE_CONSEGUIDO > 0) then (ALCANZADO.IMPORTE_CONSEGUIDO/CLIEN' +
+ 'TES_TOTALES.CANTIDAD)'#10' else 0'#10' end as IMPORTE_MEDIO_CLIENT' +
+ 'E'#10#10'from'#10#10'(select AO.ID_AGENTE, C.NOMBRE as AGENTE, AO.ANO,'#10' A' +
+ 'O.SEMESTRE,'#10' P.descripcion,'#10' sum(AO.CANTIDAD_OBJETIVO) as ' +
+ 'CANTIDAD_OBJETIVO,'#10' sum(AO.IMPORTE_OBJETIVO) as IMPORTE_OBJET' +
+ 'IVO'#10'from V_INF_OBJETIVOS_ALB_AGENTES AO'#10'left join periodos_aux P' +
+ ' on ((P.periodo = '#39'SEMESTRAL'#39') and (P.valor = AO.SEMESTRE))'#10'left' +
+ ' join contactos C on (C.ID = AO.ID_AGENTE)'#10'where (AO.ANO = :ANO1' +
+ ')'#10'group by 1,2,3,4,5'#10'order by 1,2,3,4,5) OBJETIVOS'#10#10'left join'#10'(s' +
+ 'elect ID_AGENTE, AGENTE, ANO, SEMESTRE, sum(CANTIDAD_CONSEGUIDA)' +
+ ' as CANTIDAD_CONSEGUIDA,'#10' sum(CANTIDAD_DEVUELTA) as CANTIDAD_DEV' +
+ 'UELTA, sum(IMPORTE_CONSEGUIDO) as IMPORTE_CONSEGUIDO,'#10' sum(IMPOR' +
+ 'TE_DEVUELTO) as IMPORTE_DEVUELTO'#10' from v_inf_objetivos_albaranes' +
+ #10' where ((v_inf_objetivos_albaranes.id_empresa = :ID_EMPRESA) an' +
+ 'd (v_inf_objetivos_albaranes.ANO = :ANO1))'#10' group by 1,2,3,4'#10' or' +
+ 'der by 1,2,3,4) ALCANZADO on ((OBJETIVOS.id_agente = ALCANZADO.i' +
+ 'd_agente) and (OBJETIVOS.ano = ALCANZADO.ANO) and (OBJETIVOS.SEM' +
+ 'ESTRE = ALCANZADO.SEMESTRE))'#10#10'left join'#10'(select ID_AGENTE, ANO, ' +
+ 'SEMESTRE, count(ID_CLIENTE) as CANTIDAD'#10'from v_inf_obj_clientes_' +
+ 'agentes'#10'where (ANO = :ANO1)'#10'group by 1,2,3'#10'order by 1,2,3) CLIEN' +
+ 'TES_NUEVOS on ((OBJETIVOS.id_agente = CLIENTES_NUEVOS.id_agente)' +
+ ' and (OBJETIVOS.ano = CLIENTES_NUEVOS.ANO) and (OBJETIVOS.semest' +
+ 're = CLIENTES_NUEVOS.SEMESTRE))'#10#10'left join'#10'(select ID_AGENTE, co' +
+ 'unt(ID_CLIENTE) as CANTIDAD'#10'from v_inf_obj_clientes_agentes'#10'grou' +
+ 'p by 1'#10'order by 1) CLIENTES_TOTALES on (OBJETIVOS.id_agente = CL' +
+ 'IENTES_TOTALES.id_agente)'#10#10'where {where}'#10#10#10#10#10#10#10#10
StatementType = stSQL
ColumnMappings = <
item
@@ -2312,6 +2418,22 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
item
DatasetField = 'ID_AGENTE'
TableField = 'ID_AGENTE'
+ end
+ item
+ DatasetField = 'ALTAS_CLIENTE'
+ TableField = 'ALTAS_CLIENTE'
+ end
+ item
+ DatasetField = 'CLIENTES_TOTALES'
+ TableField = 'CLIENTES_TOTALES'
+ end
+ item
+ DatasetField = 'IMPORTE_MEDIO_UNIDAD'
+ TableField = 'IMPORTE_MEDIO_UNIDAD'
+ end
+ item
+ DatasetField = 'IMPORTE_MEDIO_CLIENTE'
+ TableField = 'IMPORTE_MEDIO_CLIENTE'
end>
end>
Name = 'InformeListadoObjetivosSemestral'
@@ -2338,6 +2460,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
DataType = datString
Size = 20
end
+ item
+ Name = 'ALTAS_CLIENTE'
+ DataType = datInteger
+ end
+ item
+ Name = 'CLIENTES_TOTALES'
+ DataType = datInteger
+ end
item
Name = 'CANTIDAD_OBJETIVO'
DataType = datLargeInt
@@ -2369,6 +2499,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
item
Name = 'IMPORTE_RESULTADO'
DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_MEDIO_UNIDAD'
+ DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_MEDIO_CLIENTE'
+ DataType = datCurrency
end>
end>
JoinDataTables = <>
@@ -3627,6 +3765,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
DataType = datString
Size = 20
end
+ item
+ Name = 'ALTAS_CLIENTE'
+ DataType = datInteger
+ end
+ item
+ Name = 'CLIENTES_TOTALES'
+ DataType = datInteger
+ end
item
Name = 'CANTIDAD_OBJETIVO'
DataType = datLargeInt
@@ -3658,6 +3804,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
item
Name = 'IMPORTE_RESULTADO'
DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_MEDIO_UNIDAD'
+ DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_MEDIO_CLIENTE'
+ DataType = datCurrency
end>
Params = <
item
@@ -3703,6 +3857,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
DataType = datString
Size = 20
end
+ item
+ Name = 'ALTAS_CLIENTE'
+ DataType = datInteger
+ end
+ item
+ Name = 'CLIENTES_TOTALES'
+ DataType = datInteger
+ end
item
Name = 'CANTIDAD_OBJETIVO'
DataType = datLargeInt
@@ -3734,6 +3896,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
item
Name = 'IMPORTE_RESULTADO'
DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_MEDIO_UNIDAD'
+ DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_MEDIO_CLIENTE'
+ DataType = datCurrency
end>
Params = <
item
@@ -3779,6 +3949,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
DataType = datString
Size = 20
end
+ item
+ Name = 'ALTAS_CLIENTE'
+ DataType = datInteger
+ end
+ item
+ Name = 'CLIENTES_TOTALES'
+ DataType = datInteger
+ end
item
Name = 'CANTIDAD_OBJETIVO'
DataType = datLargeInt
@@ -3810,6 +3988,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
item
Name = 'IMPORTE_RESULTADO'
DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_MEDIO_UNIDAD'
+ DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_MEDIO_CLIENTE'
+ DataType = datCurrency
end>
Params = <
item
diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm
index 9750807..5e8812b 100644
--- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm
+++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm
@@ -132,6 +132,7 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
end
end
inherited tbxFiltro: TTBXToolbar
+ DockPos = -6
ExplicitWidth = 427
inherited lblAno: TTBXLabelItem
Visible = True
diff --git a/Source/Modulos/Contactos/Controller/Contactos_controller.identcache b/Source/Modulos/Contactos/Controller/Contactos_controller.identcache
index c4783ad..16d6d7e 100644
Binary files a/Source/Modulos/Contactos/Controller/Contactos_controller.identcache and b/Source/Modulos/Contactos/Controller/Contactos_controller.identcache differ
diff --git a/Source/Modulos/Contactos/Controller/uAgentesController.pas b/Source/Modulos/Contactos/Controller/uAgentesController.pas
index 9cc7363..83051c7 100644
--- a/Source/Modulos/Contactos/Controller/uAgentesController.pas
+++ b/Source/Modulos/Contactos/Controller/uAgentesController.pas
@@ -12,6 +12,8 @@ type
['{73A25A90-020F-4403-B7A1-55C06CE648D9}']
function EsEliminable(AAgente: IBizContacto): Boolean;
function Eliminar(AAgente: IBizContacto; AllItems: Boolean = false): Boolean; overload;
+ function DarListaAnosObjetivosAlbaranesAgente(ID_AGENTE: Integer): TStringList;
+ function DarListaAnosObjetivosFacturasAgente(ID_AGENTE: Integer): TStringList;
end;
TAgentesController = class(TContactosController, IAgentesController)
@@ -34,6 +36,8 @@ type
function Eliminar(AAgente: IBizContacto; AllItems: Boolean = false): Boolean; overload;
function EsEliminable(AAgente: IBizContacto): Boolean;
+ function DarListaAnosObjetivosAlbaranesAgente(ID_AGENTE: Integer): TStringList;
+ function DarListaAnosObjetivosFacturasAgente(ID_AGENTE: Integer): TStringList;
end;
implementation
@@ -63,6 +67,16 @@ begin
FDataModule := TDataModuleAgentes.Create(Nil);
end;
+function TAgentesController.DarListaAnosObjetivosAlbaranesAgente(ID_AGENTE: Integer): TStringList;
+begin
+ Result := (FDataModule as IDataModuleAgentes).GetAnosObjetivosAlbaranesItems(ID_AGENTE);
+end;
+
+function TAgentesController.DarListaAnosObjetivosFacturasAgente(ID_AGENTE: Integer): TStringList;
+begin
+ Result := (FDataModule as IDataModuleAgentes).GetAnosObjetivosAlbaranesItems(ID_AGENTE);
+end;
+
function TAgentesController.Duplicar(AContacto: IBizContacto): IBizContacto;
begin
Result := inherited Duplicar(AContacto);
diff --git a/Source/Modulos/Contactos/Data/uDataModuleAgentes.dfm b/Source/Modulos/Contactos/Data/uDataModuleAgentes.dfm
index 0ffd736..8479a28 100644
--- a/Source/Modulos/Contactos/Data/uDataModuleAgentes.dfm
+++ b/Source/Modulos/Contactos/Data/uDataModuleAgentes.dfm
@@ -1,5 +1,5 @@
inherited DataModuleAgentes: TDataModuleAgentes
- Height = 302
+ Height = 423
Width = 543
inherited ds_Contactos: TDADataSource
DataSet = tbl_Contactos.Dataset
@@ -13,6 +13,15 @@ inherited DataModuleAgentes: TDataModuleAgentes
inherited ds_PersonalContacto: TDADataSource
DataSet = tbl_PersonalContacto.Dataset
end
+ inherited tbl_ListaAnosObjetivosAlb: TDAMemDataTable
+ Left = 56
+ Top = 264
+ end
+ inherited ds_ListaAnosObjetivosAlb: TDADataSource
+ DataSet = tbl_ListaAnosObjetivosAlb.Dataset
+ Left = 56
+ Top = 208
+ end
object tbl_Agentes: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
@@ -197,7 +206,7 @@ inherited DataModuleAgentes: TDataModuleAgentes
DataSet = tbl_Agentes.Dataset
DataTable = tbl_Agentes
Left = 328
- Top = 160
+ Top = 152
end
object tbl_Agentes_Comisiones: TDAMemDataTable
RemoteUpdatesOptions = []
@@ -252,4 +261,157 @@ inherited DataModuleAgentes: TDataModuleAgentes
Left = 456
Top = 160
end
+ object tbl_Agentes_Objetivos_albaranes: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'ID'
+ DataType = datAutoInc
+ GeneratorName = 'GEN_OBJETIVOS_ALB_ID'
+ Required = True
+ DictionaryEntry = 'Agentes_Objetivos_albaranes_ID'
+ InPrimaryKey = True
+ end
+ item
+ Name = 'ID_AGENTE'
+ DataType = datInteger
+ DisplayLabel = 'Agentes_Objetivos_albaranes_ID_AGENTE'
+ DictionaryEntry = 'Agentes_Objetivos_albaranes_ID_AGENTE'
+ end
+ item
+ Name = 'ANO'
+ DataType = datSmallInt
+ DisplayLabel = 'Agentes_Objetivos_albaranes_ANO'
+ DictionaryEntry = 'Agentes_Objetivos_albaranes_ANO'
+ end
+ item
+ Name = 'MES'
+ DataType = datSmallInt
+ DisplayLabel = 'Agentes_Objetivos_albaranes_MES'
+ DictionaryEntry = 'Agentes_Objetivos_albaranes_MES'
+ end
+ item
+ Name = 'DESCRIPCION'
+ DataType = datString
+ Size = 20
+ end
+ item
+ Name = 'UNIDADES_OBJETIVO'
+ DataType = datSmallInt
+ DisplayLabel = 'Agentes_Objetivos_albaranes_UNIDADES_OBJETIVO'
+ DictionaryEntry = 'Agentes_Objetivos_albaranes_UNIDADES_OBJETIVO'
+ end
+ item
+ Name = 'IMPORTE_OBJETIVO'
+ DataType = datCurrency
+ DisplayLabel = 'Agentes_Objetivos_albaranes_IMPORTE_OBJETIVO'
+ DictionaryEntry = 'Agentes_Objetivos_albaranes_IMPORTE_OBJETIVO'
+ end>
+ Params = <>
+ MasterMappingMode = mmWhere
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = rda_Contactos
+ MasterSource = ds_Agentes
+ MasterFields = 'ID'
+ DetailFields = 'ID_AGENTE'
+ LogicalName = 'Agentes_Objetivos_albaranes'
+ IndexDefs = <>
+ Left = 176
+ Top = 344
+ end
+ object ds_Agentes_Objetivos_albaranes: TDADataSource
+ DataSet = tbl_Agentes_Objetivos_albaranes.Dataset
+ DataTable = tbl_Agentes_Objetivos_albaranes
+ Left = 176
+ Top = 288
+ end
+ object tbl_Agentes_Objetivos_facturas: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'ID'
+ DataType = datAutoInc
+ GeneratorName = 'GEN_OBJETIVOS_FAC_ID'
+ Required = True
+ DictionaryEntry = 'Agentes_Objetivos_facturas_ID'
+ InPrimaryKey = True
+ end
+ item
+ Name = 'ID_AGENTE'
+ DataType = datInteger
+ DisplayLabel = 'Agentes_Objetivos_facturas_ID_AGENTE'
+ DictionaryEntry = 'Agentes_Objetivos_facturas_ID_AGENTE'
+ end
+ item
+ Name = 'ANO'
+ DataType = datSmallInt
+ DisplayLabel = 'Agentes_Objetivos_facturas_ANO'
+ DictionaryEntry = 'Agentes_Objetivos_facturas_ANO'
+ end
+ item
+ Name = 'MES'
+ DataType = datSmallInt
+ DisplayLabel = 'Agentes_Objetivos_facturas_MES'
+ DictionaryEntry = 'Agentes_Objetivos_facturas_MES'
+ end
+ item
+ Name = 'DESCRIPCION'
+ DataType = datString
+ Size = 20
+ end
+ item
+ Name = 'UNIDADES_OBJETIVO'
+ DataType = datSmallInt
+ DisplayLabel = 'Agentes_Objetivos_facturas_UNIDADES_OBJETIVO'
+ DictionaryEntry = 'Agentes_Objetivos_facturas_UNIDADES_OBJETIVO'
+ end
+ item
+ Name = 'IMPORTE_OBJETIVO'
+ DataType = datCurrency
+ DisplayLabel = 'Agentes_Objetivos_facturas_IMPORTE_OBJETIVO'
+ DictionaryEntry = 'Agentes_Objetivos_facturas_IMPORTE_OBJETIVO'
+ end>
+ Params = <>
+ MasterMappingMode = mmWhere
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = rda_Contactos
+ MasterSource = ds_Agentes
+ MasterFields = 'ID'
+ DetailFields = 'ID_AGENTE'
+ LogicalName = 'Agentes_Objetivos_facturas'
+ IndexDefs = <>
+ Left = 384
+ Top = 344
+ end
+ object ds_Agentes_Objetivos_facturas: TDADataSource
+ DataSet = tbl_Agentes_Objetivos_facturas.Dataset
+ DataTable = tbl_Agentes_Objetivos_facturas
+ Left = 384
+ Top = 288
+ end
+ object tbl_ListaAnosObjetivosFac: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'ANO'
+ DataType = datSmallInt
+ end>
+ Params = <
+ item
+ Name = 'ID_AGENTE'
+ Value = ''
+ end>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = rda_Contactos
+ LogicalName = 'ListaAnosObjetivosFac'
+ IndexDefs = <>
+ Left = 56
+ Top = 368
+ end
+ object ds_ListaAnosObjetivosFac: TDADataSource
+ DataSet = tbl_ListaAnosObjetivosFac.Dataset
+ DataTable = tbl_ListaAnosObjetivosFac
+ Left = 56
+ Top = 320
+ end
end
diff --git a/Source/Modulos/Contactos/Data/uDataModuleAgentes.pas b/Source/Modulos/Contactos/Data/uDataModuleAgentes.pas
index be7eb41..582b2e1 100644
--- a/Source/Modulos/Contactos/Data/uDataModuleAgentes.pas
+++ b/Source/Modulos/Contactos/Data/uDataModuleAgentes.pas
@@ -9,7 +9,8 @@ uses
uROClient, uROBinMessage, uROWinInetHttpChannel, uBizGruposEmpleado, uROTypes,
uIDataModuleAgentes, uBizContactos, uDADesigntimeCall,
uDAInterfaces, uDAMemDataTable, uDADataStreamer, uDABin2DataStreamer,
- uDARemoteDataAdapter, uIntegerListUtils, uBizAgentesComisiones;
+ uDARemoteDataAdapter, uIntegerListUtils, uBizAgentesComisiones, uBizAgentesObjetivosAlbaranes,
+ uBizAgentesObjetivosFacturas;
type
TDataModuleAgentes = class(TDataModuleContactos, IDataModuleAgentes)
@@ -17,13 +18,22 @@ type
ds_Agentes: TDADataSource;
tbl_Agentes_Comisiones: TDAMemDataTable;
ds_Agentes_Comisiones: TDADataSource;
+ tbl_Agentes_Objetivos_albaranes: TDAMemDataTable;
+ ds_Agentes_Objetivos_albaranes: TDADataSource;
+ tbl_Agentes_Objetivos_facturas: TDAMemDataTable;
+ ds_Agentes_Objetivos_facturas: TDADataSource;
+ tbl_ListaAnosObjetivosFac: TDAMemDataTable;
+ ds_ListaAnosObjetivosFac: TDADataSource;
protected
function _GetComisiones: IBizAgentesComisiones;
+ function _GetObjetivosAlbaranes: IBizAgentesObjetivosAlbaranes;
+ function _GetObjetivosFacturas: IBizAgentesObjetivosFacturas;
public
function GetItem(const ID : Integer) : IBizAgente;
function NewItem : IBizAgente;
function GetItems : IBizAgente;
-
+ function GetAnosObjetivosAlbaranesItems(ID_AGENTE:Integer) : TStringList;
+ function GetAnosObjetivosFacturasItems(ID_AGENTE:Integer) : TStringList;
end;
@@ -37,6 +47,56 @@ uses
{ TDataModuleVendedores }
+function TDataModuleAgentes.GetAnosObjetivosAlbaranesItems(ID_AGENTE: Integer): TStringList;
+var
+ AListaAnos: TStringList;
+begin
+ AListaAnos := TStringList.Create;
+ ShowHourglassCursor;
+ try
+ with tbl_ListaAnosObjetivosAlb do
+ begin
+ ParamByName(fld_Agentes_Objetivos_albaranesID_AGENTE).AsInteger := ID_AGENTE;
+ Open;
+ First;
+ while not eof do
+ begin
+ AListaAnos.Add(Format('%s=%s', [Fields[0].AsString, Fields[0].AsString]));
+ Next;
+ end;
+ Close;
+ end;
+ Result := AListaAnos;
+ finally
+ HideHourglassCursor;
+ end;
+end;
+
+function TDataModuleAgentes.GetAnosObjetivosFacturasItems(ID_AGENTE: Integer): TStringList;
+var
+ AListaAnos: TStringList;
+begin
+ AListaAnos := TStringList.Create;
+ ShowHourglassCursor;
+ try
+ with tbl_ListaAnosObjetivosFac do
+ begin
+ ParamByName(fld_Agentes_Objetivos_facturasID_AGENTE).AsInteger := ID_AGENTE;
+ Open;
+ First;
+ while not eof do
+ begin
+ AListaAnos.Add(Format('%s=%s', [Fields[0].AsString, Fields[0].AsString]));
+ Next;
+ end;
+ Close;
+ end;
+ Result := AListaAnos;
+ finally
+ HideHourglassCursor;
+ end;
+end;
+
function TDataModuleAgentes.GetItem(const ID: Integer): IBizAgente;
var
Condicion: TDAWhereExpression;
@@ -73,7 +133,9 @@ begin
with TBizAgente(AContacto.BusinessEventsObj) do
begin
DatosBancarios := _GetDatosBancarios;
- Comisiones := _GetComisiones;
+ Comisiones := _GetComisiones;
+ ObjetivosAlbaranes := _GetObjetivosAlbaranes;
+ ObjetivosFacturas := _GetObjetivosFacturas;
end;
Result := (AContacto as IBizAgente);
@@ -106,4 +168,42 @@ begin
end;
end;
+function TDataModuleAgentes._GetObjetivosAlbaranes: IBizAgentesObjetivosAlbaranes;
+var
+ AObjetivosAlbaranes : TDAMemDataTable;
+begin
+ ShowHourglassCursor;
+ try
+ AObjetivosAlbaranes := CloneDataTable(tbl_Agentes_Objetivos_albaranes);
+ with AObjetivosAlbaranes do
+ begin
+ BusinessRulesID := BIZ_CLIENT_AGENTE_OBJETIVOS_ALB;
+ DetailOptions := DetailOptions -
+ [dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates];
+ end;
+ Result := (AObjetivosAlbaranes as IBizAgentesObjetivosAlbaranes);
+ finally
+ HideHourglassCursor;
+ end;
+end;
+
+function TDataModuleAgentes._GetObjetivosFacturas: IBizAgentesObjetivosFacturas;
+var
+ AObjetivosFacturas : TDAMemDataTable;
+begin
+ ShowHourglassCursor;
+ try
+ AObjetivosFacturas := CloneDataTable(tbl_Agentes_Objetivos_facturas);
+ with AObjetivosFacturas do
+ begin
+ BusinessRulesID := BIZ_CLIENT_AGENTE_OBJETIVOS_FAC;
+ DetailOptions := DetailOptions -
+ [dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates];
+ end;
+ Result := (AObjetivosFacturas as IBizAgentesObjetivosFacturas);
+ finally
+ HideHourglassCursor;
+ end;
+end;
+
end.
diff --git a/Source/Modulos/Contactos/Data/uDataModuleContactos.dfm b/Source/Modulos/Contactos/Data/uDataModuleContactos.dfm
index c4f0542..a214a42 100644
--- a/Source/Modulos/Contactos/Data/uDataModuleContactos.dfm
+++ b/Source/Modulos/Contactos/Data/uDataModuleContactos.dfm
@@ -491,4 +491,29 @@ inherited DataModuleContactos: TDataModuleContactos
Left = 456
Top = 80
end
+ object tbl_ListaAnosObjetivosAlb: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'ANO'
+ DataType = datSmallInt
+ end>
+ Params = <
+ item
+ Name = 'ID_AGENTE'
+ Value = ''
+ end>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = rda_Contactos
+ LogicalName = 'ListaAnosObjetivosAlb'
+ IndexDefs = <>
+ Left = 352
+ Top = 192
+ end
+ object ds_ListaAnosObjetivosAlb: TDADataSource
+ DataSet = tbl_ListaAnosObjetivosAlb.Dataset
+ DataTable = tbl_ListaAnosObjetivosAlb
+ Left = 352
+ Top = 144
+ end
end
diff --git a/Source/Modulos/Contactos/Data/uDataModuleContactos.pas b/Source/Modulos/Contactos/Data/uDataModuleContactos.pas
index f559c5b..501d41b 100644
--- a/Source/Modulos/Contactos/Data/uDataModuleContactos.pas
+++ b/Source/Modulos/Contactos/Data/uDataModuleContactos.pas
@@ -27,6 +27,8 @@ type
ds_DatosBancarios: TDADataSource;
tbl_PersonalContacto: TDAMemDataTable;
ds_PersonalContacto: TDADataSource;
+ tbl_ListaAnosObjetivosAlb: TDAMemDataTable;
+ ds_ListaAnosObjetivosAlb: TDADataSource;
procedure DAClientDataModuleCreate(Sender: TObject);
procedure DataModuleDestroy(Sender: TObject);
public
diff --git a/Source/Modulos/Contactos/Model/Contactos_model.dpk b/Source/Modulos/Contactos/Model/Contactos_model.dpk
index 785da70..d5dd4ed 100644
--- a/Source/Modulos/Contactos/Model/Contactos_model.dpk
+++ b/Source/Modulos/Contactos/Model/Contactos_model.dpk
@@ -57,6 +57,8 @@ contains
uBizContactosPersonal in 'uBizContactosPersonal.pas',
uIDataModuleAgentes in 'Data\uIDataModuleAgentes.pas',
uBizAgentesComisiones in 'uBizAgentesComisiones.pas',
- uBizClientesDescuentos in 'uBizClientesDescuentos.pas';
+ uBizClientesDescuentos in 'uBizClientesDescuentos.pas',
+ uBizAgentesObjetivosFacturas in 'uBizAgentesObjetivosFacturas.pas',
+ uBizAgentesObjetivosAlbaranes in 'uBizAgentesObjetivosAlbaranes.pas';
end.
diff --git a/Source/Modulos/Contactos/Model/Contactos_model.dproj b/Source/Modulos/Contactos/Model/Contactos_model.dproj
index 69b153b..2c9025c 100644
--- a/Source/Modulos/Contactos/Model/Contactos_model.dproj
+++ b/Source/Modulos/Contactos/Model/Contactos_model.dproj
@@ -69,6 +69,8 @@
+
+
diff --git a/Source/Modulos/Contactos/Model/Contactos_model.identcache b/Source/Modulos/Contactos/Model/Contactos_model.identcache
index 2410789..58f81fc 100644
Binary files a/Source/Modulos/Contactos/Model/Contactos_model.identcache and b/Source/Modulos/Contactos/Model/Contactos_model.identcache differ
diff --git a/Source/Modulos/Contactos/Model/Data/uIDataModuleAgentes.pas b/Source/Modulos/Contactos/Model/Data/uIDataModuleAgentes.pas
index 6cdfa08..5b36047 100644
--- a/Source/Modulos/Contactos/Model/Data/uIDataModuleAgentes.pas
+++ b/Source/Modulos/Contactos/Model/Data/uIDataModuleAgentes.pas
@@ -11,6 +11,8 @@ type
function GetItem(const ID : Integer) : IBizAgente;
function NewItem : IBizAgente;
function GetItems : IBizAgente;
+ function GetAnosObjetivosAlbaranesItems(ID_AGENTE:Integer) : TStringList;
+ function GetAnosObjetivosFacturasItems(ID_AGENTE:Integer) : TStringList;
end;
diff --git a/Source/Modulos/Contactos/Model/schContactosClient_Intf.pas b/Source/Modulos/Contactos/Model/schContactosClient_Intf.pas
index eb21c3a..0e17886 100644
--- a/Source/Modulos/Contactos/Model/schContactosClient_Intf.pas
+++ b/Source/Modulos/Contactos/Model/schContactosClient_Intf.pas
@@ -9,23 +9,25 @@ 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_Contactos = '{73E76622-E68E-4E54-8D43-4CF2C0133952}';
- RID_GruposCliente = '{45E72D8F-0603-4DEC-8249-C6A070C2F57D}';
- RID_DatosBancarios = '{804EE172-41B4-4212-BDF3-D3C90BCA26D7}';
- RID_Clientes = '{E126FB9B-877A-4FDC-9B19-E4CD83FC36EC}';
- RID_Proveedores = '{7AAC1B49-8346-48BD-B588-11D2726C3C79}';
- RID_Empleados = '{82B3EA4B-E778-46CD-A1E1-89D0A9D81B4A}';
- RID_DireccionesContacto = '{3DBEBC77-8915-4AE1-9D25-A0C09617FDF5}';
- RID_ClientesDescuentos = '{74A00521-E5C6-4F48-944A-022F11AED3DA}';
- RID_GruposProveedor = '{68F3A8F9-BF86-407D-A064-BACBDCF563C0}';
- RID_GruposEmpleado = '{8268F7D5-CCD5-442E-925E-C301E1097C85}';
- RID_Contactos_Refresh = '{2DFECCD0-0527-410C-94D3-51045B8A2129}';
- RID_ContratosEmpleados = '{7AE96ED9-D159-4D7E-8C89-75346A32ADE1}';
- RID_DescripcionesProveedores = '{069BAEB8-B983-4846-BB70-8A1197D2FB53}';
- RID_PersonalContacto = '{BD6A8B16-D07F-4B2A-816B-4856BA71003C}';
- RID_Agentes_Comisiones = '{C0E84515-ACA3-4079-AFBC-AE17C868A497}';
- RID_Agentes = '{1519A7FD-A033-4825-82F8-88430F204B40}';
- RID_ClientesDescuentosArticulos = '{01F7605E-C659-4BC8-A1D0-4BD5206E2015}';
+ RID_Contactos = '{C5CBBD15-3BE4-4CA7-8F63-6496108E58A4}';
+ RID_GruposCliente = '{A52B6D07-E18F-4B0B-BC19-322967C318C8}';
+ RID_DatosBancarios = '{C8B7B5A7-065B-484C-AAD0-003D7A0164CF}';
+ RID_Clientes = '{EE303315-836A-469E-802F-1D5E8E6E717C}';
+ RID_Proveedores = '{455D2B4C-679E-41FD-BCAF-E4A918936818}';
+ RID_Empleados = '{1619723C-2EC8-46E5-94EB-ED3F600CFA7F}';
+ RID_DireccionesContacto = '{61C30993-004A-4271-A751-F9F3CB6BE2AB}';
+ RID_ClientesDescuentos = '{7BB5EB78-1652-4284-AC1F-CD8CE965C041}';
+ RID_GruposProveedor = '{315F8232-27A0-4D35-A529-6840ECDDCCDA}';
+ RID_GruposEmpleado = '{0B578AD4-35EA-490B-BBE3-54A84AB00D4F}';
+ RID_Contactos_Refresh = '{BC90B1C9-6F9A-4D4B-8B93-A6B8B079E009}';
+ RID_ContratosEmpleados = '{11996FEA-CE9C-4EF5-9280-8F9656675856}';
+ RID_DescripcionesProveedores = '{24F427B2-1B99-4960-8115-78BA0BD21687}';
+ RID_PersonalContacto = '{1D1E9BC1-7AA8-492C-8A03-6835ABDA38C2}';
+ RID_Agentes_Comisiones = '{4D3CB44A-2E6A-45BD-A244-C0F5F9165D58}';
+ RID_Agentes = '{A705D009-CF13-4DE5-BCBE-57A82D161ADA}';
+ RID_ClientesDescuentosArticulos = '{9A572B85-9876-41E2-A85F-8F83E64B0D9F}';
+ RID_Agentes_Objetivos_albaranes = '{DC092C80-D84E-49FC-9240-EF1C6D629CBF}';
+ RID_Agentes_Objetivos_facturas = '{42D0ECBB-7A15-442C-8836-318A4CEB7F12}';
{ Data table names }
nme_Contactos = 'Contactos';
@@ -45,6 +47,8 @@ const
nme_Agentes_Comisiones = 'Agentes_Comisiones';
nme_Agentes = 'Agentes';
nme_ClientesDescuentosArticulos = 'ClientesDescuentosArticulos';
+ nme_Agentes_Objetivos_albaranes = 'Agentes_Objetivos_albaranes';
+ nme_Agentes_Objetivos_facturas = 'Agentes_Objetivos_facturas';
{ Contactos fields }
fld_ContactosID = 'ID';
@@ -608,10 +612,46 @@ const
idx_ClientesDescuentosArticulosPRECIO_NETO = 7;
idx_ClientesDescuentosArticulosDESCUENTO = 8;
+ { Agentes_Objetivos_albaranes fields }
+ fld_Agentes_Objetivos_albaranesID = 'ID';
+ fld_Agentes_Objetivos_albaranesID_AGENTE = 'ID_AGENTE';
+ fld_Agentes_Objetivos_albaranesANO = 'ANO';
+ fld_Agentes_Objetivos_albaranesMES = 'MES';
+ fld_Agentes_Objetivos_albaranesDESCRIPCION = 'DESCRIPCION';
+ fld_Agentes_Objetivos_albaranesUNIDADES_OBJETIVO = 'UNIDADES_OBJETIVO';
+ fld_Agentes_Objetivos_albaranesIMPORTE_OBJETIVO = 'IMPORTE_OBJETIVO';
+
+ { Agentes_Objetivos_albaranes field indexes }
+ idx_Agentes_Objetivos_albaranesID = 0;
+ idx_Agentes_Objetivos_albaranesID_AGENTE = 1;
+ idx_Agentes_Objetivos_albaranesANO = 2;
+ idx_Agentes_Objetivos_albaranesMES = 3;
+ idx_Agentes_Objetivos_albaranesDESCRIPCION = 4;
+ idx_Agentes_Objetivos_albaranesUNIDADES_OBJETIVO = 5;
+ idx_Agentes_Objetivos_albaranesIMPORTE_OBJETIVO = 6;
+
+ { Agentes_Objetivos_facturas fields }
+ fld_Agentes_Objetivos_facturasID = 'ID';
+ fld_Agentes_Objetivos_facturasID_AGENTE = 'ID_AGENTE';
+ fld_Agentes_Objetivos_facturasANO = 'ANO';
+ fld_Agentes_Objetivos_facturasMES = 'MES';
+ fld_Agentes_Objetivos_facturasDESCRIPCION = 'DESCRIPCION';
+ fld_Agentes_Objetivos_facturasUNIDADES_OBJETIVO = 'UNIDADES_OBJETIVO';
+ fld_Agentes_Objetivos_facturasIMPORTE_OBJETIVO = 'IMPORTE_OBJETIVO';
+
+ { Agentes_Objetivos_facturas field indexes }
+ idx_Agentes_Objetivos_facturasID = 0;
+ idx_Agentes_Objetivos_facturasID_AGENTE = 1;
+ idx_Agentes_Objetivos_facturasANO = 2;
+ idx_Agentes_Objetivos_facturasMES = 3;
+ idx_Agentes_Objetivos_facturasDESCRIPCION = 4;
+ idx_Agentes_Objetivos_facturasUNIDADES_OBJETIVO = 5;
+ idx_Agentes_Objetivos_facturasIMPORTE_OBJETIVO = 6;
+
type
{ IContactos }
IContactos = interface(IDAStronglyTypedDataTable)
- ['{15E48301-28F2-4343-941D-F57A4F1E872C}']
+ ['{317413A0-0416-4786-B3DF-CED31C64267C}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -910,7 +950,7 @@ type
{ IGruposCliente }
IGruposCliente = interface(IDAStronglyTypedDataTable)
- ['{603CA907-F464-44F1-B226-90DCE9B311F0}']
+ ['{CBEADB2A-FABA-4564-95CF-D424E5D08DEB}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -957,7 +997,7 @@ type
{ IDatosBancarios }
IDatosBancarios = interface(IDAStronglyTypedDataTable)
- ['{A02C7CD4-5B0E-4921-A52F-BCDBC7184EE1}']
+ ['{D09E0DDD-206F-46A0-B377-B90630DF657A}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -1088,7 +1128,7 @@ type
{ IClientes }
IClientes = interface(IDAStronglyTypedDataTable)
- ['{F84E18B1-A927-460D-A61A-D8F2AEC3B27B}']
+ ['{1F4485B0-9B81-4D1A-86F4-6AAE01FE860F}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -1615,7 +1655,7 @@ type
{ IProveedores }
IProveedores = interface(IDAStronglyTypedDataTable)
- ['{963E3F56-5FAE-45FC-ABFE-FB3D1C073DB9}']
+ ['{9DF8DF39-679B-44AD-AF28-353E78CA6D58}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -2106,7 +2146,7 @@ type
{ IEmpleados }
IEmpleados = interface(IDAStronglyTypedDataTable)
- ['{81506F17-5BB5-426F-A456-11CB21C60105}']
+ ['{D196D4B6-2743-4FA8-8844-3F4738D5C8C8}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -2537,7 +2577,7 @@ type
{ IDireccionesContacto }
IDireccionesContacto = interface(IDAStronglyTypedDataTable)
- ['{97DD1397-1579-4845-A0A7-E1A17D761524}']
+ ['{F2C90D00-9A04-4BEA-8733-0018317A6263}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -2752,7 +2792,7 @@ type
{ IClientesDescuentos }
IClientesDescuentos = interface(IDAStronglyTypedDataTable)
- ['{DD44B189-7678-4AEB-A0B7-95485B6E4086}']
+ ['{011971A4-38C7-4C40-9C16-E5550E7FC00C}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -2835,7 +2875,7 @@ type
{ IGruposProveedor }
IGruposProveedor = interface(IDAStronglyTypedDataTable)
- ['{5D7E6BE9-D5F2-4B5D-B3EA-4BA497851657}']
+ ['{27780311-09B1-42F1-A8C6-438EE41E961A}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -2882,7 +2922,7 @@ type
{ IGruposEmpleado }
IGruposEmpleado = interface(IDAStronglyTypedDataTable)
- ['{BED5B926-03C6-4721-AF4E-BFEC5BC86F80}']
+ ['{CEF6810B-71BF-4669-B221-F3331CE7470D}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -2929,7 +2969,7 @@ type
{ IContactos_Refresh }
IContactos_Refresh = interface(IDAStronglyTypedDataTable)
- ['{517988F7-BF2A-479A-99FE-E79D80963C54}']
+ ['{6C1E01C6-A541-49E4-932B-DCB0AB7C8F0B}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -3204,7 +3244,7 @@ type
{ IContratosEmpleados }
IContratosEmpleados = interface(IDAStronglyTypedDataTable)
- ['{4FD3C122-8E08-4C82-9BCE-63B0B43A198E}']
+ ['{F2C5D384-2EC9-4003-A30A-B367A42E1036}']
{ Property getters and setters }
function GetCONTRATOValue: String;
procedure SetCONTRATOValue(const aValue: String);
@@ -3239,7 +3279,7 @@ type
{ IDescripcionesProveedores }
IDescripcionesProveedores = interface(IDAStronglyTypedDataTable)
- ['{4B127909-A8AC-47F7-A9A0-2FE188052553}']
+ ['{81AD7666-E0E0-4308-A44B-DEA172886D84}']
{ Property getters and setters }
function GetDESCRIPCION_PROVEEDORValue: String;
procedure SetDESCRIPCION_PROVEEDORValue(const aValue: String);
@@ -3274,7 +3314,7 @@ type
{ IPersonalContacto }
IPersonalContacto = interface(IDAStronglyTypedDataTable)
- ['{A2B94517-310F-4530-8756-1B4C7BB2B583}']
+ ['{130FF6B0-6814-4E96-A023-B4A3B791848F}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -3417,7 +3457,7 @@ type
{ IAgentes_Comisiones }
IAgentes_Comisiones = interface(IDAStronglyTypedDataTable)
- ['{179C4684-309E-4318-B25B-D1D1CEB9F242}']
+ ['{B72C6A25-D915-47C8-AFF1-88B19136DFE8}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -3500,7 +3540,7 @@ type
{ IAgentes }
IAgentes = interface(IDAStronglyTypedDataTable)
- ['{25606DBC-D690-4FE7-8D02-BD3BFFA09E6C}']
+ ['{D52CFB4C-E5C9-4067-9F0F-F35260F53D95}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -3835,7 +3875,7 @@ type
{ IClientesDescuentosArticulos }
IClientesDescuentosArticulos = interface(IDAStronglyTypedDataTable)
- ['{C7514438-0B9E-4912-91FE-FEC0847CA141}']
+ ['{6DB3E96E-A996-4A28-A2D6-874BC3B4D1AF}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -3964,6 +4004,220 @@ type
end;
+ { IAgentes_Objetivos_albaranes }
+ IAgentes_Objetivos_albaranes = interface(IDAStronglyTypedDataTable)
+ ['{CFCD1E75-CA07-4C58-B697-58AB0E9DCD6F}']
+ { Property getters and setters }
+ function GetIDValue: Integer;
+ procedure SetIDValue(const aValue: Integer);
+ function GetIDIsNull: Boolean;
+ procedure SetIDIsNull(const aValue: Boolean);
+ function GetID_AGENTEValue: Integer;
+ procedure SetID_AGENTEValue(const aValue: Integer);
+ function GetID_AGENTEIsNull: Boolean;
+ procedure SetID_AGENTEIsNull(const aValue: Boolean);
+ function GetANOValue: SmallInt;
+ procedure SetANOValue(const aValue: SmallInt);
+ function GetANOIsNull: Boolean;
+ procedure SetANOIsNull(const aValue: Boolean);
+ function GetMESValue: SmallInt;
+ procedure SetMESValue(const aValue: SmallInt);
+ function GetMESIsNull: Boolean;
+ procedure SetMESIsNull(const aValue: Boolean);
+ function GetDESCRIPCIONValue: String;
+ procedure SetDESCRIPCIONValue(const aValue: String);
+ function GetDESCRIPCIONIsNull: Boolean;
+ procedure SetDESCRIPCIONIsNull(const aValue: Boolean);
+ function GetUNIDADES_OBJETIVOValue: SmallInt;
+ procedure SetUNIDADES_OBJETIVOValue(const aValue: SmallInt);
+ function GetUNIDADES_OBJETIVOIsNull: Boolean;
+ procedure SetUNIDADES_OBJETIVOIsNull(const aValue: Boolean);
+ function GetIMPORTE_OBJETIVOValue: Currency;
+ procedure SetIMPORTE_OBJETIVOValue(const aValue: Currency);
+ function GetIMPORTE_OBJETIVOIsNull: Boolean;
+ procedure SetIMPORTE_OBJETIVOIsNull(const aValue: Boolean);
+
+
+ { Properties }
+ property ID: Integer read GetIDValue write SetIDValue;
+ property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
+ property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue;
+ property ID_AGENTEIsNull: Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull;
+ property ANO: SmallInt read GetANOValue write SetANOValue;
+ property ANOIsNull: Boolean read GetANOIsNull write SetANOIsNull;
+ property MES: SmallInt read GetMESValue write SetMESValue;
+ property MESIsNull: Boolean read GetMESIsNull write SetMESIsNull;
+ property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
+ property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
+ property UNIDADES_OBJETIVO: SmallInt read GetUNIDADES_OBJETIVOValue write SetUNIDADES_OBJETIVOValue;
+ property UNIDADES_OBJETIVOIsNull: Boolean read GetUNIDADES_OBJETIVOIsNull write SetUNIDADES_OBJETIVOIsNull;
+ property IMPORTE_OBJETIVO: Currency read GetIMPORTE_OBJETIVOValue write SetIMPORTE_OBJETIVOValue;
+ property IMPORTE_OBJETIVOIsNull: Boolean read GetIMPORTE_OBJETIVOIsNull write SetIMPORTE_OBJETIVOIsNull;
+ end;
+
+ { TAgentes_Objetivos_albaranesDataTableRules }
+ TAgentes_Objetivos_albaranesDataTableRules = class(TIntfObjectDADataTableRules, IAgentes_Objetivos_albaranes)
+ private
+ protected
+ { Property getters and setters }
+ function GetIDValue: Integer; virtual;
+ procedure SetIDValue(const aValue: Integer); virtual;
+ function GetIDIsNull: Boolean; virtual;
+ procedure SetIDIsNull(const aValue: Boolean); virtual;
+ function GetID_AGENTEValue: Integer; virtual;
+ procedure SetID_AGENTEValue(const aValue: Integer); virtual;
+ function GetID_AGENTEIsNull: Boolean; virtual;
+ procedure SetID_AGENTEIsNull(const aValue: Boolean); virtual;
+ function GetANOValue: SmallInt; virtual;
+ procedure SetANOValue(const aValue: SmallInt); virtual;
+ function GetANOIsNull: Boolean; virtual;
+ procedure SetANOIsNull(const aValue: Boolean); virtual;
+ function GetMESValue: SmallInt; virtual;
+ procedure SetMESValue(const aValue: SmallInt); virtual;
+ function GetMESIsNull: Boolean; virtual;
+ procedure SetMESIsNull(const aValue: Boolean); virtual;
+ function GetDESCRIPCIONValue: String; virtual;
+ procedure SetDESCRIPCIONValue(const aValue: String); virtual;
+ function GetDESCRIPCIONIsNull: Boolean; virtual;
+ procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
+ function GetUNIDADES_OBJETIVOValue: SmallInt; virtual;
+ procedure SetUNIDADES_OBJETIVOValue(const aValue: SmallInt); virtual;
+ function GetUNIDADES_OBJETIVOIsNull: Boolean; virtual;
+ procedure SetUNIDADES_OBJETIVOIsNull(const aValue: Boolean); virtual;
+ function GetIMPORTE_OBJETIVOValue: Currency; virtual;
+ procedure SetIMPORTE_OBJETIVOValue(const aValue: Currency); virtual;
+ function GetIMPORTE_OBJETIVOIsNull: Boolean; virtual;
+ procedure SetIMPORTE_OBJETIVOIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property ID: Integer read GetIDValue write SetIDValue;
+ property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
+ property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue;
+ property ID_AGENTEIsNull: Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull;
+ property ANO: SmallInt read GetANOValue write SetANOValue;
+ property ANOIsNull: Boolean read GetANOIsNull write SetANOIsNull;
+ property MES: SmallInt read GetMESValue write SetMESValue;
+ property MESIsNull: Boolean read GetMESIsNull write SetMESIsNull;
+ property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
+ property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
+ property UNIDADES_OBJETIVO: SmallInt read GetUNIDADES_OBJETIVOValue write SetUNIDADES_OBJETIVOValue;
+ property UNIDADES_OBJETIVOIsNull: Boolean read GetUNIDADES_OBJETIVOIsNull write SetUNIDADES_OBJETIVOIsNull;
+ property IMPORTE_OBJETIVO: Currency read GetIMPORTE_OBJETIVOValue write SetIMPORTE_OBJETIVOValue;
+ property IMPORTE_OBJETIVOIsNull: Boolean read GetIMPORTE_OBJETIVOIsNull write SetIMPORTE_OBJETIVOIsNull;
+
+ public
+ constructor Create(aDataTable: TDADataTable); override;
+ destructor Destroy; override;
+
+ end;
+
+ { IAgentes_Objetivos_facturas }
+ IAgentes_Objetivos_facturas = interface(IDAStronglyTypedDataTable)
+ ['{9CF904E4-C6C9-41E5-8C64-0633B59BE86A}']
+ { Property getters and setters }
+ function GetIDValue: Integer;
+ procedure SetIDValue(const aValue: Integer);
+ function GetIDIsNull: Boolean;
+ procedure SetIDIsNull(const aValue: Boolean);
+ function GetID_AGENTEValue: Integer;
+ procedure SetID_AGENTEValue(const aValue: Integer);
+ function GetID_AGENTEIsNull: Boolean;
+ procedure SetID_AGENTEIsNull(const aValue: Boolean);
+ function GetANOValue: SmallInt;
+ procedure SetANOValue(const aValue: SmallInt);
+ function GetANOIsNull: Boolean;
+ procedure SetANOIsNull(const aValue: Boolean);
+ function GetMESValue: SmallInt;
+ procedure SetMESValue(const aValue: SmallInt);
+ function GetMESIsNull: Boolean;
+ procedure SetMESIsNull(const aValue: Boolean);
+ function GetDESCRIPCIONValue: String;
+ procedure SetDESCRIPCIONValue(const aValue: String);
+ function GetDESCRIPCIONIsNull: Boolean;
+ procedure SetDESCRIPCIONIsNull(const aValue: Boolean);
+ function GetUNIDADES_OBJETIVOValue: SmallInt;
+ procedure SetUNIDADES_OBJETIVOValue(const aValue: SmallInt);
+ function GetUNIDADES_OBJETIVOIsNull: Boolean;
+ procedure SetUNIDADES_OBJETIVOIsNull(const aValue: Boolean);
+ function GetIMPORTE_OBJETIVOValue: Currency;
+ procedure SetIMPORTE_OBJETIVOValue(const aValue: Currency);
+ function GetIMPORTE_OBJETIVOIsNull: Boolean;
+ procedure SetIMPORTE_OBJETIVOIsNull(const aValue: Boolean);
+
+
+ { Properties }
+ property ID: Integer read GetIDValue write SetIDValue;
+ property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
+ property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue;
+ property ID_AGENTEIsNull: Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull;
+ property ANO: SmallInt read GetANOValue write SetANOValue;
+ property ANOIsNull: Boolean read GetANOIsNull write SetANOIsNull;
+ property MES: SmallInt read GetMESValue write SetMESValue;
+ property MESIsNull: Boolean read GetMESIsNull write SetMESIsNull;
+ property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
+ property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
+ property UNIDADES_OBJETIVO: SmallInt read GetUNIDADES_OBJETIVOValue write SetUNIDADES_OBJETIVOValue;
+ property UNIDADES_OBJETIVOIsNull: Boolean read GetUNIDADES_OBJETIVOIsNull write SetUNIDADES_OBJETIVOIsNull;
+ property IMPORTE_OBJETIVO: Currency read GetIMPORTE_OBJETIVOValue write SetIMPORTE_OBJETIVOValue;
+ property IMPORTE_OBJETIVOIsNull: Boolean read GetIMPORTE_OBJETIVOIsNull write SetIMPORTE_OBJETIVOIsNull;
+ end;
+
+ { TAgentes_Objetivos_facturasDataTableRules }
+ TAgentes_Objetivos_facturasDataTableRules = class(TIntfObjectDADataTableRules, IAgentes_Objetivos_facturas)
+ private
+ protected
+ { Property getters and setters }
+ function GetIDValue: Integer; virtual;
+ procedure SetIDValue(const aValue: Integer); virtual;
+ function GetIDIsNull: Boolean; virtual;
+ procedure SetIDIsNull(const aValue: Boolean); virtual;
+ function GetID_AGENTEValue: Integer; virtual;
+ procedure SetID_AGENTEValue(const aValue: Integer); virtual;
+ function GetID_AGENTEIsNull: Boolean; virtual;
+ procedure SetID_AGENTEIsNull(const aValue: Boolean); virtual;
+ function GetANOValue: SmallInt; virtual;
+ procedure SetANOValue(const aValue: SmallInt); virtual;
+ function GetANOIsNull: Boolean; virtual;
+ procedure SetANOIsNull(const aValue: Boolean); virtual;
+ function GetMESValue: SmallInt; virtual;
+ procedure SetMESValue(const aValue: SmallInt); virtual;
+ function GetMESIsNull: Boolean; virtual;
+ procedure SetMESIsNull(const aValue: Boolean); virtual;
+ function GetDESCRIPCIONValue: String; virtual;
+ procedure SetDESCRIPCIONValue(const aValue: String); virtual;
+ function GetDESCRIPCIONIsNull: Boolean; virtual;
+ procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
+ function GetUNIDADES_OBJETIVOValue: SmallInt; virtual;
+ procedure SetUNIDADES_OBJETIVOValue(const aValue: SmallInt); virtual;
+ function GetUNIDADES_OBJETIVOIsNull: Boolean; virtual;
+ procedure SetUNIDADES_OBJETIVOIsNull(const aValue: Boolean); virtual;
+ function GetIMPORTE_OBJETIVOValue: Currency; virtual;
+ procedure SetIMPORTE_OBJETIVOValue(const aValue: Currency); virtual;
+ function GetIMPORTE_OBJETIVOIsNull: Boolean; virtual;
+ procedure SetIMPORTE_OBJETIVOIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property ID: Integer read GetIDValue write SetIDValue;
+ property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
+ property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue;
+ property ID_AGENTEIsNull: Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull;
+ property ANO: SmallInt read GetANOValue write SetANOValue;
+ property ANOIsNull: Boolean read GetANOIsNull write SetANOIsNull;
+ property MES: SmallInt read GetMESValue write SetMESValue;
+ property MESIsNull: Boolean read GetMESIsNull write SetMESIsNull;
+ property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
+ property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
+ property UNIDADES_OBJETIVO: SmallInt read GetUNIDADES_OBJETIVOValue write SetUNIDADES_OBJETIVOValue;
+ property UNIDADES_OBJETIVOIsNull: Boolean read GetUNIDADES_OBJETIVOIsNull write SetUNIDADES_OBJETIVOIsNull;
+ property IMPORTE_OBJETIVO: Currency read GetIMPORTE_OBJETIVOValue write SetIMPORTE_OBJETIVOValue;
+ property IMPORTE_OBJETIVOIsNull: Boolean read GetIMPORTE_OBJETIVOIsNull write SetIMPORTE_OBJETIVOIsNull;
+
+ public
+ constructor Create(aDataTable: TDADataTable); override;
+ destructor Destroy; override;
+
+ end;
+
implementation
uses Variants, uROBinaryHelpers;
@@ -9428,6 +9682,324 @@ begin
end;
+{ TAgentes_Objetivos_albaranesDataTableRules }
+constructor TAgentes_Objetivos_albaranesDataTableRules.Create(aDataTable: TDADataTable);
+begin
+ inherited;
+end;
+
+destructor TAgentes_Objetivos_albaranesDataTableRules.Destroy;
+begin
+ inherited;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetIDValue: Integer;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesID].AsInteger;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetIDValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesID].AsInteger := aValue;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetIDIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesID].IsNull;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesID].AsVariant := Null;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetID_AGENTEValue: Integer;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesID_AGENTE].AsInteger;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetID_AGENTEValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesID_AGENTE].AsInteger := aValue;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetID_AGENTEIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesID_AGENTE].IsNull;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetID_AGENTEIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesID_AGENTE].AsVariant := Null;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetANOValue: SmallInt;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesANO].AsSmallInt;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetANOValue(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesANO].AsSmallInt := aValue;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetANOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesANO].IsNull;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetANOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesANO].AsVariant := Null;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetMESValue: SmallInt;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesMES].AsSmallInt;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetMESValue(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesMES].AsSmallInt := aValue;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetMESIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesMES].IsNull;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetMESIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesMES].AsVariant := Null;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetDESCRIPCIONValue: String;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesDESCRIPCION].AsString;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetDESCRIPCIONValue(const aValue: String);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesDESCRIPCION].AsString := aValue;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetDESCRIPCIONIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesDESCRIPCION].IsNull;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesDESCRIPCION].AsVariant := Null;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetUNIDADES_OBJETIVOValue: SmallInt;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesUNIDADES_OBJETIVO].AsSmallInt;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetUNIDADES_OBJETIVOValue(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesUNIDADES_OBJETIVO].AsSmallInt := aValue;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetUNIDADES_OBJETIVOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesUNIDADES_OBJETIVO].IsNull;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetUNIDADES_OBJETIVOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesUNIDADES_OBJETIVO].AsVariant := Null;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetIMPORTE_OBJETIVOValue: Currency;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesIMPORTE_OBJETIVO].AsCurrency;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetIMPORTE_OBJETIVOValue(const aValue: Currency);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesIMPORTE_OBJETIVO].AsCurrency := aValue;
+end;
+
+function TAgentes_Objetivos_albaranesDataTableRules.GetIMPORTE_OBJETIVOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_albaranesIMPORTE_OBJETIVO].IsNull;
+end;
+
+procedure TAgentes_Objetivos_albaranesDataTableRules.SetIMPORTE_OBJETIVOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_albaranesIMPORTE_OBJETIVO].AsVariant := Null;
+end;
+
+
+{ TAgentes_Objetivos_facturasDataTableRules }
+constructor TAgentes_Objetivos_facturasDataTableRules.Create(aDataTable: TDADataTable);
+begin
+ inherited;
+end;
+
+destructor TAgentes_Objetivos_facturasDataTableRules.Destroy;
+begin
+ inherited;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetIDValue: Integer;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasID].AsInteger;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetIDValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_facturasID].AsInteger := aValue;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetIDIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasID].IsNull;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_facturasID].AsVariant := Null;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetID_AGENTEValue: Integer;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasID_AGENTE].AsInteger;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetID_AGENTEValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_facturasID_AGENTE].AsInteger := aValue;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetID_AGENTEIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasID_AGENTE].IsNull;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetID_AGENTEIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_facturasID_AGENTE].AsVariant := Null;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetANOValue: SmallInt;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasANO].AsSmallInt;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetANOValue(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_facturasANO].AsSmallInt := aValue;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetANOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasANO].IsNull;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetANOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_facturasANO].AsVariant := Null;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetMESValue: SmallInt;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasMES].AsSmallInt;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetMESValue(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_facturasMES].AsSmallInt := aValue;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetMESIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasMES].IsNull;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetMESIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_facturasMES].AsVariant := Null;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetDESCRIPCIONValue: String;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasDESCRIPCION].AsString;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetDESCRIPCIONValue(const aValue: String);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_facturasDESCRIPCION].AsString := aValue;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetDESCRIPCIONIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasDESCRIPCION].IsNull;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_facturasDESCRIPCION].AsVariant := Null;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetUNIDADES_OBJETIVOValue: SmallInt;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasUNIDADES_OBJETIVO].AsSmallInt;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetUNIDADES_OBJETIVOValue(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_facturasUNIDADES_OBJETIVO].AsSmallInt := aValue;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetUNIDADES_OBJETIVOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasUNIDADES_OBJETIVO].IsNull;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetUNIDADES_OBJETIVOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_facturasUNIDADES_OBJETIVO].AsVariant := Null;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetIMPORTE_OBJETIVOValue: Currency;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasIMPORTE_OBJETIVO].AsCurrency;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetIMPORTE_OBJETIVOValue(const aValue: Currency);
+begin
+ DataTable.Fields[idx_Agentes_Objetivos_facturasIMPORTE_OBJETIVO].AsCurrency := aValue;
+end;
+
+function TAgentes_Objetivos_facturasDataTableRules.GetIMPORTE_OBJETIVOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_Agentes_Objetivos_facturasIMPORTE_OBJETIVO].IsNull;
+end;
+
+procedure TAgentes_Objetivos_facturasDataTableRules.SetIMPORTE_OBJETIVOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_Agentes_Objetivos_facturasIMPORTE_OBJETIVO].AsVariant := Null;
+end;
+
+
initialization
RegisterDataTableRules(RID_Contactos, TContactosDataTableRules);
RegisterDataTableRules(RID_GruposCliente, TGruposClienteDataTableRules);
@@ -9446,5 +10018,7 @@ initialization
RegisterDataTableRules(RID_Agentes_Comisiones, TAgentes_ComisionesDataTableRules);
RegisterDataTableRules(RID_Agentes, TAgentesDataTableRules);
RegisterDataTableRules(RID_ClientesDescuentosArticulos, TClientesDescuentosArticulosDataTableRules);
+ RegisterDataTableRules(RID_Agentes_Objetivos_albaranes, TAgentes_Objetivos_albaranesDataTableRules);
+ RegisterDataTableRules(RID_Agentes_Objetivos_facturas, TAgentes_Objetivos_facturasDataTableRules);
end.
diff --git a/Source/Modulos/Contactos/Model/schContactosServer_Intf.pas b/Source/Modulos/Contactos/Model/schContactosServer_Intf.pas
index 54ff128..2f260e7 100644
--- a/Source/Modulos/Contactos/Model/schContactosServer_Intf.pas
+++ b/Source/Modulos/Contactos/Model/schContactosServer_Intf.pas
@@ -9,28 +9,30 @@ 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_ContactosDelta = '{7A909B9F-42DB-4F5E-9196-701C75D36EA0}';
- RID_GruposClienteDelta = '{C390D31D-6B7D-4B6B-8E58-CF78E94E2C39}';
- RID_DatosBancariosDelta = '{E4C4932D-2A40-43F6-83D8-CD8E515CEE60}';
- RID_ClientesDelta = '{06D05072-BF91-44B6-9A86-0E8B21188BED}';
- RID_ProveedoresDelta = '{1407A6EF-EB6A-46E0-B05D-DE0F54F454EA}';
- RID_EmpleadosDelta = '{88CFAB04-0E48-42E1-95A2-E8FADEA9EB9D}';
- RID_DireccionesContactoDelta = '{D6D2C551-BD80-45C4-B1A3-0620D02F4A8A}';
- RID_ClientesDescuentosDelta = '{0CF31B52-833B-465C-A26D-59130E5036C0}';
- RID_GruposProveedorDelta = '{F5A41EE1-F855-4068-B284-A97803A3D915}';
- RID_GruposEmpleadoDelta = '{DEDEA112-7918-4E5C-8461-E23255FE4D36}';
- RID_Contactos_RefreshDelta = '{171B4B4C-6FC2-42C8-9501-6A4D6778FFEC}';
- RID_ContratosEmpleadosDelta = '{7FE81E95-B103-474F-B285-CDC9E3F17752}';
- RID_DescripcionesProveedoresDelta = '{0003F3A5-5D40-41C0-B825-B9AF9C4425F3}';
- RID_PersonalContactoDelta = '{3125474E-8DBB-485C-88C4-59A0B3F36003}';
- RID_Agentes_ComisionesDelta = '{6B1753B7-D35B-425E-B5EE-F2EA602F189F}';
- RID_AgentesDelta = '{DCFA7D35-E0D6-4CE4-9943-F781494F7F30}';
- RID_ClientesDescuentosArticulosDelta = '{9A4A1E14-FAAE-4FC4-A0E9-5257C40CF4C4}';
+ RID_ContactosDelta = '{39416DA5-238E-47E9-A82E-07A239049EBA}';
+ RID_GruposClienteDelta = '{83DA4B0F-90DA-4C55-98B9-D7B0478B54C9}';
+ RID_DatosBancariosDelta = '{E2CF54FC-D385-4E34-8AD9-468F613370CC}';
+ RID_ClientesDelta = '{6AB5F06E-ACE1-497F-95A8-2CD68F8261F4}';
+ RID_ProveedoresDelta = '{D1324DD1-75FC-4241-9ECD-36627E80BCB5}';
+ RID_EmpleadosDelta = '{D96A5955-19DA-44B3-86F8-0217EFFF2F5C}';
+ RID_DireccionesContactoDelta = '{B40A76E6-E740-434E-B16F-532A638CB575}';
+ RID_ClientesDescuentosDelta = '{472998E9-FA58-4385-9053-4A3F1138EE6D}';
+ RID_GruposProveedorDelta = '{AF56FDBF-7D39-442D-8F87-4549F09DAA21}';
+ RID_GruposEmpleadoDelta = '{0C4E4FAD-76EE-4B82-81A3-77CF6DC35199}';
+ RID_Contactos_RefreshDelta = '{2ED30DD9-C801-43B1-97FC-765DC9FB8BCC}';
+ RID_ContratosEmpleadosDelta = '{0B6CD4CF-4DBB-42A9-A3FD-94974C3E5B46}';
+ RID_DescripcionesProveedoresDelta = '{408A90EF-AED2-40AB-9FE0-46D1EA721B5A}';
+ RID_PersonalContactoDelta = '{F8381C5C-B8F8-4F56-B56D-A333E064353E}';
+ RID_Agentes_ComisionesDelta = '{CD1B8807-E14C-453F-9ACF-F53DA26E6DAB}';
+ RID_AgentesDelta = '{D43A0810-3E6F-4735-8CC0-4636179FCBBB}';
+ RID_ClientesDescuentosArticulosDelta = '{6D6683CD-C6F3-47CE-913B-CF19B9A1A038}';
+ RID_Agentes_Objetivos_albaranesDelta = '{FAB9F379-D856-452E-B39B-03CDF32BC20F}';
+ RID_Agentes_Objetivos_facturasDelta = '{7EEB2D8D-FDFD-454A-AC8D-261AA6F4DC82}';
type
{ IContactosDelta }
IContactosDelta = interface(IContactos)
- ['{7A909B9F-42DB-4F5E-9196-701C75D36EA0}']
+ ['{39416DA5-238E-47E9-A82E-07A239049EBA}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CATEGORIAValue : Integer;
@@ -329,7 +331,7 @@ type
{ IGruposClienteDelta }
IGruposClienteDelta = interface(IGruposCliente)
- ['{C390D31D-6B7D-4B6B-8E58-CF78E94E2C39}']
+ ['{83DA4B0F-90DA-4C55-98B9-D7B0478B54C9}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldDESCRIPCIONValue : String;
@@ -375,7 +377,7 @@ type
{ IDatosBancariosDelta }
IDatosBancariosDelta = interface(IDatosBancarios)
- ['{E4C4932D-2A40-43F6-83D8-CD8E515CEE60}']
+ ['{E2CF54FC-D385-4E34-8AD9-468F613370CC}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CONTACTOValue : Integer;
@@ -505,7 +507,7 @@ type
{ IClientesDelta }
IClientesDelta = interface(IClientes)
- ['{06D05072-BF91-44B6-9A86-0E8B21188BED}']
+ ['{6AB5F06E-ACE1-497F-95A8-2CD68F8261F4}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CATEGORIAValue : Integer;
@@ -1032,7 +1034,7 @@ type
{ IProveedoresDelta }
IProveedoresDelta = interface(IProveedores)
- ['{1407A6EF-EB6A-46E0-B05D-DE0F54F454EA}']
+ ['{D1324DD1-75FC-4241-9ECD-36627E80BCB5}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CATEGORIAValue : Integer;
@@ -1523,7 +1525,7 @@ type
{ IEmpleadosDelta }
IEmpleadosDelta = interface(IEmpleados)
- ['{88CFAB04-0E48-42E1-95A2-E8FADEA9EB9D}']
+ ['{D96A5955-19DA-44B3-86F8-0217EFFF2F5C}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CATEGORIAValue : Integer;
@@ -1958,7 +1960,7 @@ type
{ IDireccionesContactoDelta }
IDireccionesContactoDelta = interface(IDireccionesContacto)
- ['{D6D2C551-BD80-45C4-B1A3-0620D02F4A8A}']
+ ['{B40A76E6-E740-434E-B16F-532A638CB575}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CONTACTOValue : Integer;
@@ -2173,7 +2175,7 @@ type
{ IClientesDescuentosDelta }
IClientesDescuentosDelta = interface(IClientesDescuentos)
- ['{0CF31B52-833B-465C-A26D-59130E5036C0}']
+ ['{472998E9-FA58-4385-9053-4A3F1138EE6D}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CLIENTEValue : Integer;
@@ -2255,7 +2257,7 @@ type
{ IGruposProveedorDelta }
IGruposProveedorDelta = interface(IGruposProveedor)
- ['{F5A41EE1-F855-4068-B284-A97803A3D915}']
+ ['{AF56FDBF-7D39-442D-8F87-4549F09DAA21}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldDESCRIPCIONValue : String;
@@ -2301,7 +2303,7 @@ type
{ IGruposEmpleadoDelta }
IGruposEmpleadoDelta = interface(IGruposEmpleado)
- ['{DEDEA112-7918-4E5C-8461-E23255FE4D36}']
+ ['{0C4E4FAD-76EE-4B82-81A3-77CF6DC35199}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldDESCRIPCIONValue : String;
@@ -2347,7 +2349,7 @@ type
{ IContactos_RefreshDelta }
IContactos_RefreshDelta = interface(IContactos_Refresh)
- ['{171B4B4C-6FC2-42C8-9501-6A4D6778FFEC}']
+ ['{2ED30DD9-C801-43B1-97FC-765DC9FB8BCC}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldNIF_CIFValue : String;
@@ -2622,7 +2624,7 @@ type
{ IContratosEmpleadosDelta }
IContratosEmpleadosDelta = interface(IContratosEmpleados)
- ['{7FE81E95-B103-474F-B285-CDC9E3F17752}']
+ ['{0B6CD4CF-4DBB-42A9-A3FD-94974C3E5B46}']
{ Property getters and setters }
function GetOldCONTRATOValue : String;
@@ -2656,7 +2658,7 @@ type
{ IDescripcionesProveedoresDelta }
IDescripcionesProveedoresDelta = interface(IDescripcionesProveedores)
- ['{0003F3A5-5D40-41C0-B825-B9AF9C4425F3}']
+ ['{408A90EF-AED2-40AB-9FE0-46D1EA721B5A}']
{ Property getters and setters }
function GetOldDESCRIPCION_PROVEEDORValue : String;
@@ -2690,7 +2692,7 @@ type
{ IPersonalContactoDelta }
IPersonalContactoDelta = interface(IPersonalContacto)
- ['{3125474E-8DBB-485C-88C4-59A0B3F36003}']
+ ['{F8381C5C-B8F8-4F56-B56D-A333E064353E}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CONTACTOValue : Integer;
@@ -2832,7 +2834,7 @@ type
{ IAgentes_ComisionesDelta }
IAgentes_ComisionesDelta = interface(IAgentes_Comisiones)
- ['{6B1753B7-D35B-425E-B5EE-F2EA602F189F}']
+ ['{CD1B8807-E14C-453F-9ACF-F53DA26E6DAB}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_AGENTEValue : Integer;
@@ -2914,7 +2916,7 @@ type
{ IAgentesDelta }
IAgentesDelta = interface(IAgentes)
- ['{DCFA7D35-E0D6-4CE4-9943-F781494F7F30}']
+ ['{D43A0810-3E6F-4735-8CC0-4636179FCBBB}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CATEGORIAValue : Integer;
@@ -3249,7 +3251,7 @@ type
{ IClientesDescuentosArticulosDelta }
IClientesDescuentosArticulosDelta = interface(IClientesDescuentosArticulos)
- ['{9A4A1E14-FAAE-4FC4-A0E9-5257C40CF4C4}']
+ ['{6D6683CD-C6F3-47CE-913B-CF19B9A1A038}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CLIENTEValue : Integer;
@@ -3377,6 +3379,218 @@ type
end;
+ { IAgentes_Objetivos_albaranesDelta }
+ IAgentes_Objetivos_albaranesDelta = interface(IAgentes_Objetivos_albaranes)
+ ['{FAB9F379-D856-452E-B39B-03CDF32BC20F}']
+ { Property getters and setters }
+ function GetOldIDValue : Integer;
+ function GetOldID_AGENTEValue : Integer;
+ function GetOldANOValue : SmallInt;
+ function GetOldMESValue : SmallInt;
+ function GetOldDESCRIPCIONValue : String;
+ function GetOldUNIDADES_OBJETIVOValue : SmallInt;
+ function GetOldIMPORTE_OBJETIVOValue : Currency;
+
+ { Properties }
+ property OldID : Integer read GetOldIDValue;
+ property OldID_AGENTE : Integer read GetOldID_AGENTEValue;
+ property OldANO : SmallInt read GetOldANOValue;
+ property OldMES : SmallInt read GetOldMESValue;
+ property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
+ property OldUNIDADES_OBJETIVO : SmallInt read GetOldUNIDADES_OBJETIVOValue;
+ property OldIMPORTE_OBJETIVO : Currency read GetOldIMPORTE_OBJETIVOValue;
+ end;
+
+ { TAgentes_Objetivos_albaranesBusinessProcessorRules }
+ TAgentes_Objetivos_albaranesBusinessProcessorRules = class(TDABusinessProcessorRules, IAgentes_Objetivos_albaranes, IAgentes_Objetivos_albaranesDelta)
+ private
+ protected
+ { Property getters and setters }
+ function GetIDValue: Integer; virtual;
+ function GetIDIsNull: Boolean; virtual;
+ function GetOldIDValue: Integer; virtual;
+ function GetOldIDIsNull: Boolean; virtual;
+ procedure SetIDValue(const aValue: Integer); virtual;
+ procedure SetIDIsNull(const aValue: Boolean); virtual;
+ function GetID_AGENTEValue: Integer; virtual;
+ function GetID_AGENTEIsNull: Boolean; virtual;
+ function GetOldID_AGENTEValue: Integer; virtual;
+ function GetOldID_AGENTEIsNull: Boolean; virtual;
+ procedure SetID_AGENTEValue(const aValue: Integer); virtual;
+ procedure SetID_AGENTEIsNull(const aValue: Boolean); virtual;
+ function GetANOValue: SmallInt; virtual;
+ function GetANOIsNull: Boolean; virtual;
+ function GetOldANOValue: SmallInt; virtual;
+ function GetOldANOIsNull: Boolean; virtual;
+ procedure SetANOValue(const aValue: SmallInt); virtual;
+ procedure SetANOIsNull(const aValue: Boolean); virtual;
+ function GetMESValue: SmallInt; virtual;
+ function GetMESIsNull: Boolean; virtual;
+ function GetOldMESValue: SmallInt; virtual;
+ function GetOldMESIsNull: Boolean; virtual;
+ procedure SetMESValue(const aValue: SmallInt); virtual;
+ procedure SetMESIsNull(const aValue: Boolean); virtual;
+ function GetDESCRIPCIONValue: String; virtual;
+ function GetDESCRIPCIONIsNull: Boolean; virtual;
+ function GetOldDESCRIPCIONValue: String; virtual;
+ function GetOldDESCRIPCIONIsNull: Boolean; virtual;
+ procedure SetDESCRIPCIONValue(const aValue: String); virtual;
+ procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
+ function GetUNIDADES_OBJETIVOValue: SmallInt; virtual;
+ function GetUNIDADES_OBJETIVOIsNull: Boolean; virtual;
+ function GetOldUNIDADES_OBJETIVOValue: SmallInt; virtual;
+ function GetOldUNIDADES_OBJETIVOIsNull: Boolean; virtual;
+ procedure SetUNIDADES_OBJETIVOValue(const aValue: SmallInt); virtual;
+ procedure SetUNIDADES_OBJETIVOIsNull(const aValue: Boolean); virtual;
+ function GetIMPORTE_OBJETIVOValue: Currency; virtual;
+ function GetIMPORTE_OBJETIVOIsNull: Boolean; virtual;
+ function GetOldIMPORTE_OBJETIVOValue: Currency; virtual;
+ function GetOldIMPORTE_OBJETIVOIsNull: Boolean; virtual;
+ procedure SetIMPORTE_OBJETIVOValue(const aValue: Currency); virtual;
+ procedure SetIMPORTE_OBJETIVOIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property ID : Integer read GetIDValue write SetIDValue;
+ property IDIsNull : Boolean read GetIDIsNull write SetIDIsNull;
+ property OldID : Integer read GetOldIDValue;
+ property OldIDIsNull : Boolean read GetOldIDIsNull;
+ property ID_AGENTE : Integer read GetID_AGENTEValue write SetID_AGENTEValue;
+ property ID_AGENTEIsNull : Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull;
+ property OldID_AGENTE : Integer read GetOldID_AGENTEValue;
+ property OldID_AGENTEIsNull : Boolean read GetOldID_AGENTEIsNull;
+ property ANO : SmallInt read GetANOValue write SetANOValue;
+ property ANOIsNull : Boolean read GetANOIsNull write SetANOIsNull;
+ property OldANO : SmallInt read GetOldANOValue;
+ property OldANOIsNull : Boolean read GetOldANOIsNull;
+ property MES : SmallInt read GetMESValue write SetMESValue;
+ property MESIsNull : Boolean read GetMESIsNull write SetMESIsNull;
+ property OldMES : SmallInt read GetOldMESValue;
+ property OldMESIsNull : Boolean read GetOldMESIsNull;
+ property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
+ property DESCRIPCIONIsNull : Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
+ property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
+ property OldDESCRIPCIONIsNull : Boolean read GetOldDESCRIPCIONIsNull;
+ property UNIDADES_OBJETIVO : SmallInt read GetUNIDADES_OBJETIVOValue write SetUNIDADES_OBJETIVOValue;
+ property UNIDADES_OBJETIVOIsNull : Boolean read GetUNIDADES_OBJETIVOIsNull write SetUNIDADES_OBJETIVOIsNull;
+ property OldUNIDADES_OBJETIVO : SmallInt read GetOldUNIDADES_OBJETIVOValue;
+ property OldUNIDADES_OBJETIVOIsNull : Boolean read GetOldUNIDADES_OBJETIVOIsNull;
+ property IMPORTE_OBJETIVO : Currency read GetIMPORTE_OBJETIVOValue write SetIMPORTE_OBJETIVOValue;
+ property IMPORTE_OBJETIVOIsNull : Boolean read GetIMPORTE_OBJETIVOIsNull write SetIMPORTE_OBJETIVOIsNull;
+ property OldIMPORTE_OBJETIVO : Currency read GetOldIMPORTE_OBJETIVOValue;
+ property OldIMPORTE_OBJETIVOIsNull : Boolean read GetOldIMPORTE_OBJETIVOIsNull;
+
+ public
+ constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
+ destructor Destroy; override;
+
+ end;
+
+ { IAgentes_Objetivos_facturasDelta }
+ IAgentes_Objetivos_facturasDelta = interface(IAgentes_Objetivos_facturas)
+ ['{7EEB2D8D-FDFD-454A-AC8D-261AA6F4DC82}']
+ { Property getters and setters }
+ function GetOldIDValue : Integer;
+ function GetOldID_AGENTEValue : Integer;
+ function GetOldANOValue : SmallInt;
+ function GetOldMESValue : SmallInt;
+ function GetOldDESCRIPCIONValue : String;
+ function GetOldUNIDADES_OBJETIVOValue : SmallInt;
+ function GetOldIMPORTE_OBJETIVOValue : Currency;
+
+ { Properties }
+ property OldID : Integer read GetOldIDValue;
+ property OldID_AGENTE : Integer read GetOldID_AGENTEValue;
+ property OldANO : SmallInt read GetOldANOValue;
+ property OldMES : SmallInt read GetOldMESValue;
+ property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
+ property OldUNIDADES_OBJETIVO : SmallInt read GetOldUNIDADES_OBJETIVOValue;
+ property OldIMPORTE_OBJETIVO : Currency read GetOldIMPORTE_OBJETIVOValue;
+ end;
+
+ { TAgentes_Objetivos_facturasBusinessProcessorRules }
+ TAgentes_Objetivos_facturasBusinessProcessorRules = class(TDABusinessProcessorRules, IAgentes_Objetivos_facturas, IAgentes_Objetivos_facturasDelta)
+ private
+ protected
+ { Property getters and setters }
+ function GetIDValue: Integer; virtual;
+ function GetIDIsNull: Boolean; virtual;
+ function GetOldIDValue: Integer; virtual;
+ function GetOldIDIsNull: Boolean; virtual;
+ procedure SetIDValue(const aValue: Integer); virtual;
+ procedure SetIDIsNull(const aValue: Boolean); virtual;
+ function GetID_AGENTEValue: Integer; virtual;
+ function GetID_AGENTEIsNull: Boolean; virtual;
+ function GetOldID_AGENTEValue: Integer; virtual;
+ function GetOldID_AGENTEIsNull: Boolean; virtual;
+ procedure SetID_AGENTEValue(const aValue: Integer); virtual;
+ procedure SetID_AGENTEIsNull(const aValue: Boolean); virtual;
+ function GetANOValue: SmallInt; virtual;
+ function GetANOIsNull: Boolean; virtual;
+ function GetOldANOValue: SmallInt; virtual;
+ function GetOldANOIsNull: Boolean; virtual;
+ procedure SetANOValue(const aValue: SmallInt); virtual;
+ procedure SetANOIsNull(const aValue: Boolean); virtual;
+ function GetMESValue: SmallInt; virtual;
+ function GetMESIsNull: Boolean; virtual;
+ function GetOldMESValue: SmallInt; virtual;
+ function GetOldMESIsNull: Boolean; virtual;
+ procedure SetMESValue(const aValue: SmallInt); virtual;
+ procedure SetMESIsNull(const aValue: Boolean); virtual;
+ function GetDESCRIPCIONValue: String; virtual;
+ function GetDESCRIPCIONIsNull: Boolean; virtual;
+ function GetOldDESCRIPCIONValue: String; virtual;
+ function GetOldDESCRIPCIONIsNull: Boolean; virtual;
+ procedure SetDESCRIPCIONValue(const aValue: String); virtual;
+ procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
+ function GetUNIDADES_OBJETIVOValue: SmallInt; virtual;
+ function GetUNIDADES_OBJETIVOIsNull: Boolean; virtual;
+ function GetOldUNIDADES_OBJETIVOValue: SmallInt; virtual;
+ function GetOldUNIDADES_OBJETIVOIsNull: Boolean; virtual;
+ procedure SetUNIDADES_OBJETIVOValue(const aValue: SmallInt); virtual;
+ procedure SetUNIDADES_OBJETIVOIsNull(const aValue: Boolean); virtual;
+ function GetIMPORTE_OBJETIVOValue: Currency; virtual;
+ function GetIMPORTE_OBJETIVOIsNull: Boolean; virtual;
+ function GetOldIMPORTE_OBJETIVOValue: Currency; virtual;
+ function GetOldIMPORTE_OBJETIVOIsNull: Boolean; virtual;
+ procedure SetIMPORTE_OBJETIVOValue(const aValue: Currency); virtual;
+ procedure SetIMPORTE_OBJETIVOIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property ID : Integer read GetIDValue write SetIDValue;
+ property IDIsNull : Boolean read GetIDIsNull write SetIDIsNull;
+ property OldID : Integer read GetOldIDValue;
+ property OldIDIsNull : Boolean read GetOldIDIsNull;
+ property ID_AGENTE : Integer read GetID_AGENTEValue write SetID_AGENTEValue;
+ property ID_AGENTEIsNull : Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull;
+ property OldID_AGENTE : Integer read GetOldID_AGENTEValue;
+ property OldID_AGENTEIsNull : Boolean read GetOldID_AGENTEIsNull;
+ property ANO : SmallInt read GetANOValue write SetANOValue;
+ property ANOIsNull : Boolean read GetANOIsNull write SetANOIsNull;
+ property OldANO : SmallInt read GetOldANOValue;
+ property OldANOIsNull : Boolean read GetOldANOIsNull;
+ property MES : SmallInt read GetMESValue write SetMESValue;
+ property MESIsNull : Boolean read GetMESIsNull write SetMESIsNull;
+ property OldMES : SmallInt read GetOldMESValue;
+ property OldMESIsNull : Boolean read GetOldMESIsNull;
+ property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
+ property DESCRIPCIONIsNull : Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
+ property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
+ property OldDESCRIPCIONIsNull : Boolean read GetOldDESCRIPCIONIsNull;
+ property UNIDADES_OBJETIVO : SmallInt read GetUNIDADES_OBJETIVOValue write SetUNIDADES_OBJETIVOValue;
+ property UNIDADES_OBJETIVOIsNull : Boolean read GetUNIDADES_OBJETIVOIsNull write SetUNIDADES_OBJETIVOIsNull;
+ property OldUNIDADES_OBJETIVO : SmallInt read GetOldUNIDADES_OBJETIVOValue;
+ property OldUNIDADES_OBJETIVOIsNull : Boolean read GetOldUNIDADES_OBJETIVOIsNull;
+ property IMPORTE_OBJETIVO : Currency read GetIMPORTE_OBJETIVOValue write SetIMPORTE_OBJETIVOValue;
+ property IMPORTE_OBJETIVOIsNull : Boolean read GetIMPORTE_OBJETIVOIsNull write SetIMPORTE_OBJETIVOIsNull;
+ property OldIMPORTE_OBJETIVO : Currency read GetOldIMPORTE_OBJETIVOValue;
+ property OldIMPORTE_OBJETIVOIsNull : Boolean read GetOldIMPORTE_OBJETIVOIsNull;
+
+ public
+ constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
+ destructor Destroy; override;
+
+ end;
+
implementation
uses
@@ -11323,6 +11537,464 @@ begin
end;
+{ TAgentes_Objetivos_albaranesBusinessProcessorRules }
+constructor TAgentes_Objetivos_albaranesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
+begin
+ inherited;
+end;
+
+destructor TAgentes_Objetivos_albaranesBusinessProcessorRules.Destroy;
+begin
+ inherited;
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetIDValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesID];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesID]);
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldIDValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesID];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesID]);
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetIDValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesID] := aValue;
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesID] := Null;
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetID_AGENTEValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesID_AGENTE];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetID_AGENTEIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesID_AGENTE]);
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldID_AGENTEValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesID_AGENTE];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldID_AGENTEIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesID_AGENTE]);
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetID_AGENTEValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesID_AGENTE] := aValue;
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetID_AGENTEIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesID_AGENTE] := Null;
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetANOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesANO];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetANOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesANO]);
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldANOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesANO];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldANOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesANO]);
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetANOValue(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesANO] := aValue;
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetANOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesANO] := Null;
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetMESValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesMES];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetMESIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesMES]);
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldMESValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesMES];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldMESIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesMES]);
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetMESValue(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesMES] := aValue;
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetMESIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesMES] := Null;
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetDESCRIPCIONValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesDESCRIPCION];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetDESCRIPCIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesDESCRIPCION]);
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldDESCRIPCIONValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesDESCRIPCION];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldDESCRIPCIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesDESCRIPCION]);
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesDESCRIPCION] := aValue;
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesDESCRIPCION] := Null;
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetUNIDADES_OBJETIVOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesUNIDADES_OBJETIVO];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetUNIDADES_OBJETIVOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesUNIDADES_OBJETIVO]);
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldUNIDADES_OBJETIVOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesUNIDADES_OBJETIVO];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldUNIDADES_OBJETIVOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesUNIDADES_OBJETIVO]);
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetUNIDADES_OBJETIVOValue(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesUNIDADES_OBJETIVO] := aValue;
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetUNIDADES_OBJETIVOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesUNIDADES_OBJETIVO] := Null;
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetIMPORTE_OBJETIVOValue: Currency;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesIMPORTE_OBJETIVO];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetIMPORTE_OBJETIVOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesIMPORTE_OBJETIVO]);
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldIMPORTE_OBJETIVOValue: Currency;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesIMPORTE_OBJETIVO];
+end;
+
+function TAgentes_Objetivos_albaranesBusinessProcessorRules.GetOldIMPORTE_OBJETIVOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_albaranesIMPORTE_OBJETIVO]);
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetIMPORTE_OBJETIVOValue(const aValue: Currency);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesIMPORTE_OBJETIVO] := aValue;
+end;
+
+procedure TAgentes_Objetivos_albaranesBusinessProcessorRules.SetIMPORTE_OBJETIVOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_albaranesIMPORTE_OBJETIVO] := Null;
+end;
+
+
+{ TAgentes_Objetivos_facturasBusinessProcessorRules }
+constructor TAgentes_Objetivos_facturasBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
+begin
+ inherited;
+end;
+
+destructor TAgentes_Objetivos_facturasBusinessProcessorRules.Destroy;
+begin
+ inherited;
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetIDValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasID];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasID]);
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldIDValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasID];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasID]);
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetIDValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasID] := aValue;
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasID] := Null;
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetID_AGENTEValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasID_AGENTE];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetID_AGENTEIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasID_AGENTE]);
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldID_AGENTEValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasID_AGENTE];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldID_AGENTEIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasID_AGENTE]);
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetID_AGENTEValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasID_AGENTE] := aValue;
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetID_AGENTEIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasID_AGENTE] := Null;
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetANOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasANO];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetANOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasANO]);
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldANOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasANO];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldANOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasANO]);
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetANOValue(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasANO] := aValue;
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetANOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasANO] := Null;
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetMESValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasMES];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetMESIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasMES]);
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldMESValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasMES];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldMESIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasMES]);
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetMESValue(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasMES] := aValue;
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetMESIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasMES] := Null;
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetDESCRIPCIONValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasDESCRIPCION];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetDESCRIPCIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasDESCRIPCION]);
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldDESCRIPCIONValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasDESCRIPCION];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldDESCRIPCIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasDESCRIPCION]);
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasDESCRIPCION] := aValue;
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasDESCRIPCION] := Null;
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetUNIDADES_OBJETIVOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasUNIDADES_OBJETIVO];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetUNIDADES_OBJETIVOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasUNIDADES_OBJETIVO]);
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldUNIDADES_OBJETIVOValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasUNIDADES_OBJETIVO];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldUNIDADES_OBJETIVOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasUNIDADES_OBJETIVO]);
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetUNIDADES_OBJETIVOValue(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasUNIDADES_OBJETIVO] := aValue;
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetUNIDADES_OBJETIVOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasUNIDADES_OBJETIVO] := Null;
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetIMPORTE_OBJETIVOValue: Currency;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasIMPORTE_OBJETIVO];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetIMPORTE_OBJETIVOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasIMPORTE_OBJETIVO]);
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldIMPORTE_OBJETIVOValue: Currency;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasIMPORTE_OBJETIVO];
+end;
+
+function TAgentes_Objetivos_facturasBusinessProcessorRules.GetOldIMPORTE_OBJETIVOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Agentes_Objetivos_facturasIMPORTE_OBJETIVO]);
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetIMPORTE_OBJETIVOValue(const aValue: Currency);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasIMPORTE_OBJETIVO] := aValue;
+end;
+
+procedure TAgentes_Objetivos_facturasBusinessProcessorRules.SetIMPORTE_OBJETIVOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_Agentes_Objetivos_facturasIMPORTE_OBJETIVO] := Null;
+end;
+
+
initialization
RegisterBusinessProcessorRules(RID_ContactosDelta, TContactosBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_GruposClienteDelta, TGruposClienteBusinessProcessorRules);
@@ -11341,5 +12013,7 @@ initialization
RegisterBusinessProcessorRules(RID_Agentes_ComisionesDelta, TAgentes_ComisionesBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_AgentesDelta, TAgentesBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_ClientesDescuentosArticulosDelta, TClientesDescuentosArticulosBusinessProcessorRules);
+ RegisterBusinessProcessorRules(RID_Agentes_Objetivos_albaranesDelta, TAgentes_Objetivos_albaranesBusinessProcessorRules);
+ RegisterBusinessProcessorRules(RID_Agentes_Objetivos_facturasDelta, TAgentes_Objetivos_facturasBusinessProcessorRules);
end.
diff --git a/Source/Modulos/Contactos/Model/uBizAgentesObjetivosAlbaranes.pas b/Source/Modulos/Contactos/Model/uBizAgentesObjetivosAlbaranes.pas
new file mode 100644
index 0000000..eb7a32a
--- /dev/null
+++ b/Source/Modulos/Contactos/Model/uBizAgentesObjetivosAlbaranes.pas
@@ -0,0 +1,44 @@
+unit uBizAgentesObjetivosAlbaranes;
+
+interface
+
+uses
+ uDAInterfaces, uDADataTable,
+ schContactosClient_Intf;
+
+const
+ BIZ_CLIENT_AGENTE_OBJETIVOS_ALB = 'Client.AgenteObjetivosAlbaranes';
+
+type
+ IBizAgentesObjetivosAlbaranes = interface (IAgentes_Objetivos_albaranes)
+ ['{248739B8-D2A0-45DC-9427-1F93FC96E7F0}']
+ end;
+
+ TBizAgentesObjetivosAlbaranes = class(TAgentes_Objetivos_AlbaranesDataTableRules, IBizAgentesObjetivosAlbaranes)
+ protected
+ procedure BeforeInsert(Sender: TDADataTable); override;
+ end;
+
+implementation
+
+{ TBizAgentesObjetivosAlbaranes }
+
+uses
+ DB;
+
+procedure TBizAgentesObjetivosAlbaranes.BeforeInsert(Sender: TDADataTable);
+var
+ AMasterTable : TDADataTable;
+begin
+ inherited;
+ AMasterTable := DataTable.GetMasterDataTable;
+ if Assigned(AMasterTable) and (AMasterTable.State in dsEditModes) then
+ AMasterTable.Post;
+end;
+
+
+initialization
+ RegisterDataTableRules(BIZ_CLIENT_AGENTE_OBJETIVOS_ALB, TBizAgentesObjetivosAlbaranes);
+
+end.
+
diff --git a/Source/Modulos/Contactos/Model/uBizAgentesObjetivosFacturas.pas b/Source/Modulos/Contactos/Model/uBizAgentesObjetivosFacturas.pas
new file mode 100644
index 0000000..8462651
--- /dev/null
+++ b/Source/Modulos/Contactos/Model/uBizAgentesObjetivosFacturas.pas
@@ -0,0 +1,44 @@
+unit uBizAgentesObjetivosFacturas;
+
+interface
+
+uses
+ uDAInterfaces, uDADataTable,
+ schContactosClient_Intf;
+
+const
+ BIZ_CLIENT_AGENTE_OBJETIVOS_FAC = 'Client.AgenteObjetivosFacturas';
+
+type
+ IBizAgentesObjetivosFacturas = interface (IAgentes_Objetivos_facturas)
+ ['{0063F6E3-D218-49BE-B4C0-96E1EE7A45A5}']
+ end;
+
+ TBizAgentesObjetivosFacturas = class(TAgentes_Objetivos_FacturasDataTableRules, IBizAgentesObjetivosFacturas)
+ protected
+ procedure BeforeInsert(Sender: TDADataTable); override;
+ end;
+
+implementation
+
+{ TBizAgentesObjetivosFacturas }
+
+uses
+ DB;
+
+procedure TBizAgentesObjetivosFacturas.BeforeInsert(Sender: TDADataTable);
+var
+ AMasterTable : TDADataTable;
+begin
+ inherited;
+ AMasterTable := DataTable.GetMasterDataTable;
+ if Assigned(AMasterTable) and (AMasterTable.State in dsEditModes) then
+ AMasterTable.Post;
+end;
+
+
+initialization
+ RegisterDataTableRules(BIZ_CLIENT_AGENTE_OBJETIVOS_FAC, TBizAgentesObjetivosFacturas);
+
+end.
+
diff --git a/Source/Modulos/Contactos/Model/uBizAgentesServer.pas b/Source/Modulos/Contactos/Model/uBizAgentesServer.pas
index ea3947d..feb9d65 100644
--- a/Source/Modulos/Contactos/Model/uBizAgentesServer.pas
+++ b/Source/Modulos/Contactos/Model/uBizAgentesServer.pas
@@ -23,7 +23,7 @@ type
implementation
uses
- uDataModuleServer, uDAClasses,
+ uDataModuleServer, uDAClasses, SysUtils, DateUtils,
schContactosClient_Intf, uBusinessUtils;
const
@@ -88,6 +88,19 @@ begin
finally
ACommand := NIL;
end;
+
+ ACommand := ASchema.NewCommand(ACurrentConn, 'Insert_ObjetivosAgentes');
+ try
+ with ACommand do
+ begin
+ ParamByName('ID_AGENTE').Value := aChange.NewValueByName[fld_AgentesID];
+ ParamByName('ANO').Value := YearOf(now);
+ Execute;
+ end;
+ finally
+ ACommand := NIL;
+ end;
+
end;
procedure TBizAgenteServer.Update_Datos_Contacto(aChange: TDADeltaChange);
@@ -114,6 +127,19 @@ begin
finally
ACommand := NIL;
end;
+
+ ACommand := ASchema.NewCommand(ACurrentConn, 'Insert_ObjetivosAgentes');
+ try
+ with ACommand do
+ begin
+ ParamByName('ID_AGENTE').Value := aChange.NewValueByName[fld_AgentesID];
+ ParamByName('ANO').Value := YearOf(now);
+ Execute;
+ end;
+ finally
+ ACommand := NIL;
+ end;
+
end;
initialization
diff --git a/Source/Modulos/Contactos/Model/uBizContactos.pas b/Source/Modulos/Contactos/Model/uBizContactos.pas
index d36fe88..a94322d 100644
--- a/Source/Modulos/Contactos/Model/uBizContactos.pas
+++ b/Source/Modulos/Contactos/Model/uBizContactos.pas
@@ -6,7 +6,7 @@ uses
uDAInterfaces, uDADataTable, uROClasses,
schContactosClient_Intf, uBizContactosDatosBancarios, uBizContactosPersonal,
uDBSelectionListUtils, uBizDireccionesContacto, uBizClientesDescuentos,
- uBizClientesDescuentosArt, uBizAgentesComisiones;
+ uBizClientesDescuentosArt, uBizAgentesComisiones, uBizAgentesObjetivosAlbaranes, uBizAgentesObjetivosFacturas;
const
BIZ_CLIENT_CONTACTO = 'Client.Contacto';
@@ -241,6 +241,14 @@ type
function GetComisiones: IBizAgentesComisiones;
procedure SetComisiones(Value: IBizAgentesComisiones);
property Comisiones: IBizAgentesComisiones read GetComisiones write SetComisiones;
+
+ function GetObjetivosAlbaranes: IBizAgentesObjetivosAlbaranes;
+ procedure SetObjetivosAlbaranes(Value: IBizAgentesObjetivosAlbaranes);
+ property ObjetivosAlbaranes: IBizAgentesObjetivosAlbaranes read GetObjetivosAlbaranes write SetObjetivosAlbaranes;
+
+ function GetObjetivosFacturas: IBizAgentesObjetivosFacturas;
+ procedure SetObjetivosFacturas(Value: IBizAgentesObjetivosFacturas);
+ property ObjetivosFacturas: IBizAgentesObjetivosFacturas read GetObjetivosFacturas write SetObjetivosFacturas;
end;
@@ -491,13 +499,27 @@ type
protected
FComisiones : IBizAgentesComisiones;
FComisionesLink : TDADataSource;
+ FObjetivosAlbaranes : IBizAgentesObjetivosAlbaranes;
+ FObjetivosAlbaranesLink : TDADataSource;
+ FObjetivosFacturas : IBizAgentesObjetivosFacturas;
+ FObjetivosFacturasLink : TDADataSource;
+
function GetComisiones: IBizAgentesComisiones;
procedure SetComisiones(Value: IBizAgentesComisiones);
+
+ function GetObjetivosAlbaranes: IBizAgentesObjetivosAlbaranes;
+ procedure SetObjetivosAlbaranes(Value: IBizAgentesObjetivosAlbaranes);
+
+ function GetObjetivosFacturas: IBizAgentesObjetivosFacturas;
+ procedure SetObjetivosFacturas(Value: IBizAgentesObjetivosFacturas);
+
public
procedure IniciarValoresContactoNuevo; override;
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
property Comisiones: IBizAgentesComisiones read GetComisiones write SetComisiones;
+ property ObjetivosAlbaranes: IBizAgentesObjetivosAlbaranes read GetObjetivosAlbaranes write SetObjetivosAlbaranes;
+ property ObjetivosFacturas: IBizAgentesObjetivosFacturas read GetObjetivosFacturas write SetObjetivosFacturas;
end;
implementation
@@ -1097,32 +1119,67 @@ begin
FComisiones := NIL;
FComisionesLink := TDADataSource.Create(NIL);
FComisionesLink.DataTable := aDataTable;
+
+ FObjetivosAlbaranes := NIL;
+ FObjetivosAlbaranesLink := TDADataSource.Create(NIL);
+ FObjetivosAlbaranesLink.DataTable := aDataTable;
+
+ FObjetivosFacturas := NIL;
+ FObjetivosFacturasLink := TDADataSource.Create(NIL);
+ FObjetivosFacturasLink.DataTable := aDataTable;
end;
destructor TBizAgente.Destroy;
begin
FComisiones := NIL;
FreeAndNIL(FComisionesLink);
+ FObjetivosAlbaranes := NIL;
+ FreeAndNIL(FObjetivosAlbaranesLink);
+ FObjetivosFacturas := NIL;
+ FreeAndNIL(FObjetivosFacturasLink);
+
inherited;
end;
+function TBizAgente.GetObjetivosFacturas: IBizAgentesObjetivosFacturas;
+begin
+ Result := FObjetivosFacturas;
+end;
+
function TBizAgente.GetComisiones: IBizAgentesComisiones;
begin
Result := FComisiones;
end;
+function TBizAgente.GetObjetivosAlbaranes: IBizAgentesObjetivosAlbaranes;
+begin
+ Result := FObjetivosAlbaranes;
+end;
+
procedure TBizAgente.IniciarValoresContactoNuevo;
begin
inherited;
ID_CATEGORIA := CATEGORIA_AGENTE;
end;
+procedure TBizAgente.SetObjetivosFacturas(Value: IBizAgentesObjetivosFacturas);
+begin
+ FObjetivosFacturas := Value;
+ EnlazarMaestroDetalle(FObjetivosFacturasLink, FObjetivosFacturas);
+end;
+
procedure TBizAgente.SetComisiones(Value: IBizAgentesComisiones);
begin
FComisiones := Value;
EnlazarMaestroDetalle(FComisionesLink, FComisiones);
end;
+procedure TBizAgente.SetObjetivosAlbaranes(Value: IBizAgentesObjetivosAlbaranes);
+begin
+ FObjetivosAlbaranes := Value;
+ EnlazarMaestroDetalle(FObjetivosAlbaranesLink, FObjetivosAlbaranes);
+end;
+
initialization
RegisterDataTableRules(BIZ_CLIENT_CONTACTO, TBizContacto);
diff --git a/Source/Modulos/Contactos/Servidor/srvContactos_Impl.dfm b/Source/Modulos/Contactos/Servidor/srvContactos_Impl.dfm
index b458ea4..9a6b89d 100644
--- a/Source/Modulos/Contactos/Servidor/srvContactos_Impl.dfm
+++ b/Source/Modulos/Contactos/Servidor/srvContactos_Impl.dfm
@@ -2270,6 +2270,35 @@ object srvContactos: TsrvContactos
DictionaryEntry = 'Agentes_Comisiones_COMISION'
end>
end
+ item
+ Params = <
+ item
+ Name = 'ID_AGENTE'
+ Value = ''
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ ConnectionType = 'Interbase'
+ Default = True
+ Name = 'IBX'
+ SQL =
+ 'select ANO from'#10'(select distinct(ANO) as ANO'#10'from AGENTES_OBJETI' +
+ 'VOS_ALB'#10'where (ID_AGENTE = :ID_AGENTE)'#10'order by 1 desc)'#10#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'ANO'
+ TableField = 'ANO'
+ end>
+ end>
+ Name = 'ListaAnosObjetivosAlb'
+ Fields = <
+ item
+ Name = 'ANO'
+ DataType = datSmallInt
+ end>
+ end
item
Params = <>
Statements = <
@@ -2639,6 +2668,204 @@ object srvContactos: TsrvContactos
DataType = datFloat
DictionaryEntry = 'ClientesDescuentos_DESCUENTO'
end>
+ end
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'IBX'
+ ConnectionType = 'Interbase'
+ Default = True
+ TargetTable = 'AGENTES_OBJETIVOS_ALB'
+ SQL =
+ 'SELECT '#10' A.ID, A.ID_AGENTE, A.ANO, A.MES, P.DESCRIPCION, A.UN' +
+ 'IDADES_OBJETIVO, A.IMPORTE_OBJETIVO'#10' FROM'#10' AGENTES_OBJETIVOS' +
+ '_ALB A'#10'left join periodos_aux P on ((P.periodo = '#39'MENSUAL'#39') and ' +
+ '(P.valor = A.MES))'#10' WHERE {Where}'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'ID'
+ TableField = 'ID'
+ end
+ item
+ DatasetField = 'ID_AGENTE'
+ TableField = 'ID_AGENTE'
+ end
+ item
+ DatasetField = 'ANO'
+ TableField = 'ANO'
+ end
+ item
+ DatasetField = 'MES'
+ TableField = 'MES'
+ end
+ item
+ DatasetField = 'UNIDADES_OBJETIVO'
+ TableField = 'UNIDADES_OBJETIVO'
+ end
+ item
+ DatasetField = 'IMPORTE_OBJETIVO'
+ TableField = 'IMPORTE_OBJETIVO'
+ end
+ item
+ DatasetField = 'DESCRIPCION'
+ TableField = ''
+ SQLOrigin = 'DESCRIPCION'
+ end>
+ end>
+ Name = 'Agentes_Objetivos_albaranes'
+ Fields = <
+ item
+ Name = 'ID'
+ DataType = datAutoInc
+ GeneratorName = 'GEN_OBJETIVOS_ALB_ID'
+ DictionaryEntry = 'Agentes_Objetivos_albaranes_ID'
+ InPrimaryKey = True
+ end
+ item
+ Name = 'ID_AGENTE'
+ DataType = datInteger
+ DictionaryEntry = 'Agentes_Objetivos_albaranes_ID_AGENTE'
+ end
+ item
+ Name = 'ANO'
+ DataType = datSmallInt
+ DictionaryEntry = 'Agentes_Objetivos_albaranes_ANO'
+ end
+ item
+ Name = 'MES'
+ DataType = datSmallInt
+ DictionaryEntry = 'Agentes_Objetivos_albaranes_MES'
+ end
+ item
+ Name = 'DESCRIPCION'
+ DataType = datString
+ Size = 20
+ end
+ item
+ Name = 'UNIDADES_OBJETIVO'
+ DataType = datSmallInt
+ DictionaryEntry = 'Agentes_Objetivos_albaranes_UNIDADES_OBJETIVO'
+ end
+ item
+ Name = 'IMPORTE_OBJETIVO'
+ DataType = datCurrency
+ DictionaryEntry = 'Agentes_Objetivos_albaranes_IMPORTE_OBJETIVO'
+ end>
+ end
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'IBX'
+ ConnectionType = 'Interbase'
+ Default = True
+ TargetTable = 'AGENTES_OBJETIVOS_FAC'
+ SQL =
+ 'SELECT'#10' A.ID, A.ID_AGENTE, A.ANO, A.MES, P.DESCRIPCION, A.UNI' +
+ 'DADES_OBJETIVO, A.IMPORTE_OBJETIVO'#10' FROM'#10' AGENTES_OBJETIVOS_' +
+ 'FAC A'#10'left join periodos_aux P on ((P.periodo = '#39'MENSUAL'#39') and (' +
+ 'P.valor = A.MES))'#10' WHERE {Where}'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'ID'
+ TableField = 'ID'
+ end
+ item
+ DatasetField = 'ID_AGENTE'
+ TableField = 'ID_AGENTE'
+ end
+ item
+ DatasetField = 'ANO'
+ TableField = 'ANO'
+ end
+ item
+ DatasetField = 'MES'
+ TableField = 'MES'
+ end
+ item
+ DatasetField = 'UNIDADES_OBJETIVO'
+ TableField = 'UNIDADES_OBJETIVO'
+ end
+ item
+ DatasetField = 'IMPORTE_OBJETIVO'
+ TableField = 'IMPORTE_OBJETIVO'
+ end
+ item
+ DatasetField = 'DESCRIPCION'
+ TableField = ''
+ SQLOrigin = 'DESCRIPCION'
+ end>
+ end>
+ Name = 'Agentes_Objetivos_facturas'
+ Fields = <
+ item
+ Name = 'ID'
+ DataType = datAutoInc
+ GeneratorName = 'GEN_OBJETIVOS_FAC_ID'
+ DictionaryEntry = 'Agentes_Objetivos_facturas_ID'
+ InPrimaryKey = True
+ end
+ item
+ Name = 'ID_AGENTE'
+ DataType = datInteger
+ DictionaryEntry = 'Agentes_Objetivos_facturas_ID_AGENTE'
+ end
+ item
+ Name = 'ANO'
+ DataType = datSmallInt
+ DictionaryEntry = 'Agentes_Objetivos_facturas_ANO'
+ end
+ item
+ Name = 'MES'
+ DataType = datSmallInt
+ DictionaryEntry = 'Agentes_Objetivos_facturas_MES'
+ end
+ item
+ Name = 'DESCRIPCION'
+ DataType = datString
+ Size = 20
+ end
+ item
+ Name = 'UNIDADES_OBJETIVO'
+ DataType = datSmallInt
+ DictionaryEntry = 'Agentes_Objetivos_facturas_UNIDADES_OBJETIVO'
+ end
+ item
+ Name = 'IMPORTE_OBJETIVO'
+ DataType = datCurrency
+ DictionaryEntry = 'Agentes_Objetivos_facturas_IMPORTE_OBJETIVO'
+ end>
+ end
+ item
+ Params = <
+ item
+ Name = 'ID_AGENTE'
+ Value = ''
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ ConnectionType = 'Interbase'
+ Default = True
+ SQL =
+ 'select ANO from'#10'(select distinct(ANO) as ANO'#10'from AGENTES_OBJETI' +
+ 'VOS_FAC'#10'where (ID_AGENTE = :ID_AGENTE)'#10'order by 1 desc)'#10#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'ANO'
+ TableField = 'ANO'
+ end>
+ end>
+ Name = 'ListaAnosObjetivosFac'
+ Fields = <
+ item
+ Name = 'ANO'
+ DataType = datSmallInt
+ end>
end>
JoinDataTables = <>
UnionDataTables = <>
@@ -4156,6 +4383,28 @@ object srvContactos: TsrvContactos
end>
Name = 'Update_ClientesDescuentos'
end
+ item
+ Params = <
+ item
+ Name = 'ID_AGENTE'
+ Value = ''
+ end
+ item
+ Name = 'ANO'
+ Value = ''
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ ConnectionType = 'Interbase'
+ Default = True
+ Name = 'IBX'
+ SQL = 'execute procedure PRO_ANADIR_OBJETIVOS :ID_AGENTE, :ANO'#10
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Insert_ObjetivosAgentes'
+ end
item
Params = <
item
@@ -4766,6 +5015,248 @@ object srvContactos: TsrvContactos
ColumnMappings = <>
end>
Name = 'Delete_ClientesDescuentosArt'
+ end
+ item
+ Params = <
+ item
+ Name = 'ID'
+ DataType = datInteger
+ Value = ''
+ end
+ item
+ Name = 'ID_AGENTE'
+ DataType = datInteger
+ Value = ''
+ end
+ item
+ Name = 'ANO'
+ DataType = datSmallInt
+ Value = ''
+ end
+ item
+ Name = 'MES'
+ DataType = datSmallInt
+ Value = ''
+ end
+ item
+ Name = 'UNIDADES_OBJETIVO'
+ DataType = datSmallInt
+ Value = ''
+ end
+ item
+ Name = 'IMPORTE_OBJETIVO'
+ DataType = datCurrency
+ Value = ''
+ end
+ item
+ Name = 'OLD_ID'
+ Value = ''
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ ConnectionType = 'Interbase'
+ Default = True
+ TargetTable = 'AGENTES_OBJETIVOS_ALB'
+ SQL =
+ 'UPDATE AGENTES_OBJETIVOS_ALB'#10' SET '#10' ID = :ID, '#10' ID_AGENTE' +
+ ' = :ID_AGENTE, '#10' ANO = :ANO,'#10' MES = :MES,'#10' UNIDADES_OBJ' +
+ 'ETIVO = :UNIDADES_OBJETIVO,'#10' IMPORTE_OBJETIVO = :IMPORTE_OBJE' +
+ 'TIVO'#10' WHERE'#10' (ID = :OLD_ID)'#10
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Update_Agentes_Objetivos_albaranes'
+ end
+ item
+ Params = <
+ item
+ Name = 'ID'
+ DataType = datAutoInc
+ GeneratorName = 'GEN_OBJETIVOS_ALB_ID'
+ Value = ''
+ end
+ item
+ Name = 'ID_AGENTE'
+ DataType = datInteger
+ Value = ''
+ end
+ item
+ Name = 'ANO'
+ DataType = datSmallInt
+ Value = ''
+ end
+ item
+ Name = 'MES'
+ DataType = datSmallInt
+ Value = ''
+ end
+ item
+ Name = 'UNIDADES_OBJETIVO'
+ DataType = datSmallInt
+ Value = ''
+ end
+ item
+ Name = 'IMPORTE_OBJETIVO'
+ DataType = datCurrency
+ Value = ''
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ ConnectionType = 'Interbase'
+ Default = True
+ TargetTable = 'AGENTES_OBJETIVOS_ALB'
+ SQL =
+ 'INSERT'#10' INTO AGENTES_OBJETIVOS_ALB'#10' (ID, ID_AGENTE, ANO, MES' +
+ ', UNIDADES_OBJETIVO, IMPORTE_OBJETIVO)'#10' VALUES'#10' (:ID, :ID_AG' +
+ 'ENTE, :ANO, :MES , :UNIDADES_OBJETIVO, :IMPORTE_OBJETIVO)'#10
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Insert_Agentes_Objetivos_albaranes'
+ end
+ item
+ Params = <
+ item
+ Name = 'OLD_ID'
+ DataType = datInteger
+ Value = ''
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ ConnectionType = 'Interbase'
+ Default = True
+ TargetTable = 'AGENTES_OBJETIVOS_ALB'
+ SQL =
+ 'DELETE '#10' FROM'#10' AGENTES_OBJETIVOS_ALB'#10' WHERE'#10' (ID = :OLD_' +
+ 'ID)'#10
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Delete_Agentes_Objetivos_albaranes'
+ end
+ item
+ Params = <
+ item
+ Name = 'ID'
+ DataType = datAutoInc
+ GeneratorName = 'GEN_OBJETIVOS_FAC_ID'
+ Value = ''
+ end
+ item
+ Name = 'ID_AGENTE'
+ DataType = datInteger
+ Value = ''
+ end
+ item
+ Name = 'ANO'
+ DataType = datSmallInt
+ Value = ''
+ end
+ item
+ Name = 'MES'
+ DataType = datSmallInt
+ Value = ''
+ end
+ item
+ Name = 'UNIDADES_OBJETIVO'
+ DataType = datSmallInt
+ Value = ''
+ end
+ item
+ Name = 'IMPORTE_OBJETIVO'
+ DataType = datCurrency
+ Value = ''
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ ConnectionType = 'Interbase'
+ Default = True
+ TargetTable = 'AGENTES_OBJETIVOS_FAC'
+ SQL =
+ 'INSERT'#10' INTO AGENTES_OBJETIVOS_FAC'#10' (ID, ID_AGENTE, ANO, MES' +
+ ', UNIDADES_OBJETIVO, IMPORTE_OBJETIVO)'#10' VALUES'#10' (:ID, :ID_AG' +
+ 'ENTE, :ANO, :MES , :UNIDADES_OBJETIVO, :IMPORTE_OBJETIVO)'#10
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Insert_Agentes_Objetivos_facturas'
+ end
+ item
+ Params = <
+ item
+ Name = 'ID'
+ DataType = datInteger
+ Value = ''
+ end
+ item
+ Name = 'ID_AGENTE'
+ DataType = datInteger
+ Value = ''
+ end
+ item
+ Name = 'ANO'
+ DataType = datSmallInt
+ Value = ''
+ end
+ item
+ Name = 'MES'
+ DataType = datSmallInt
+ Value = ''
+ end
+ item
+ Name = 'UNIDADES_OBJETIVO'
+ DataType = datSmallInt
+ Value = ''
+ end
+ item
+ Name = 'IMPORTE_OBJETIVO'
+ DataType = datCurrency
+ Value = ''
+ end
+ item
+ Name = 'OLD_ID'
+ Value = ''
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ ConnectionType = 'Interbase'
+ Default = True
+ TargetTable = 'AGENTES_OBJETIVOS_FAC'
+ SQL =
+ 'UPDATE AGENTES_OBJETIVOS_FAC'#10' SET '#10' ID = :ID, '#10' ID_AGENTE' +
+ ' = :ID_AGENTE, '#10' ANO = :ANO,'#10' MES = :MES,'#10' UNIDADES_OBJ' +
+ 'ETIVO = :UNIDADES_OBJETIVO,'#10' IMPORTE_OBJETIVO = :IMPORTE_OBJE' +
+ 'TIVO'#10' WHERE'#10' (ID = :OLD_ID)'#10
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Update_Agentes_Objetivos_facturas'
+ end
+ item
+ Params = <
+ item
+ Name = 'OLD_ID'
+ DataType = datInteger
+ Value = ''
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ ConnectionType = 'Interbase'
+ Default = True
+ TargetTable = 'AGENTES_OBJETIVOS_FAC'
+ SQL =
+ 'DELETE '#10' FROM'#10' AGENTES_OBJETIVOS_FAC'#10' WHERE'#10' (ID = :OLD_' +
+ 'ID)'#10
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Delete_Agentes_Objetivos_facturas'
end>
RelationShips = <
item
@@ -4800,11 +5291,27 @@ object srvContactos: TsrvContactos
DetailFields = 'ID_CONTACTO'
RelationshipType = rtForeignKey
end
+ item
+ Name = 'FK_AgentesObjFac'
+ MasterDatasetName = 'Agentes'
+ MasterFields = 'ID'
+ DetailDatasetName = 'Agentes_Objetivos_facturas'
+ DetailFields = 'ID_AGENTE'
+ RelationshipType = rtForeignKey
+ end
+ item
+ Name = 'FK_AgentesObjAlb'
+ MasterDatasetName = 'Agentes'
+ MasterFields = 'ID'
+ DetailDatasetName = 'Agentes_Objetivos_albaranes'
+ DetailFields = 'ID_AGENTE'
+ RelationshipType = rtForeignKey
+ end
item
Name = 'FK_AgentesComisiones'
MasterDatasetName = 'Agentes'
MasterFields = 'ID'
- DetailDatasetName = 'Agentes_Comisiones'
+ DetailDatasetName = 'Agentes_Objetivos_facturas'
DetailFields = 'ID_AGENTE'
RelationshipType = rtForeignKey
end
@@ -5723,6 +6230,60 @@ object srvContactos: TsrvContactos
item
Name = 'ClientesDescuentosArticulos_PRECIO_NETO'
DataType = datCurrency
+ end
+ item
+ Name = 'Agentes_Objetivos_albaranes_ID'
+ DataType = datAutoInc
+ GeneratorName = 'GEN_OBJETIVOS_ALB_ID'
+ Required = True
+ DisplayLabel = 'ID'
+ end
+ item
+ Name = 'Agentes_Objetivos_albaranes_ID_AGENTE'
+ DataType = datInteger
+ end
+ item
+ Name = 'Agentes_Objetivos_albaranes_ANO'
+ DataType = datSmallInt
+ end
+ item
+ Name = 'Agentes_Objetivos_albaranes_MES'
+ DataType = datSmallInt
+ end
+ item
+ Name = 'Agentes_Objetivos_albaranes_UNIDADES_OBJETIVO'
+ DataType = datSmallInt
+ end
+ item
+ Name = 'Agentes_Objetivos_albaranes_IMPORTE_OBJETIVO'
+ DataType = datCurrency
+ end
+ item
+ Name = 'Agentes_Objetivos_facturas_ID'
+ DataType = datAutoInc
+ GeneratorName = 'GEN_OBJETIVOS_FAC_ID'
+ Required = True
+ DisplayLabel = 'ID'
+ end
+ item
+ Name = 'Agentes_Objetivos_facturas_ID_AGENTE'
+ DataType = datInteger
+ end
+ item
+ Name = 'Agentes_Objetivos_facturas_ANO'
+ DataType = datSmallInt
+ end
+ item
+ Name = 'Agentes_Objetivos_facturas_MES'
+ DataType = datSmallInt
+ end
+ item
+ Name = 'Agentes_Objetivos_facturas_UNIDADES_OBJETIVO'
+ DataType = datSmallInt
+ end
+ item
+ Name = 'Agentes_Objetivos_facturas_IMPORTE_OBJETIVO'
+ DataType = datCurrency
end>
Left = 126
Top = 14
@@ -5862,4 +6423,26 @@ object srvContactos: TsrvContactos
Left = 344
Top = 263
end
+ object bpAgentesObjetivosAlb: TDABusinessProcessor
+ Schema = schContactos
+ InsertCommandName = 'Insert_Agentes_Objetivos_albaranes'
+ DeleteCommandName = 'Delete_Agentes_Objetivos_albaranes'
+ UpdateCommandName = 'Update_Agentes_Objetivos_albaranes'
+ ReferencedDataset = 'Agentes_Objetivos_albaranes'
+ ProcessorOptions = [poPrepareCommands]
+ UpdateMode = updWhereKeyOnly
+ Left = 48
+ Top = 287
+ end
+ object bpAgentesObjetivosFac: TDABusinessProcessor
+ Schema = schContactos
+ InsertCommandName = 'Insert_Agentes_Objetivos_facturas'
+ DeleteCommandName = 'Delete_Agentes_Objetivos_facturas'
+ UpdateCommandName = 'Update_Agentes_Objetivos_facturas'
+ ReferencedDataset = 'Agentes_Objetivos_facturas'
+ ProcessorOptions = [poPrepareCommands]
+ UpdateMode = updWhereKeyOnly
+ Left = 176
+ Top = 287
+ end
end
diff --git a/Source/Modulos/Contactos/Servidor/srvContactos_Impl.pas b/Source/Modulos/Contactos/Servidor/srvContactos_Impl.pas
index 32f4942..84d9a60 100644
--- a/Source/Modulos/Contactos/Servidor/srvContactos_Impl.pas
+++ b/Source/Modulos/Contactos/Servidor/srvContactos_Impl.pas
@@ -34,9 +34,11 @@ type
bpPersonalContacto: TDABusinessProcessor;
bpAgentes: TDABusinessProcessor;
bpAgentesComisiones: TDABusinessProcessor;
+ bpClientesDescuentosArt: TDABusinessProcessor;
+ bpAgentesObjetivosAlb: TDABusinessProcessor;
+ bpAgentesObjetivosFac: TDABusinessProcessor;
schContactos: TDASchema;
DataDictionary: TDADataDictionary;
- bpClientesDescuentosArt: TDABusinessProcessor;
procedure DARemoteServiceBeforeGetDatasetData(const Dataset: IDADataset;
const IncludeSchema: Boolean; const MaxRecords: Integer);
procedure DARemoteServiceCreate(Sender: TObject);
@@ -47,6 +49,8 @@ type
function GenerarInformeEtiquetas(const ListaID: TIntegerArray): Binary;
function DarListaContratosEmpleados: String;
function DarListaDescripcionesProveedores: String;
+ function DarListaAnosObjetivosAlbaranes(const ID_AGENTE: Integer): StringArray;
+ function DarListaAnosObjetivosFacturas(const ID_AGENTE: Integer): StringArray;
end;
implementation
@@ -91,6 +95,42 @@ begin
bpProveedores.BusinessRulesID := BIZ_SERVER_PROVEEDOR;
end;
+function TsrvContactos.DarListaAnosObjetivosAlbaranes(const ID_AGENTE: Integer): StringArray;
+var
+ dsAnos : IDADataset;
+begin
+ Result := StringArray.Create();
+ try
+ dsAnos := schContactos.NewDataset(Connection, 'ListaAnosObjetivosAlbaranes', ['ID_AGENTE'], [ID_AGENTE] ,True);
+ while not dsAnos.EOF do
+ begin
+ Result.Add(dsAnos.Fields[0].AsString);
+ dsAnos.Next;
+ end;
+ finally
+ dsAnos.Close;
+ dsAnos := NIL;
+ end;
+end;
+
+function TsrvContactos.DarListaAnosObjetivosFacturas(const ID_AGENTE: Integer): StringArray;
+var
+ dsAnos : IDADataset;
+begin
+ Result := StringArray.Create();
+ try
+ dsAnos := schContactos.NewDataset(Connection, 'ListaAnosObjetivosFacturas', ['ID_AGENTE'], [ID_AGENTE] ,True);
+ while not dsAnos.EOF do
+ begin
+ Result.Add(dsAnos.Fields[0].AsString);
+ dsAnos.Next;
+ end;
+ finally
+ dsAnos.Close;
+ dsAnos := NIL;
+ end;
+end;
+
function TsrvContactos.DarListaContratosEmpleados: String;
var
dsContratos : IDADataset;
diff --git a/Source/Modulos/Contactos/Views/Contactos_view.dpk b/Source/Modulos/Contactos/Views/Contactos_view.dpk
index 833e61a..fd97f8f 100644
--- a/Source/Modulos/Contactos/Views/Contactos_view.dpk
+++ b/Source/Modulos/Contactos/Views/Contactos_view.dpk
@@ -131,6 +131,8 @@ contains
uEditorAgente in 'uEditorAgente.pas' {fEditorAgente: TCustomEditor},
uViewClienteDatosComerciales in 'uViewClienteDatosComerciales.pas' {frViewClienteDatosComerciales: TFrame},
uViewClienteDescuentosArticulos in 'uViewClienteDescuentosArticulos.pas' {frViewClienteDescuentosArticulos: TFrame},
- uEditorElegirAgentes in 'uEditorElegirAgentes.pas' {fEditorElegirAgentes: TCustomEditor};
+ uEditorElegirAgentes in 'uEditorElegirAgentes.pas' {fEditorElegirAgentes: TCustomEditor},
+ uViewAgenteObjetivosAlbaranes in 'uViewAgenteObjetivosAlbaranes.pas' {frViewAgenteObjetivosAlbaranes: TFrame},
+ uViewAgenteObjetivosFacturas in 'uViewAgenteObjetivosFacturas.pas' {frViewAgenteObjetivosFacturas: TFrame};
end.
diff --git a/Source/Modulos/Contactos/Views/Contactos_view.dproj b/Source/Modulos/Contactos/Views/Contactos_view.dproj
index 46c0630..c48f484 100644
--- a/Source/Modulos/Contactos/Views/Contactos_view.dproj
+++ b/Source/Modulos/Contactos/Views/Contactos_view.dproj
@@ -201,6 +201,14 @@
TFrame
+
+
+ TFrame
+
+
+
+ TFrame
+
TFrame
diff --git a/Source/Modulos/Contactos/Views/Contactos_view.identcache b/Source/Modulos/Contactos/Views/Contactos_view.identcache
index 1170d39..b4d707f 100644
Binary files a/Source/Modulos/Contactos/Views/Contactos_view.identcache and b/Source/Modulos/Contactos/Views/Contactos_view.identcache differ
diff --git a/Source/Modulos/Contactos/Views/uEditorAgente.dfm b/Source/Modulos/Contactos/Views/uEditorAgente.dfm
index c5d3f00..32f6888 100644
--- a/Source/Modulos/Contactos/Views/uEditorAgente.dfm
+++ b/Source/Modulos/Contactos/Views/uEditorAgente.dfm
@@ -132,10 +132,12 @@ inherited fEditorAgente: TfEditorAgente
inherited pgPaginas: TPageControl
Width = 864
Height = 614
- ActivePage = pagDescuentos
+ ActivePage = ObjetivosFacturas
ExplicitWidth = 864
ExplicitHeight = 614
inherited pagGeneral: TTabSheet
+ ExplicitLeft = 4
+ ExplicitTop = 24
ExplicitWidth = 856
ExplicitHeight = 586
inline frViewAgente1: TfrViewAgente
@@ -205,6 +207,14 @@ inherited fEditorAgente: TfEditorAgente
ExplicitHeight = 38
Height = 38
end
+ inherited eFechaBaja: TcxDBDateEdit
+ ExplicitWidth = 229
+ Width = 229
+ end
+ inherited eCausaBaja: TcxDBTextEdit
+ ExplicitWidth = 229
+ Width = 229
+ end
inherited eTlfParticular: TcxDBTextEdit
Left = 587
Style.LookAndFeel.SkinName = ''
@@ -221,14 +231,6 @@ inherited fEditorAgente: TfEditorAgente
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 587
end
- inherited eFechaBaja: TcxDBDateEdit
- ExplicitWidth = 229
- Width = 229
- end
- inherited eCausaBaja: TcxDBTextEdit
- ExplicitWidth = 229
- Width = 229
- end
inherited eTlfMovil: TcxDBTextEdit
Left = 587
Style.LookAndFeel.SkinName = ''
@@ -364,6 +366,18 @@ inherited fEditorAgente: TfEditorAgente
inherited ToolBar1: TToolBar
Width = 856
ExplicitWidth = 856
+ inherited ToolButton1: TToolButton
+ ExplicitWidth = 113
+ end
+ inherited ToolButton4: TToolButton
+ ExplicitWidth = 113
+ end
+ inherited ToolButton2: TToolButton
+ ExplicitWidth = 113
+ end
+ inherited ToolButton7: TToolButton
+ ExplicitWidth = 113
+ end
end
end
end
@@ -400,6 +414,119 @@ inherited fEditorAgente: TfEditorAgente
end
end
end
+ object ObjetivosAlbaranes: TTabSheet
+ Caption = 'Objetivos Albaranes'
+ ImageIndex = 4
+ inline frViewAgenteObjetivosAlbaranes1: TfrViewAgenteObjetivosAlbaranes
+ Left = 0
+ Top = 0
+ Width = 856
+ Height = 586
+ Align = alClient
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 0
+ ReadOnly = False
+ ExplicitWidth = 856
+ ExplicitHeight = 586
+ inherited cxGrid: TcxGrid
+ Width = 856
+ Height = 540
+ ExplicitWidth = 856
+ ExplicitHeight = 540
+ inherited cxGridView: TcxGridDBTableView
+ DataController.Summary.DefaultGroupSummaryItems = <
+ item
+ Format = ',0.00 '#8364';-,0.00 '#8364
+ Position = spFooter
+ Column = frViewAgenteObjetivosAlbaranes1.cxGridViewIMPORTE_OBJETIVO
+ end>
+ DataController.Summary.FooterSummaryItems = <
+ item
+ Kind = skSum
+ Column = frViewAgenteObjetivosAlbaranes1.cxGridViewIMPORTE_OBJETIVO
+ end
+ item
+ Kind = skSum
+ Column = frViewAgenteObjetivosAlbaranes1.cxGridViewUNIDADES_OBJETIVO
+ end>
+ end
+ end
+ inherited ToolBar1: TToolBar
+ Width = 856
+ ExplicitWidth = 856
+ inherited ToolButton1: TToolButton
+ ExplicitWidth = 113
+ end
+ inherited ToolButton4: TToolButton
+ ExplicitWidth = 113
+ end
+ inherited ToolButton2: TToolButton
+ ExplicitWidth = 113
+ end
+ inherited ToolButton7: TToolButton
+ ExplicitWidth = 113
+ end
+ end
+ inherited tbxFiltro: TTBXToolbar
+ Width = 856
+ ExplicitWidth = 856
+ end
+ end
+ end
+ object ObjetivosFacturas: TTabSheet
+ Caption = 'Objetivos Facturas'
+ ImageIndex = 5
+ inline frViewAgenteObjetivosFacturas1: TfrViewAgenteObjetivosFacturas
+ Left = 0
+ Top = 0
+ Width = 856
+ Height = 586
+ Align = alClient
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 0
+ ReadOnly = False
+ ExplicitLeft = 353
+ ExplicitTop = 229
+ inherited cxGrid: TcxGrid
+ Width = 856
+ Height = 540
+ inherited cxGridView: TcxGridDBTableView
+ DataController.Summary.DefaultGroupSummaryItems = <
+ item
+ Format = ',0.00 '#8364';-,0.00 '#8364
+ Position = spFooter
+ Column = frViewAgenteObjetivosFacturas1.cxGridViewIMPORTE_OBJETIVO
+ end>
+ DataController.Summary.FooterSummaryItems = <
+ item
+ Kind = skSum
+ Column = frViewAgenteObjetivosFacturas1.cxGridViewIMPORTE_OBJETIVO
+ end
+ item
+ Format = '0'
+ Kind = skSum
+ Column = frViewAgenteObjetivosFacturas1.cxGridViewUNIDADES_OBJETIVO
+ end>
+ end
+ end
+ inherited ToolBar1: TToolBar
+ Width = 856
+ end
+ inherited tbxFiltro: TTBXToolbar
+ Width = 856
+ end
+ end
+ end
end
inherited StatusBar: TJvStatusBar
Top = 696
diff --git a/Source/Modulos/Contactos/Views/uEditorAgente.pas b/Source/Modulos/Contactos/Views/uEditorAgente.pas
index 5059fa2..7defad9 100644
--- a/Source/Modulos/Contactos/Views/uEditorAgente.pas
+++ b/Source/Modulos/Contactos/Views/uEditorAgente.pas
@@ -16,7 +16,8 @@ uses
uViewContactoDatosBancarios, dxLayoutLookAndFeels, uViewAgenteComisiones,
uDAInterfaces, uViewContactoListaDatosBancarios,
uViewPersonalContacto, cxControls, cxContainer, cxEdit, cxLabel,
- dxGDIPlusClasses;
+ dxGDIPlusClasses, uViewAgenteObjetivosAlbaranes, uContactosController,
+ uViewAgenteObjetivosFacturas;
type
TfEditorAgente = class(TfEditorContacto, IEditorAgente)
@@ -42,18 +43,27 @@ type
TBXItem41: TTBXItem;
frViewAgente1: TfrViewAgente;
frViewAgenteComisiones1: TfrViewAgenteComisiones;
+ ObjetivosAlbaranes: TTabSheet;
+ frViewAgenteObjetivosAlbaranes1: TfrViewAgenteObjetivosAlbaranes;
+ ObjetivosFacturas: TTabSheet;
+ frViewAgenteObjetivosFacturas1: TfrViewAgenteObjetivosFacturas;
procedure FormShow(Sender: TObject);
procedure actGruposClienteExecute(Sender: TObject);
procedure actDocumentosFacturasExecute(Sender: TObject);
procedure actDocumentosPresupuestosExecute(Sender: TObject);
procedure actDocumentosAlbaranesExecute(Sender: TObject);
procedure actDocumentosRecibosExecute(Sender: TObject);
+
protected
+ procedure RefrescarInterno; override;
procedure EliminarInterno; override;
procedure SetContacto(const Value: IBizContacto); override;
+ procedure SetController(const Value: IContactosController); override;
+
public
constructor Create(AOwner: TComponent); override;
procedure PonerTitulos(const ATitulo: string = ''); override;
+
end;
implementation
@@ -138,13 +148,33 @@ begin
inherited PonerTitulos(FTitulo);
end;
+procedure TfEditorAgente.RefrescarInterno;
+begin
+ inherited;
+ frViewAgenteObjetivosAlbaranes1.Refrescar;
+ frViewAgenteObjetivosFacturas1.Refrescar;
+end;
+
procedure TfEditorAgente.SetContacto(const Value: IBizContacto);
begin
inherited;
if Assigned(Contacto) then
- frViewAgenteComisiones1.dsDetalles.DataTable := (Contacto as IBizAgente).Comisiones.DataTable
+ begin
+ frViewAgenteComisiones1.dsDetalles.DataTable := (Contacto as IBizAgente).Comisiones.DataTable;
+ frViewAgenteObjetivosAlbaranes1.dsDetalles.DataTable := (Contacto as IBizAgente).ObjetivosAlbaranes.DataTable;
+ frViewAgenteObjetivosFacturas1.dsDetalles.DataTable := (Contacto as IBizAgente).ObjetivosFacturas.DataTable;
+ end
else
+ begin
frViewAgenteComisiones1.dsDetalles.DataTable := NIL;
+ end;
+end;
+
+procedure TfEditorAgente.SetController(const Value: IContactosController);
+begin
+ inherited;
+ frViewAgenteObjetivosAlbaranes1.Controller := (Controller as IAgentesController);
+ frViewAgenteObjetivosFacturas1.Controller := (Controller as IAgentesController);
end;
end.
diff --git a/Source/Modulos/Contactos/Views/uEditorCliente.dfm b/Source/Modulos/Contactos/Views/uEditorCliente.dfm
index 80463db..7a2347c 100644
--- a/Source/Modulos/Contactos/Views/uEditorCliente.dfm
+++ b/Source/Modulos/Contactos/Views/uEditorCliente.dfm
@@ -126,6 +126,8 @@ inherited fEditorCliente: TfEditorCliente
ExplicitWidth = 864
ExplicitHeight = 614
inherited pagGeneral: TTabSheet
+ ExplicitLeft = 4
+ ExplicitTop = 24
ExplicitWidth = 856
ExplicitHeight = 586
inline frViewCliente1: TfrViewCliente
@@ -671,7 +673,7 @@ inherited fEditorCliente: TfEditorCliente
Width = 856
Height = 150
HelpContext = 150
- Align = alTop
+ Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
@@ -698,7 +700,7 @@ inherited fEditorCliente: TfEditorCliente
Top = 150
Width = 856
Height = 436
- Align = alClient
+ Align = alBottom
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
diff --git a/Source/Modulos/Contactos/Views/uEditorContacto.dfm b/Source/Modulos/Contactos/Views/uEditorContacto.dfm
index c8ab0b2..96c21d9 100644
--- a/Source/Modulos/Contactos/Views/uEditorContacto.dfm
+++ b/Source/Modulos/Contactos/Views/uEditorContacto.dfm
@@ -78,10 +78,7 @@ inherited fEditorContacto: TfEditorContacto
ActivePage = pagDatosBancarios
ExplicitWidth = 626
inherited pagGeneral: TTabSheet
- ExplicitLeft = 4
- ExplicitTop = 24
ExplicitWidth = 618
- ExplicitHeight = 332
end
object pagDatosBancarios: TTabSheet
Caption = 'Datos bancarios'
diff --git a/Source/Modulos/Contactos/Views/uViewAgenteObjetivosAlbaranes.dfm b/Source/Modulos/Contactos/Views/uViewAgenteObjetivosAlbaranes.dfm
new file mode 100644
index 0000000..4d5b4d3
--- /dev/null
+++ b/Source/Modulos/Contactos/Views/uViewAgenteObjetivosAlbaranes.dfm
@@ -0,0 +1,122 @@
+inherited frViewAgenteObjetivosAlbaranes: TfrViewAgenteObjetivosAlbaranes
+ OnDestroy = CustomViewDestroy
+ OnShow = CustomViewShow
+ inherited cxGrid: TcxGrid
+ Top = 46
+ Height = 311
+ ExplicitTop = 46
+ ExplicitHeight = 311
+ inherited cxGridView: TcxGridDBTableView
+ DataController.Summary.DefaultGroupSummaryItems = <
+ item
+ Format = ',0.00 '#8364';-,0.00 '#8364
+ Position = spFooter
+ Column = cxGridViewIMPORTE_OBJETIVO
+ end>
+ DataController.Summary.FooterSummaryItems = <
+ item
+ Kind = skSum
+ Column = cxGridViewIMPORTE_OBJETIVO
+ end
+ item
+ Format = '0'
+ Kind = skSum
+ Column = cxGridViewUNIDADES_OBJETIVO
+ end>
+ OptionsData.Appending = False
+ OptionsData.Deleting = False
+ OptionsData.Inserting = False
+ OptionsView.Footer = True
+ inherited cxGridViewID: TcxGridDBColumn
+ VisibleForCustomization = False
+ end
+ object cxGridViewID_AGENTE: TcxGridDBColumn
+ DataBinding.FieldName = 'ID_AGENTE'
+ Visible = False
+ VisibleForCustomization = False
+ end
+ object cxGridViewANO: TcxGridDBColumn
+ DataBinding.FieldName = 'ANO'
+ Visible = False
+ VisibleForCustomization = False
+ end
+ object cxGridViewMES: TcxGridDBColumn
+ DataBinding.FieldName = 'MES'
+ Visible = False
+ VisibleForCustomization = False
+ end
+ object cxGridViewDESCRIPCION: TcxGridDBColumn
+ Caption = 'Mes'
+ DataBinding.FieldName = 'DESCRIPCION'
+ Options.Editing = False
+ end
+ object cxGridViewUNIDADES_OBJETIVO: TcxGridDBColumn
+ Caption = 'Unidades objetivo'
+ DataBinding.FieldName = 'UNIDADES_OBJETIVO'
+ PropertiesClassName = 'TcxSpinEditProperties'
+ Properties.Alignment.Horz = taCenter
+ FooterAlignmentHorz = taCenter
+ HeaderAlignmentHorz = taCenter
+ end
+ object cxGridViewIMPORTE_OBJETIVO: TcxGridDBColumn
+ Caption = 'Importe objetivo'
+ DataBinding.FieldName = 'IMPORTE_OBJETIVO'
+ PropertiesClassName = 'TcxCurrencyEditProperties'
+ Properties.Alignment.Horz = taRightJustify
+ FooterAlignmentHorz = taRightJustify
+ HeaderAlignmentHorz = taRightJustify
+ end
+ end
+ end
+ inherited ToolBar1: TToolBar
+ Visible = False
+ inherited ToolButton1: TToolButton
+ ExplicitWidth = 62
+ end
+ inherited ToolButton4: TToolButton
+ ExplicitWidth = 74
+ end
+ inherited ToolButton2: TToolButton
+ ExplicitWidth = 67
+ end
+ inherited ToolButton7: TToolButton
+ ExplicitWidth = 117
+ end
+ end
+ object tbxFiltro: TTBXToolbar [2]
+ Left = 0
+ Top = 25
+ Width = 503
+ Height = 21
+ Align = alTop
+ CloseButton = False
+ DockMode = dmCannotFloatOrChangeDocks
+ DockPos = -6
+ DockRow = 2
+ DragHandleStyle = dhDouble
+ ParentShowHint = False
+ Resizable = False
+ ShowHint = True
+ ShrinkMode = tbsmNone
+ TabOrder = 2
+ object lblAno: TTBXLabelItem
+ Caption = 'A'#241'o'
+ end
+ object cbxListaAnos: TTBXComboBoxItem
+ end
+ end
+ inherited ActionListContenido: TActionList
+ inherited actAnadir: TAction
+ Enabled = False
+ Visible = False
+ end
+ inherited actEliminar: TAction
+ Enabled = False
+ Visible = False
+ end
+ inherited actModificar: TAction
+ Enabled = False
+ Visible = False
+ end
+ end
+end
diff --git a/Source/Modulos/Contactos/Views/uViewAgenteObjetivosAlbaranes.pas b/Source/Modulos/Contactos/Views/uViewAgenteObjetivosAlbaranes.pas
new file mode 100644
index 0000000..58264c9
--- /dev/null
+++ b/Source/Modulos/Contactos/Views/uViewAgenteObjetivosAlbaranes.pas
@@ -0,0 +1,135 @@
+unit uViewAgenteObjetivosAlbaranes;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uViewDetallesGenerico, cxStyles, cxCustomData, cxGraphics, cxFilter,
+ cxData, cxDataStorage, cxEdit, DB, cxDBData, ActnList, ImgList, PngImageList,
+ uDAInterfaces, uDADataTable, ComCtrls, ToolWin, cxGridLevel,
+ cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
+ cxControls, cxGridCustomView, cxGrid, cxSpinEdit, cxCurrencyEdit, TB2ExtItems,
+ TBXExtItems, TB2Item, TB2Dock, TB2Toolbar, TBX, uAgentesController;
+
+type
+ TfrViewAgenteObjetivosAlbaranes = class(TfrViewDetallesGenerico)
+ cxGridViewID_AGENTE: TcxGridDBColumn;
+ cxGridViewANO: TcxGridDBColumn;
+ cxGridViewMES: TcxGridDBColumn;
+ cxGridViewUNIDADES_OBJETIVO: TcxGridDBColumn;
+ cxGridViewIMPORTE_OBJETIVO: TcxGridDBColumn;
+ cxGridViewDESCRIPCION: TcxGridDBColumn;
+ tbxFiltro: TTBXToolbar;
+ lblAno: TTBXLabelItem;
+ cbxListaAnos: TTBXComboBoxItem;
+ procedure OnListaAnosChange(Sender: TObject; const Text: string);
+ procedure CustomViewShow(Sender: TObject);
+ procedure CustomViewDestroy(Sender: TObject);
+ protected
+ FListaAnos: TStringList;
+ FController : IAgentesController;
+
+ function GetListaAnos: TStringList;
+ procedure SetListaAnos(const Value: TStringList);
+
+ function GetController : IAgentesController; virtual;
+ procedure SetController (const Value : IAgentesController); virtual;
+ public
+ property Controller : IAgentesController read GetController write SetController;
+ property ListaAnos: TStringList read GetListaAnos write SetListaAnos;
+ procedure Refrescar;
+ end;
+
+implementation
+{$R *.dfm}
+
+uses schContactosClient_Intf;
+
+{ TfrViewAgenteObjetivosAlbaranes }
+
+procedure TfrViewAgenteObjetivosAlbaranes.CustomViewDestroy(Sender: TObject);
+begin
+ FController := NIL;
+
+ if Assigned(FListaAnos) then
+ FlistaAnos.Free;
+
+ inherited;
+end;
+
+procedure TfrViewAgenteObjetivosAlbaranes.CustomViewShow(Sender: TObject);
+begin
+ cbxListaAnos.OnChange := OnListaAnosChange; //OJO SIEMPRE ANTES DEL INHERITED
+ inherited;
+ cbxListaAnos.ItemIndex := 0;
+end;
+
+function TfrViewAgenteObjetivosAlbaranes.GetController: IAgentesController;
+begin
+ Result := FController;
+end;
+
+function TfrViewAgenteObjetivosAlbaranes.GetListaAnos: TStringList;
+begin
+ Result := FListaAnos;
+end;
+
+procedure TfrViewAgenteObjetivosAlbaranes.OnListaAnosChange(Sender: TObject; const Text: string);
+begin
+ dsDetalles.DataTable.Filter := 'ANO = ''' + Text + '''';
+ dsDetalles.DataTable.Filtered :=True;
+end;
+
+procedure TfrViewAgenteObjetivosAlbaranes.Refrescar;
+begin
+ //Volvemos a cargar los años de los albaranes
+ if Assigned(FController) then
+ ListaAnos := FController.DarListaAnosObjetivosAlbaranesAgente(dsDetalles.DataTable.FieldByName(fld_Agentes_Objetivos_albaranesID_AGENTE).AsInteger);
+ cbxListaAnos.ItemIndex := 0;
+end;
+
+procedure TfrViewAgenteObjetivosAlbaranes.SetController(const Value: IAgentesController);
+begin
+ FController := Value;
+
+ if Assigned(FController) then
+ ListaAnos := FController.DarListaAnosObjetivosAlbaranesAgente(dsDetalles.DataTable.FieldByName(fld_Agentes_Objetivos_albaranesID_AGENTE).AsInteger);
+end;
+
+procedure TfrViewAgenteObjetivosAlbaranes.SetListaAnos(const Value: TStringList);
+var
+ i: Integer;
+ AStringAnterior: String;
+
+begin
+ AStringAnterior := '';
+ if Assigned(FListaAnos) and (FListaAnos.Count > 0) then
+ begin
+ AStringAnterior := FListaAnos.ValueFromIndex[cbxListaAnos.ItemIndex];
+ FListaAnos.Free;
+ end;
+
+ //Se asigna el nuevo TStringList
+ FListaAnos := Value;
+
+ if Assigned(FListaAnos) then
+ begin
+ cbxListaAnos.Strings.BeginUpdate;
+ cbxListaAnos.Strings.Clear;
+ for i := 0 to FListaAnos.Count - 1 do
+ cbxListaAnos.Strings.Append(FListaAnos.Names[i]);
+
+ //Se posiciona en el elemento que habia anteriormente
+ if Length(AStringAnterior) > 0 then
+ begin
+ if FListaAnos.IndexOfName(AStringAnterior) <> -1 then
+ cbxListaAnos.ItemIndex := FListaAnos.IndexOfName(AStringAnterior)
+ else
+ cbxListaAnos.ItemIndex := 0;
+ end;
+
+ cbxListaAnos.Strings.EndUpdate;
+ end;
+end;
+
+end.
diff --git a/Source/Modulos/Contactos/Views/uViewAgenteObjetivosFacturas.dfm b/Source/Modulos/Contactos/Views/uViewAgenteObjetivosFacturas.dfm
new file mode 100644
index 0000000..4f2d031
--- /dev/null
+++ b/Source/Modulos/Contactos/Views/uViewAgenteObjetivosFacturas.dfm
@@ -0,0 +1,122 @@
+inherited frViewAgenteObjetivosFacturas: TfrViewAgenteObjetivosFacturas
+ OnDestroy = CustomViewDestroy
+ OnShow = CustomViewShow
+ inherited cxGrid: TcxGrid
+ Top = 46
+ Height = 311
+ ExplicitTop = 46
+ ExplicitHeight = 311
+ inherited cxGridView: TcxGridDBTableView
+ DataController.Summary.DefaultGroupSummaryItems = <
+ item
+ Format = ',0.00 '#8364';-,0.00 '#8364
+ Position = spFooter
+ Column = cxGridViewIMPORTE_OBJETIVO
+ end>
+ DataController.Summary.FooterSummaryItems = <
+ item
+ Kind = skSum
+ Column = cxGridViewIMPORTE_OBJETIVO
+ end
+ item
+ Format = '0'
+ Kind = skSum
+ Column = cxGridViewUNIDADES_OBJETIVO
+ end>
+ OptionsData.Appending = False
+ OptionsData.Deleting = False
+ OptionsData.Inserting = False
+ OptionsView.Footer = True
+ inherited cxGridViewID: TcxGridDBColumn
+ VisibleForCustomization = False
+ end
+ object cxGridViewID_AGENTE: TcxGridDBColumn
+ DataBinding.FieldName = 'ID_AGENTE'
+ Visible = False
+ VisibleForCustomization = False
+ end
+ object cxGridViewANO: TcxGridDBColumn
+ DataBinding.FieldName = 'ANO'
+ Visible = False
+ VisibleForCustomization = False
+ end
+ object cxGridViewMES: TcxGridDBColumn
+ DataBinding.FieldName = 'MES'
+ Visible = False
+ VisibleForCustomization = False
+ end
+ object cxGridViewDESCRIPCION: TcxGridDBColumn
+ Caption = 'Mes'
+ DataBinding.FieldName = 'DESCRIPCION'
+ Options.Editing = False
+ end
+ object cxGridViewUNIDADES_OBJETIVO: TcxGridDBColumn
+ Caption = 'Unidades objetivo'
+ DataBinding.FieldName = 'UNIDADES_OBJETIVO'
+ PropertiesClassName = 'TcxSpinEditProperties'
+ Properties.Alignment.Horz = taCenter
+ FooterAlignmentHorz = taCenter
+ HeaderAlignmentHorz = taCenter
+ end
+ object cxGridViewIMPORTE_OBJETIVO: TcxGridDBColumn
+ Caption = 'Importe objetivo'
+ DataBinding.FieldName = 'IMPORTE_OBJETIVO'
+ PropertiesClassName = 'TcxCurrencyEditProperties'
+ Properties.Alignment.Horz = taRightJustify
+ FooterAlignmentHorz = taRightJustify
+ HeaderAlignmentHorz = taRightJustify
+ end
+ end
+ end
+ inherited ToolBar1: TToolBar
+ Visible = False
+ inherited ToolButton1: TToolButton
+ ExplicitWidth = 62
+ end
+ inherited ToolButton4: TToolButton
+ ExplicitWidth = 74
+ end
+ inherited ToolButton2: TToolButton
+ ExplicitWidth = 67
+ end
+ inherited ToolButton7: TToolButton
+ ExplicitWidth = 117
+ end
+ end
+ object tbxFiltro: TTBXToolbar [2]
+ Left = 0
+ Top = 25
+ Width = 503
+ Height = 21
+ Align = alTop
+ CloseButton = False
+ DockMode = dmCannotFloatOrChangeDocks
+ DockPos = -6
+ DockRow = 2
+ DragHandleStyle = dhDouble
+ ParentShowHint = False
+ Resizable = False
+ ShowHint = True
+ ShrinkMode = tbsmNone
+ TabOrder = 2
+ object lblAno: TTBXLabelItem
+ Caption = 'A'#241'o'
+ end
+ object cbxListaAnos: TTBXComboBoxItem
+ end
+ end
+ inherited ActionListContenido: TActionList
+ inherited actAnadir: TAction
+ Enabled = False
+ Visible = False
+ end
+ inherited actEliminar: TAction
+ Enabled = False
+ Visible = False
+ end
+ inherited actModificar: TAction
+ Enabled = False
+ Visible = False
+ end
+ end
+end
diff --git a/Source/Modulos/Contactos/Views/uViewAgenteObjetivosFacturas.pas b/Source/Modulos/Contactos/Views/uViewAgenteObjetivosFacturas.pas
new file mode 100644
index 0000000..5ff7516
--- /dev/null
+++ b/Source/Modulos/Contactos/Views/uViewAgenteObjetivosFacturas.pas
@@ -0,0 +1,135 @@
+unit uViewAgenteObjetivosFacturas;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uViewDetallesGenerico, cxStyles, cxCustomData, cxGraphics, cxFilter,
+ cxData, cxDataStorage, cxEdit, DB, cxDBData, ActnList, ImgList, PngImageList,
+ uDAInterfaces, uDADataTable, ComCtrls, ToolWin, cxGridLevel,
+ cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
+ cxControls, cxGridCustomView, cxGrid, cxSpinEdit, cxCurrencyEdit, TB2ExtItems,
+ TBXExtItems, TB2Item, TB2Dock, TB2Toolbar, TBX, uAgentesController;
+
+type
+ TfrViewAgenteObjetivosFacturas = class(TfrViewDetallesGenerico)
+ cxGridViewID_AGENTE: TcxGridDBColumn;
+ cxGridViewANO: TcxGridDBColumn;
+ cxGridViewMES: TcxGridDBColumn;
+ cxGridViewUNIDADES_OBJETIVO: TcxGridDBColumn;
+ cxGridViewIMPORTE_OBJETIVO: TcxGridDBColumn;
+ cxGridViewDESCRIPCION: TcxGridDBColumn;
+ tbxFiltro: TTBXToolbar;
+ lblAno: TTBXLabelItem;
+ cbxListaAnos: TTBXComboBoxItem;
+ procedure OnListaAnosChange(Sender: TObject; const Text: string);
+ procedure CustomViewShow(Sender: TObject);
+ procedure CustomViewDestroy(Sender: TObject);
+ protected
+ FListaAnos: TStringList;
+ FController : IAgentesController;
+
+ function GetListaAnos: TStringList;
+ procedure SetListaAnos(const Value: TStringList);
+
+ function GetController : IAgentesController; virtual;
+ procedure SetController (const Value : IAgentesController); virtual;
+ public
+ property Controller : IAgentesController read GetController write SetController;
+ property ListaAnos: TStringList read GetListaAnos write SetListaAnos;
+ procedure Refrescar;
+ end;
+
+implementation
+{$R *.dfm}
+
+uses schContactosClient_Intf;
+
+{ TfrViewAgenteObjetivosFacturas }
+
+procedure TfrViewAgenteObjetivosFacturas.CustomViewDestroy(Sender: TObject);
+begin
+ FController := NIL;
+
+ if Assigned(FListaAnos) then
+ FlistaAnos.Free;
+
+ inherited;
+end;
+
+procedure TfrViewAgenteObjetivosFacturas.CustomViewShow(Sender: TObject);
+begin
+ cbxListaAnos.OnChange := OnListaAnosChange; //OJO SIEMPRE ANTES DEL INHERITED
+ inherited;
+ cbxListaAnos.ItemIndex := 0;
+end;
+
+function TfrViewAgenteObjetivosFacturas.GetController: IAgentesController;
+begin
+ Result := FController;
+end;
+
+function TfrViewAgenteObjetivosFacturas.GetListaAnos: TStringList;
+begin
+ Result := FListaAnos;
+end;
+
+procedure TfrViewAgenteObjetivosFacturas.OnListaAnosChange(Sender: TObject; const Text: string);
+begin
+ dsDetalles.DataTable.Filter := 'ANO = ''' + Text + '''';
+ dsDetalles.DataTable.Filtered :=True;
+end;
+
+procedure TfrViewAgenteObjetivosFacturas.Refrescar;
+begin
+ //Volvemos a cargar los años de los objetivos
+ if Assigned(FController) then
+ ListaAnos := FController.DarListaAnosObjetivosFacturasAgente(dsDetalles.DataTable.FieldByName(fld_Agentes_Objetivos_facturasID_AGENTE).AsInteger);
+ cbxListaAnos.ItemIndex := 0;
+end;
+
+procedure TfrViewAgenteObjetivosFacturas.SetController(const Value: IAgentesController);
+begin
+ FController := Value;
+
+ if Assigned(FController) then
+ ListaAnos := FController.DarListaAnosObjetivosFacturasAgente(dsDetalles.DataTable.FieldByName(fld_Agentes_Objetivos_facturasID_AGENTE).AsInteger);
+end;
+
+procedure TfrViewAgenteObjetivosFacturas.SetListaAnos(const Value: TStringList);
+var
+ i: Integer;
+ AStringAnterior: String;
+
+begin
+ AStringAnterior := '';
+ if Assigned(FListaAnos) and (FListaAnos.Count > 0) then
+ begin
+ AStringAnterior := FListaAnos.ValueFromIndex[cbxListaAnos.ItemIndex];
+ FListaAnos.Free;
+ end;
+
+ //Se asigna el nuevo TStringList
+ FListaAnos := Value;
+
+ if Assigned(FListaAnos) then
+ begin
+ cbxListaAnos.Strings.BeginUpdate;
+ cbxListaAnos.Strings.Clear;
+ for i := 0 to FListaAnos.Count - 1 do
+ cbxListaAnos.Strings.Append(FListaAnos.Names[i]);
+
+ //Se posiciona en el elemento que habia anteriormente
+ if Length(AStringAnterior) > 0 then
+ begin
+ if FListaAnos.IndexOfName(AStringAnterior) <> -1 then
+ cbxListaAnos.ItemIndex := FListaAnos.IndexOfName(AStringAnterior)
+ else
+ cbxListaAnos.ItemIndex := 0;
+ end;
+
+ cbxListaAnos.Strings.EndUpdate;
+ end;
+end;
+
+end.
diff --git a/Source/Modulos/Gestor de informes/Plugin/uPluginGestorInformes.dfm b/Source/Modulos/Gestor de informes/Plugin/uPluginGestorInformes.dfm
index 00e3b86..83361d7 100644
--- a/Source/Modulos/Gestor de informes/Plugin/uPluginGestorInformes.dfm
+++ b/Source/Modulos/Gestor de informes/Plugin/uPluginGestorInformes.dfm
@@ -46,7 +46,9 @@ object PluginGestorInformes: TPluginGestorInformes
object actInformeFacturasCliente: TAction
Category = 'Facturas de cliente'
Caption = 'Listado de facturas de cliente'
+ Enabled = False
ImageIndex = 0
+ Visible = False
OnExecute = actInformeFacturasClienteExecute
end
object actInformeFacturasClientePendientes: TAction
diff --git a/Source/Modulos/Informe margen por articulo/Data/InfMargenArticulo_data.drc b/Source/Modulos/Informe margen por articulo/Data/InfMargenArticulo_data.drc
index 15aca7d..db74e17 100644
--- a/Source/Modulos/Informe margen por articulo/Data/InfMargenArticulo_data.drc
+++ b/Source/Modulos/Informe margen por articulo/Data/InfMargenArticulo_data.drc
@@ -14,4 +14,4 @@ END
/* C:\Codigo\Source\Modulos\Informe margen por articulo\Data\uDataModuleInfMargenArticulo.dfm */
/* C:\Codigo\Source\Modulos\Informe margen por articulo\Data\InfMargenArticulo_data.res */
-/* c:\temp\dtfD3.tmp */
+/* c:\temp\dtf7A.tmp */
diff --git a/Source/Modulos/Informe margen por articulo/Model/InfMargenArticulo_model.drc b/Source/Modulos/Informe margen por articulo/Model/InfMargenArticulo_model.drc
index 6b3ef8d..8900d4b 100644
--- a/Source/Modulos/Informe margen por articulo/Model/InfMargenArticulo_model.drc
+++ b/Source/Modulos/Informe margen por articulo/Model/InfMargenArticulo_model.drc
@@ -13,4 +13,4 @@ BEGIN
END
/* C:\Codigo\Source\Modulos\Informe margen por articulo\Model\InfMargenArticulo_model.res */
-/* c:\temp\dtfD1.tmp */
+/* c:\temp\dtf78.tmp */
diff --git a/Source/Modulos/Informe margen por articulo/Views/InfMargenArticulo_view.drc b/Source/Modulos/Informe margen por articulo/Views/InfMargenArticulo_view.drc
index 5fd56e6..2e1ba92 100644
--- a/Source/Modulos/Informe margen por articulo/Views/InfMargenArticulo_view.drc
+++ b/Source/Modulos/Informe margen por articulo/Views/InfMargenArticulo_view.drc
@@ -16,4 +16,4 @@ END
/* C:\Codigo\Source\Modulos\Informe margen por articulo\Views\uViewInfMargenArticulo.dfm */
/* C:\Codigo\Source\Modulos\Informe margen por articulo\Views\uEditorInfMargenArticulo.dfm */
/* C:\Codigo\Source\Modulos\Informe margen por articulo\Views\InfMargenArticulo_view.res */
-/* c:\temp\dtfD7.tmp */
+/* c:\temp\dtf7E.tmp */
diff --git a/Source/Modulos/Informe ventas por articulo/Data/InfVentasArticulo_data.drc b/Source/Modulos/Informe ventas por articulo/Data/InfVentasArticulo_data.drc
index 3f00737..23b9ca5 100644
--- a/Source/Modulos/Informe ventas por articulo/Data/InfVentasArticulo_data.drc
+++ b/Source/Modulos/Informe ventas por articulo/Data/InfVentasArticulo_data.drc
@@ -14,4 +14,4 @@ END
/* C:\Codigo\Source\Modulos\Informe ventas por articulo\Data\uDataModuleInfVentasArticulo.dfm */
/* C:\Codigo\Source\Modulos\Informe ventas por articulo\Data\InfVentasArticulo_data.res */
-/* c:\temp\dtfC9.tmp */
+/* c:\temp\dtf70.tmp */
diff --git a/Source/Modulos/Informe ventas por articulo/Model/InfVentasArticulo_model.drc b/Source/Modulos/Informe ventas por articulo/Model/InfVentasArticulo_model.drc
index 134bbbb..e0d6277 100644
--- a/Source/Modulos/Informe ventas por articulo/Model/InfVentasArticulo_model.drc
+++ b/Source/Modulos/Informe ventas por articulo/Model/InfVentasArticulo_model.drc
@@ -13,4 +13,4 @@ BEGIN
END
/* C:\Codigo\Source\Modulos\Informe ventas por articulo\Model\InfVentasArticulo_model.res */
-/* c:\temp\dtfC7.tmp */
+/* c:\temp\dtf6E.tmp */
diff --git a/Source/Modulos/Informe ventas por articulo/Views/InfVentasArticulo_view.drc b/Source/Modulos/Informe ventas por articulo/Views/InfVentasArticulo_view.drc
index e47cd86..d168ae4 100644
--- a/Source/Modulos/Informe ventas por articulo/Views/InfVentasArticulo_view.drc
+++ b/Source/Modulos/Informe ventas por articulo/Views/InfVentasArticulo_view.drc
@@ -19,4 +19,4 @@ END
/* C:\Codigo\Source\Modulos\Informe ventas por articulo\Views\uViewInfVentasAlbArticulo.dfm */
/* C:\Codigo\Source\Modulos\Informe ventas por articulo\Views\uEditorInfVentasAlbArticulo.dfm */
/* C:\Codigo\Source\Modulos\Informe ventas por articulo\Views\InfVentasArticulo_view.res */
-/* c:\temp\dtfCD.tmp */
+/* c:\temp\dtf74.tmp */
diff --git a/Source/Modulos/Informes base/Controller/InformesBase_controller.drc b/Source/Modulos/Informes base/Controller/InformesBase_controller.drc
index f3d1810..a14d362 100644
--- a/Source/Modulos/Informes base/Controller/InformesBase_controller.drc
+++ b/Source/Modulos/Informes base/Controller/InformesBase_controller.drc
@@ -13,4 +13,4 @@ BEGIN
END
/* C:\Codigo\Source\Modulos\Informes base\Controller\InformesBase_controller.res */
-/* c:\temp\dtfBD.tmp */
+/* c:\temp\dtf64.tmp */
diff --git a/Source/Modulos/Informes base/Data/Informes_data.drc b/Source/Modulos/Informes base/Data/Informes_data.drc
index 694b662..f04dc01 100644
--- a/Source/Modulos/Informes base/Data/Informes_data.drc
+++ b/Source/Modulos/Informes base/Data/Informes_data.drc
@@ -14,4 +14,4 @@ END
/* C:\Codigo\Source\Modulos\Informes base\Data\uDataModuleInformes.dfm */
/* C:\Codigo\Source\Modulos\Informes base\Data\Informes_data.res */
-/* c:\temp\dtfB9.tmp */
+/* c:\temp\dtf60.tmp */
diff --git a/Source/Modulos/Informes base/Model/Informes_model.drc b/Source/Modulos/Informes base/Model/Informes_model.drc
index fcee6d1..d9a7143 100644
--- a/Source/Modulos/Informes base/Model/Informes_model.drc
+++ b/Source/Modulos/Informes base/Model/Informes_model.drc
@@ -13,4 +13,4 @@ BEGIN
END
/* C:\Codigo\Source\Modulos\Informes base\Model\Informes_model.res */
-/* c:\temp\dtfB7.tmp */
+/* c:\temp\dtf5E.tmp */
diff --git a/Source/Modulos/Informes base/Views/Informes_view.drc b/Source/Modulos/Informes base/Views/Informes_view.drc
index 2654004..c2ea7b9 100644
--- a/Source/Modulos/Informes base/Views/Informes_view.drc
+++ b/Source/Modulos/Informes base/Views/Informes_view.drc
@@ -15,4 +15,4 @@ END
/* C:\Codigo\Source\Modulos\Informes base\Views\uViewInformes.dfm */
/* C:\Codigo\Source\Modulos\Informes base\Views\uEditorInformes.dfm */
/* C:\Codigo\Source\Modulos\Informes base\Views\Informes_view.res */
-/* c:\temp\dtfC1.tmp */
+/* c:\temp\dtf68.tmp */
diff --git a/Source/Modulos/Pedidos de cliente/Controller/PedidosCliente_controller.drc b/Source/Modulos/Pedidos de cliente/Controller/PedidosCliente_controller.drc
index 09ab45f..955165c 100644
--- a/Source/Modulos/Pedidos de cliente/Controller/PedidosCliente_controller.drc
+++ b/Source/Modulos/Pedidos de cliente/Controller/PedidosCliente_controller.drc
@@ -13,4 +13,4 @@ BEGIN
END
/* C:\Codigo\Source\Modulos\Pedidos de cliente\Controller\PedidosCliente_controller.RES */
-/* c:\temp\dtf10B.tmp */
+/* c:\temp\dtfB2.tmp */
diff --git a/Source/Modulos/Pedidos de cliente/Data/PedidosCliente_data.drc b/Source/Modulos/Pedidos de cliente/Data/PedidosCliente_data.drc
index 3af1dba..bcc87b0 100644
--- a/Source/Modulos/Pedidos de cliente/Data/PedidosCliente_data.drc
+++ b/Source/Modulos/Pedidos de cliente/Data/PedidosCliente_data.drc
@@ -14,4 +14,4 @@ END
/* C:\Codigo\Source\Modulos\Pedidos de cliente\Data\uDataModulePedidosCliente.dfm */
/* C:\Codigo\Source\Modulos\Pedidos de cliente\Data\PedidosCliente_data.RES */
-/* c:\temp\dtf109.tmp */
+/* c:\temp\dtfB0.tmp */
diff --git a/Source/Modulos/Pedidos de cliente/Model/PedidosCliente_model.drc b/Source/Modulos/Pedidos de cliente/Model/PedidosCliente_model.drc
index 63cc1ae..4541034 100644
--- a/Source/Modulos/Pedidos de cliente/Model/PedidosCliente_model.drc
+++ b/Source/Modulos/Pedidos de cliente/Model/PedidosCliente_model.drc
@@ -13,4 +13,4 @@ BEGIN
END
/* C:\Codigo\Source\Modulos\Pedidos de cliente\Model\PedidosCliente_model.RES */
-/* c:\temp\dtf107.tmp */
+/* c:\temp\dtfAE.tmp */
diff --git a/Source/Modulos/Pedidos de cliente/Plugin/PedidosCliente_plugin.drc b/Source/Modulos/Pedidos de cliente/Plugin/PedidosCliente_plugin.drc
index 4380467..712a54b 100644
--- a/Source/Modulos/Pedidos de cliente/Plugin/PedidosCliente_plugin.drc
+++ b/Source/Modulos/Pedidos de cliente/Plugin/PedidosCliente_plugin.drc
@@ -14,4 +14,4 @@ END
/* C:\Codigo\Source\Modulos\Pedidos de cliente\Plugin\uPluginPedidosCliente.dfm */
/* C:\Codigo\Source\Modulos\Pedidos de cliente\Plugin\PedidosCliente_plugin.RES */
-/* c:\temp\dtf16F.tmp */
+/* c:\temp\dtf116.tmp */
diff --git a/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.drc b/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.drc
index 9e65d4b..8109ddf 100644
--- a/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.drc
+++ b/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.drc
@@ -26,4 +26,4 @@ END
/* C:\Codigo\Source\Modulos\Pedidos de cliente\Views\uEditorElegirArticulosPedidoCliente.dfm */
/* C:\Codigo\Source\Modulos\Pedidos de cliente\Views\uEditorDireccionEntregaPedidoCliente.dfm */
/* C:\Codigo\Source\Modulos\Pedidos de cliente\Views\PedidosCliente_view.RES */
-/* c:\temp\dtf16D.tmp */
+/* c:\temp\dtf114.tmp */
diff --git a/Source/Modulos/Tienda web/Data/TiendaWeb_data.drc b/Source/Modulos/Tienda web/Data/TiendaWeb_data.drc
index 79221a1..f14f5ca 100644
--- a/Source/Modulos/Tienda web/Data/TiendaWeb_data.drc
+++ b/Source/Modulos/Tienda web/Data/TiendaWeb_data.drc
@@ -14,4 +14,4 @@ END
/* C:\Codigo\Source\Modulos\Tienda web\Data\uDataModuleTiendaWeb.dfm */
/* C:\Codigo\Source\Modulos\Tienda web\Data\TiendaWeb_data.res */
-/* c:\temp\dtf121.tmp */
+/* c:\temp\dtfC8.tmp */
diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL
index c6cfd30..c4ce583 100644
--- a/Source/Servicios/FactuGES.RODL
+++ b/Source/Servicios/FactuGES.RODL
@@ -37,6 +37,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Servicios/FactuGES_Intf.pas b/Source/Servicios/FactuGES_Intf.pas
index 2b6192a..39357bb 100644
--- a/Source/Servicios/FactuGES_Intf.pas
+++ b/Source/Servicios/FactuGES_Intf.pas
@@ -222,6 +222,8 @@ type
function GenerarInformeEtiquetas(const ListaID: TIntegerArray): Binary;
function DarListaDescripcionesProveedores: AnsiString;
function DarListaContratosEmpleados: AnsiString;
+ function DarListaAnosObjetivosAlbaranes(const ID_AGENTE: Integer): StringArray;
+ function DarListaAnosObjetivosFacturas(const ID_AGENTE: Integer): StringArray;
end;
{ CosrvContactos }
@@ -238,6 +240,8 @@ type
function GenerarInformeEtiquetas(const ListaID: TIntegerArray): Binary;
function DarListaDescripcionesProveedores: AnsiString;
function DarListaContratosEmpleados: AnsiString;
+ function DarListaAnosObjetivosAlbaranes(const ID_AGENTE: Integer): StringArray;
+ function DarListaAnosObjetivosFacturas(const ID_AGENTE: Integer): StringArray;
end;
{ IsrvLogin }
@@ -1526,6 +1530,40 @@ begin
end
end;
+function TsrvContactos_Proxy.DarListaAnosObjetivosAlbaranes(const ID_AGENTE: Integer): StringArray;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'DarListaAnosObjetivosAlbaranes');
+ __Message.Write('ID_AGENTE', TypeInfo(Integer), ID_AGENTE, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(DataAbstract4_Intf.StringArray), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TsrvContactos_Proxy.DarListaAnosObjetivosFacturas(const ID_AGENTE: Integer): StringArray;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'DarListaAnosObjetivosFacturas');
+ __Message.Write('ID_AGENTE', TypeInfo(Integer), ID_AGENTE, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(DataAbstract4_Intf.StringArray), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
{ CosrvLogin }
class function CosrvLogin.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvLogin;
diff --git a/Source/Servicios/FactuGES_Invk.pas b/Source/Servicios/FactuGES_Invk.pas
index 1140d5f..6a68e6e 100644
--- a/Source/Servicios/FactuGES_Invk.pas
+++ b/Source/Servicios/FactuGES_Invk.pas
@@ -30,6 +30,8 @@ type
procedure Invoke_GenerarInformeEtiquetas(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_DarListaDescripcionesProveedores(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_DarListaContratosEmpleados(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_DarListaAnosObjetivosAlbaranes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_DarListaAnosObjetivosFacturas(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
end;
TsrvLogin_Invoker = class(TDataAbstractService_Invoker)
@@ -502,6 +504,62 @@ begin
end;
end;
+procedure TsrvContactos_Invoker.Invoke_DarListaAnosObjetivosAlbaranes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function DarListaAnosObjetivosAlbaranes(const ID_AGENTE: Integer): StringArray; }
+var
+ ID_AGENTE: Integer;
+ lResult: DataAbstract4_Intf.StringArray;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ __Message.Read('ID_AGENTE', TypeInfo(Integer), ID_AGENTE, []);
+
+ lResult := (__Instance as IsrvContactos).DarListaAnosObjetivosAlbaranes(ID_AGENTE);
+
+ __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvContactos', 'DarListaAnosObjetivosAlbaranesResponse');
+ __Message.Write('Result', TypeInfo(DataAbstract4_Intf.StringArray), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TsrvContactos_Invoker.Invoke_DarListaAnosObjetivosFacturas(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function DarListaAnosObjetivosFacturas(const ID_AGENTE: Integer): StringArray; }
+var
+ ID_AGENTE: Integer;
+ lResult: DataAbstract4_Intf.StringArray;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ __Message.Read('ID_AGENTE', TypeInfo(Integer), ID_AGENTE, []);
+
+ lResult := (__Instance as IsrvContactos).DarListaAnosObjetivosFacturas(ID_AGENTE);
+
+ __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvContactos', 'DarListaAnosObjetivosFacturasResponse');
+ __Message.Write('Result', TypeInfo(DataAbstract4_Intf.StringArray), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
{ TsrvLogin_Invoker }
constructor TsrvLogin_Invoker.Create;
diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr
index f4d1305..c6bec37 100644
--- a/Source/Servidor/FactuGES_Server.dpr
+++ b/Source/Servidor/FactuGES_Server.dpr
@@ -164,12 +164,12 @@ uses
srvInfMargenArticulo_Impl in '..\Modulos\Informe margen por articulo\Servidor\srvInfMargenArticulo_Impl.pas' {srvInfMargenArticulo: TDARemoteService},
schInventarioClient_Intf in '..\Modulos\Inventario\Model\schInventarioClient_Intf.pas',
schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas',
- schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas',
- schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas',
schInfVentasArticuloClient_Intf in '..\Modulos\Informe ventas por articulo\Model\schInfVentasArticuloClient_Intf.pas',
schInfVentasArticuloServer_Intf in '..\Modulos\Informe ventas por articulo\Model\schInfVentasArticuloServer_Intf.pas',
schAlbaranesProveedorClient_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorClient_Intf.pas',
- schAlbaranesProveedorServer_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorServer_Intf.pas';
+ schAlbaranesProveedorServer_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorServer_Intf.pas',
+ schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas',
+ schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas';
{$R *.res}
{$R ..\Servicios\RODLFile.res}
diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj
index 2b4a512..63351d2 100644
--- a/Source/Servidor/FactuGES_Server.dproj
+++ b/Source/Servidor/FactuGES_Server.dproj
@@ -35,22 +35,7 @@
Delphi.Personality
-FalseTrueFalse/standaloneTrueFalse4200FalseFalseFalseFalseFalse308212524.2.0.04.2.0.0lunes, 31 de octubre de 2011 11:24
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+FalseTrueFalse/standaloneTrueFalse4210FalseFalseFalseFalseFalse308212524.2.1.04.2.1.0lunes, 30 de enero de 2012 15:13
ExpressPrinting System by Developer Express Inc.
FactuGES_Server.dprFalse