Primera subida de objetivos de agentes
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES2/trunk@143 b2cfbe5a-eba1-4a0c-8b32-7feea0a119f2
This commit is contained in:
parent
5ddbdfe3ea
commit
76b39f8bc2
BIN
Build/Build.fbl6
BIN
Build/Build.fbl6
Binary file not shown.
@ -1592,7 +1592,7 @@ SELECT
|
||||
FROM
|
||||
ALBARANES_PROVEEDOR
|
||||
INNER JOIN CONTACTOS PROVEEDORES ON (PROVEEDORES.ID = ALBARANES_PROVEEDOR.ID_PROVEEDOR)
|
||||
INNER JOIN CONTACTOS CLIENTES ON (CLIENTES.ID = ALBARANES_PROVEEDOR.ID_CLIENTE_FINAL)
|
||||
LEFT JOIN CONTACTOS CLIENTES ON (CLIENTES.ID = ALBARANES_PROVEEDOR.ID_CLIENTE_FINAL)
|
||||
LEFT OUTER JOIN ALBARANES_PROVEEDOR ALB_DEV ON (ALB_DEV.ID = ALBARANES_PROVEEDOR.ID_ALBARAN_DEV)
|
||||
LEFT OUTER JOIN FACTURAS_PROVEEDOR FAC_PROV_ALB_DEV ON (FAC_PROV_ALB_DEV.ID = ALB_DEV.ID_FACTURA)
|
||||
LEFT OUTER JOIN FACTURAS_PROVEEDOR ON (FACTURAS_PROVEEDOR.ID = ALBARANES_PROVEEDOR.ID_FACTURA)
|
||||
|
||||
@ -63,58 +63,58 @@
|
||||
<DesignClass>TDataModule</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\adortl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxDataD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxEditorsD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxExportD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxExtEditorsD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxGridD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxIntl6D11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxIntlPrintSys3D11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxPageControlD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dbrtl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dclIndyCore.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\designide.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dsnap.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxCoreD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxPSCoreD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\dxThemeD11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\GUISDK_D11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\IndyCore.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\IndyProtocols.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\IndySystem.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\Jcl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JclVcl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JSDialog100.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvCmpD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvCoreD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvDlgsD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvMMD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvNetD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvPageCompsD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvStdCtrlsD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvSystemD11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\pckMD5.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\pckUCDataConnector.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\pckUserControl_RT.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\PngComponentsD10.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\PNG_D10.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\RemObjects_Indy_D11.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\TB2k_D10.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\tbx_d10.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vclactnband.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcldb.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcljpg.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\VclSmp.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\vclx.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\xmlrtl.dcp" />
|
||||
<DCCReference Include="..\Servidor\adortl.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxDataD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxEditorsD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxExportD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxExtEditorsD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxGridD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxIntl6D11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxIntlPrintSys3D11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\cxPageControlD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="..\Servidor\dbrtl.dcp" />
|
||||
<DCCReference Include="..\Servidor\dclIndyCore.dcp" />
|
||||
<DCCReference Include="..\Servidor\designide.dcp" />
|
||||
<DCCReference Include="..\Servidor\dsnap.dcp" />
|
||||
<DCCReference Include="..\Servidor\dxCoreD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\dxPSCoreD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\dxThemeD11.dcp" />
|
||||
<DCCReference Include="..\Servidor\GUISDK_D11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\IndyCore.dcp" />
|
||||
<DCCReference Include="..\Servidor\IndyProtocols.dcp" />
|
||||
<DCCReference Include="..\Servidor\IndySystem.dcp" />
|
||||
<DCCReference Include="..\Servidor\Jcl.dcp" />
|
||||
<DCCReference Include="..\Servidor\JclVcl.dcp" />
|
||||
<DCCReference Include="..\Servidor\JSDialog100.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvCmpD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvCoreD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvDlgsD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvMMD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvNetD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvPageCompsD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvStdCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\JvSystemD11R.dcp" />
|
||||
<DCCReference Include="..\Servidor\pckMD5.dcp" />
|
||||
<DCCReference Include="..\Servidor\pckUCDataConnector.dcp" />
|
||||
<DCCReference Include="..\Servidor\pckUserControl_RT.dcp" />
|
||||
<DCCReference Include="..\Servidor\PngComponentsD10.dcp" />
|
||||
<DCCReference Include="..\Servidor\PNG_D10.dcp" />
|
||||
<DCCReference Include="..\Servidor\RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="..\Servidor\RemObjects_Indy_D11.dcp" />
|
||||
<DCCReference Include="..\Servidor\rtl.dcp" />
|
||||
<DCCReference Include="..\Servidor\TB2k_D10.dcp" />
|
||||
<DCCReference Include="..\Servidor\tbx_d10.dcp" />
|
||||
<DCCReference Include="..\Servidor\vcl.dcp" />
|
||||
<DCCReference Include="..\Servidor\vclactnband.dcp" />
|
||||
<DCCReference Include="..\Servidor\vcldb.dcp" />
|
||||
<DCCReference Include="..\Servidor\vcljpg.dcp" />
|
||||
<DCCReference Include="..\Servidor\VclSmp.dcp" />
|
||||
<DCCReference Include="..\Servidor\vclx.dcp" />
|
||||
<DCCReference Include="..\Servidor\xmlrtl.dcp" />
|
||||
<DCCReference Include="Conexion\uConfigurarConexion.pas">
|
||||
<Form>fConfigurarConexion</Form>
|
||||
<DesignClass>TForm</DesignClass>
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">1</VersionInfo><VersionInfo Name="Release">9</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.1.9.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.1.9.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages></Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">2</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.2.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.2.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages></Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
||||
<ItemGroup>
|
||||
|
||||
57
Source/Informes/1/InformeObjetivosAgentesAlbaranes.fr3
Normal file
57
Source/Informes/1/InformeObjetivosAgentesAlbaranes.fr3
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -74,6 +74,11 @@ type
|
||||
frxDBInformeListadoClientesMayorOrdenesDevResumen: TfrxDBDataset;
|
||||
DADSInformeListadoClientesMayorOrdenesDevResumen: TDADataSource;
|
||||
tbl_InformeListadoClientesMayorOrdenesDevResumen: TDAMemDataTable;
|
||||
frxDBInformeObjetivos: TfrxDBDataset;
|
||||
DADSInformeObjetivos: TDADataSource;
|
||||
tbl_InformeObjetivosMensual: TDAMemDataTable;
|
||||
tbl_InformeObjetivosTrimestral: TDAMemDataTable;
|
||||
tbl_InformeObjetivosSemestral: TDAMemDataTable;
|
||||
schReport: TDASchema;
|
||||
procedure DataModuleCreate(Sender: TObject);
|
||||
procedure DataModuleDestroy(Sender: TObject);
|
||||
@ -91,6 +96,8 @@ type
|
||||
FAno2: Variant;
|
||||
FIntervalo: Variant;
|
||||
FListaIDClientes: TIntegerArray;
|
||||
FListaIDAgentes: TIntegerArray;
|
||||
FListaNombresAgentes : TStringList;
|
||||
FTopN: Integer;
|
||||
|
||||
//Genera cada uno de los albaranes a imprimir
|
||||
@ -98,6 +105,9 @@ type
|
||||
|
||||
procedure PrepararTablaInformeGrafComp(ATabla: TDAMemDataTable);
|
||||
procedure PrepararTablaResumenInformeGrafComp(ATabla: IDADataset);
|
||||
procedure PrepararTablaInformeObjetivos(ATabla: TDAMemDataTable);
|
||||
procedure IniciarParametrosInforme;
|
||||
procedure RecuperarNombresAgentes;
|
||||
|
||||
public
|
||||
function GenerarEtiquetas(const AID : Integer; withRefCliente: Boolean): Binary;
|
||||
@ -107,6 +117,10 @@ type
|
||||
const VerIncidencias: Boolean): Binary;
|
||||
|
||||
function GenerarInformeAlbaranesGrafComp(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDClientes: TIntegerArray; const TopN: Integer; const Serie: Variant): Binary;
|
||||
|
||||
function GenerarInformeObjetivosAgentesAlbaranes(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDAgentes: TIntegerArray; const TopN: Integer): Binary;
|
||||
|
||||
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -114,12 +128,14 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
uSistemaFunc, uDataModuleServer, schAlbaranesClienteClient_Intf, srvGestorInformes_Impl;
|
||||
uSistemaFunc, uDataModuleServer, schAlbaranesClienteClient_Intf, srvGestorInformes_Impl,
|
||||
DataAbstract4_Intf, uROServer;
|
||||
|
||||
const
|
||||
rptInforme = 'InfAlbaranCliente.fr3';
|
||||
rptInfEtiquetas = 'InfEtiquetasAlbaranCliente.fr3';
|
||||
rptInformeListadoAlbaranesClienteGrafComp = 'InformeListadoAlbaranesClienteGrafComp.fr3';
|
||||
rptInformeObjetivosAgentesAlbaranes = 'InformeObjetivosAgentesAlbaranes.fr3';
|
||||
|
||||
{ Dataset names for schReport }
|
||||
ds_InformeCabecera = 'Informe_Cabecera';
|
||||
@ -140,12 +156,16 @@ begin
|
||||
|
||||
frxDBDetalles.DataSource := DADSDetalles;
|
||||
frxDBDetalles.CloseDataSource := False;
|
||||
|
||||
FListaNombresAgentes := TStringList.Create;
|
||||
end;
|
||||
|
||||
procedure TRptAlbaranesCliente.DataModuleDestroy(Sender: TObject);
|
||||
begin
|
||||
tbl_Cabecera.Active := False;
|
||||
tbl_Detalles.Active := False;
|
||||
|
||||
FreeANDNIL(FListaNombresAgentes);
|
||||
end;
|
||||
|
||||
procedure TRptAlbaranesCliente.frxReportGetValue(const VarName: string;
|
||||
@ -326,6 +346,90 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TRptAlbaranesCliente.GenerarInformeObjetivosAgentesAlbaranes(
|
||||
const IdEmpresa: Integer; const Intervalo, Ano1, Ano2: Variant;
|
||||
const ListaIDAgentes: TIntegerArray; const TopN: Integer): Binary;
|
||||
var
|
||||
AStream: TMemoryStream;
|
||||
AInforme: Variant;
|
||||
|
||||
begin
|
||||
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||
|
||||
AStream := TMemoryStream.Create;
|
||||
try
|
||||
//Inicializamos parametros
|
||||
FIdEmpresa := IdEmpresa;
|
||||
FAno1 := Ano1;
|
||||
FIntervalo := Intervalo;
|
||||
|
||||
if Assigned(FListaIDAgentes) then
|
||||
FListaIDClientes.Free;
|
||||
FListaIDAgentes := ListaIDAgentes;
|
||||
|
||||
//Preparamos la tabla correspondiente y la abrimos para el informe
|
||||
if (FIntervalo = CTE_MENSUAL) then
|
||||
PrepararTablaInformeObjetivos(tbl_InformeObjetivosMensual)
|
||||
else if (FIntervalo = CTE_TRIMESTRAL) then
|
||||
PrepararTablaInformeObjetivos(tbl_InformeObjetivosTrimestral)
|
||||
else
|
||||
PrepararTablaInformeObjetivos(tbl_InformeObjetivosSemestral);
|
||||
|
||||
//Se preparan las tablas del listado resumen del informe
|
||||
// PrepararTablaResumenInformeGrafComp(tbl_InformeListadoClientesMayorAlbaranadoResumen);
|
||||
// PrepararTablaResumenInformeGrafComp(tbl_InformeListadoClientesMayorIncidenciasResumen);
|
||||
// PrepararTablaResumenInformeGrafComp(tbl_InformeListadoClientesMayorOrdenesDevResumen);
|
||||
|
||||
Result := Binary.Create;
|
||||
|
||||
AInforme := DarRutaFichero(DarRutaInformes, rptInformeObjetivosAgentesAlbaranes, IntTostr(FIdEmpresa));
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: GenerarInformeObjetivosAgentesAlbaranes, no encuentra informe ' + rptInformeObjetivosAgentesAlbaranes));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
IniciarParametrosInforme;
|
||||
|
||||
frxReport.PrepareReport(False);
|
||||
frxReport.PreviewPages.SaveToStream(Result);
|
||||
|
||||
finally
|
||||
AStream.Free;
|
||||
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRptAlbaranesCliente.IniciarParametrosInforme;
|
||||
var
|
||||
ATextos : TStringList;
|
||||
ACadena : String;
|
||||
begin
|
||||
ATextos := TStringList.Create;
|
||||
|
||||
try
|
||||
ACadena := 'Año: ' + FAno1;
|
||||
ATextos.Add(ACadena);
|
||||
|
||||
ACadena := 'Agente: ';
|
||||
if Assigned(FListaIDAgentes) and (FListaIDAgentes.Count > 0) then
|
||||
begin
|
||||
RecuperarNombresAgentes;
|
||||
ACadena := ACadena + FListaNombresAgentes.Text;
|
||||
end
|
||||
else begin
|
||||
ACadena := 'Todos los agentes';
|
||||
// if FDesglosado then
|
||||
ACadena := ACadena + ' (desglosados)'
|
||||
end;
|
||||
|
||||
ATextos.Add(ACadena);
|
||||
ACadena := '';
|
||||
|
||||
frxReport.Variables.Variables['TextoParametros'] := ATextos.Text;
|
||||
finally
|
||||
FreeAndNil(ATextos);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRptAlbaranesCliente.PrepararTablaInformeGrafComp(
|
||||
ATabla: TDAMemDataTable);
|
||||
begin
|
||||
@ -340,6 +444,40 @@ begin
|
||||
ATabla.Active := True;
|
||||
end;
|
||||
|
||||
procedure TRptAlbaranesCliente.PrepararTablaInformeObjetivos(ATabla: TDAMemDataTable);
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
i: Integer;
|
||||
|
||||
begin
|
||||
if ATabla.Active then
|
||||
ATabla.Active := False;
|
||||
|
||||
// Filtrar el informe por agente
|
||||
if Assigned(FListaIDAgentes) then
|
||||
begin
|
||||
with ATabla.DynamicWhere do
|
||||
begin
|
||||
for i := 0 to FListaIDAgentes.Count - 1 do
|
||||
begin
|
||||
|
||||
// (ID_AGENTE = ID)
|
||||
Condicion := NewBinaryExpression(NewField('OBJETIVOS', 'ID_AGENTE'), NewConstant(FListaIDAgentes.Items[i], datInteger), dboEqual);
|
||||
if IsEmpty then
|
||||
Expression := Condicion
|
||||
else
|
||||
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
DADSInformeObjetivos.DataTable := ATabla;
|
||||
ATabla.ParamByName('ID_EMPRESA').AsInteger := FIdEmpresa;
|
||||
ATabla.ParamByName('ANO1').AsVariant := FAno1;
|
||||
ATabla.Active := True;
|
||||
end;
|
||||
|
||||
procedure TRptAlbaranesCliente.PrepararTablaResumenInformeGrafComp(ATabla: IDADataset);
|
||||
begin
|
||||
if ATabla.Active then
|
||||
@ -351,4 +489,94 @@ begin
|
||||
ATabla.Active := True;
|
||||
end;
|
||||
|
||||
procedure TRptAlbaranesCliente.RecuperarNombresAgentes;
|
||||
var
|
||||
AContactosService : IsrvContactos;
|
||||
Intf : IInterface;
|
||||
AClientID : TGUID;
|
||||
|
||||
ATableNameArray: StringArray;
|
||||
ATableRequestInfoArray: TableRequestInfoArray;
|
||||
ATableRequestInfo: TableRequestInfoV5;
|
||||
AStream: TMemoryStream;
|
||||
ADataTable: TDAMemDataTable;
|
||||
i: Integer;
|
||||
AWhereBuilder : TDAWhereBuilder;
|
||||
ACondicion : TDAWhereExpression;
|
||||
begin
|
||||
CreateGUID(AClientID);
|
||||
|
||||
GetClassFactory('srvContactos').CreateInstance(AClientID, Intf);
|
||||
|
||||
if Assigned(Intf) then
|
||||
begin
|
||||
AContactosService := Intf as IsrvContactos;
|
||||
|
||||
ATableNameArray := StringArray.Create;
|
||||
ATableRequestInfoArray := TableRequestInfoArray.Create;
|
||||
AWhereBuilder := TDAWhereBuilder.Create;
|
||||
try
|
||||
ATableNameArray.Add('Agentes');
|
||||
ATableRequestInfo := TableRequestInfoV5.Create;
|
||||
|
||||
with ATableRequestInfo do
|
||||
begin
|
||||
IncludeSchema := True;
|
||||
MaxRecords := -1;
|
||||
UserFilter := '';
|
||||
|
||||
AWhereBuilder.Clear;
|
||||
with AWhereBuilder do
|
||||
for i := 0 to FListaIDAgentes.Count - 1 do
|
||||
begin
|
||||
ACondicion := NewBinaryExpression(
|
||||
NewBinaryExpression(NewField('', 'ID'), NewConstant(FListaIDAgentes[i], datInteger), dboEqual),
|
||||
NewBinaryExpression(NewField('', 'ID_EMPRESA'), NewConstant(FIdEmpresa, datInteger), dboEqual),
|
||||
dboAnd);
|
||||
|
||||
if not AWhereBuilder.IsEmpty then
|
||||
Expression := NewBinaryExpression(Expression, ACondicion, dboOr)
|
||||
else
|
||||
Expression := ACondicion;
|
||||
end;
|
||||
|
||||
WhereClause := AWhereBuilder.ExpressionToXmlNode(AWhereBuilder.Expression);
|
||||
end;
|
||||
|
||||
try
|
||||
ATableRequestInfoArray.Add(ATableRequestInfo);
|
||||
AStream := AContactosService.GetData(ATableNameArray, ATableRequestInfoArray);
|
||||
if Assigned(AStream) then
|
||||
begin
|
||||
ADataTable := TDAMemDataTable.Create(nil);
|
||||
try
|
||||
ADataTable.Name := 'Agentes';
|
||||
ADataTable.LocalDataStreamer := DABin2DataStreamer1;
|
||||
ADataTable.RemoteFetchEnabled := False;
|
||||
DABin2DataStreamer1.ReadDataset(AStream, ADataTable, True);
|
||||
|
||||
ADataTable.Open;
|
||||
FListaNombresAgentes.Clear;
|
||||
for i := 0 to ADataTable.RecordCount - 1 do
|
||||
begin
|
||||
FListaNombresAgentes.Add(ADataTable.FieldByName('NOMBRE').AsString);
|
||||
ADataTable.Next;
|
||||
end;
|
||||
|
||||
finally
|
||||
FreeANDNil(ADataTable);
|
||||
end;
|
||||
end;
|
||||
except
|
||||
on e: Exception do
|
||||
dmServer.EscribirLog(e.Message);
|
||||
end;
|
||||
finally
|
||||
FreeANDNIL(ATableRequestInfoArray);
|
||||
FreeANDNIL(ATableNameArray);
|
||||
FreeANDNIL(AWhereBuilder);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -86,6 +86,7 @@ contains
|
||||
uIEditorElegirPersonaContacto in 'View\uIEditorElegirPersonaContacto.pas',
|
||||
uAgentesController in 'uAgentesController.pas',
|
||||
uIEditorAgente in 'View\uIEditorAgente.pas',
|
||||
uIEditorAgentes in 'View\uIEditorAgentes.pas';
|
||||
uIEditorAgentes in 'View\uIEditorAgentes.pas',
|
||||
uIEditorElegirAgentes in 'View\uIEditorElegirAgentes.pas';
|
||||
|
||||
end.
|
||||
|
||||
@ -43,12 +43,6 @@
|
||||
<Borland.ProjectType>Package</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Package_Options><Package_Options Name="ImplicitBuild">False</Package_Options><Package_Options Name="DesigntimeOnly">False</Package_Options><Package_Options Name="RuntimeOnly">False</Package_Options></Package_Options><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Excluded_Packages Name="D:\MISDOC~1\BORLAN~1\Bpl\JclDebugExpert100.bpl">JCL Debug IDE extension</Excluded_Packages>
|
||||
<Excluded_Packages Name="D:\MISDOC~1\BORLAN~1\Bpl\JclProjectAnalysisExpert100.bpl">JCL Project Analyzer</Excluded_Packages>
|
||||
<Excluded_Packages Name="D:\MISDOC~1\BORLAN~1\Bpl\JclFavoriteFoldersExpert100.bpl">JCL Open and Save IDE dialogs with favorite folders</Excluded_Packages>
|
||||
@ -59,25 +53,6 @@
|
||||
<DelphiCompile Include="Contactos_controller.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="adortl.dcp" />
|
||||
<DCCReference Include="ApplicationBase.dcp" />
|
||||
<DCCReference Include="Base.dcp" />
|
||||
<DCCReference Include="ccpackD11.dcp" />
|
||||
<DCCReference Include="cfpack_d11.dcp" />
|
||||
<DCCReference Include="Contactos_data.dcp" />
|
||||
<DCCReference Include="Contactos_model.dcp" />
|
||||
<DCCReference Include="cxLibraryD11.dcp" />
|
||||
<DCCReference Include="DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="dbrtl.dcp" />
|
||||
<DCCReference Include="designide.dcp" />
|
||||
<DCCReference Include="dsnap.dcp" />
|
||||
<DCCReference Include="dxCoreD11.dcp" />
|
||||
<DCCReference Include="dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="dxThemeD11.dcp" />
|
||||
<DCCReference Include="GUIBase.dcp" />
|
||||
<DCCReference Include="GUISDK_D11R.dcp" />
|
||||
<DCCReference Include="RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="rtl.dcp" />
|
||||
<DCCReference Include="uAgentesController.pas" />
|
||||
<DCCReference Include="uClientesController.pas" />
|
||||
<DCCReference Include="uContactosController.pas" />
|
||||
@ -91,10 +66,25 @@
|
||||
<DCCReference Include="uGruposProveedorController.pas" />
|
||||
<DCCReference Include="uPersonalContactoController.pas" />
|
||||
<DCCReference Include="uProveedoresController.pas" />
|
||||
<DCCReference Include="vcl.dcp" />
|
||||
<DCCReference Include="vclactnband.dcp" />
|
||||
<DCCReference Include="vcldb.dcp" />
|
||||
<DCCReference Include="vclx.dcp" />
|
||||
<DCCReference Include="View\adortl.dcp" />
|
||||
<DCCReference Include="View\ApplicationBase.dcp" />
|
||||
<DCCReference Include="View\Base.dcp" />
|
||||
<DCCReference Include="View\ccpackD11.dcp" />
|
||||
<DCCReference Include="View\cfpack_d11.dcp" />
|
||||
<DCCReference Include="View\Contactos_data.dcp" />
|
||||
<DCCReference Include="View\Contactos_model.dcp" />
|
||||
<DCCReference Include="View\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="View\DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="View\dbrtl.dcp" />
|
||||
<DCCReference Include="View\designide.dcp" />
|
||||
<DCCReference Include="View\dsnap.dcp" />
|
||||
<DCCReference Include="View\dxCoreD11.dcp" />
|
||||
<DCCReference Include="View\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="View\dxThemeD11.dcp" />
|
||||
<DCCReference Include="View\GUIBase.dcp" />
|
||||
<DCCReference Include="View\GUISDK_D11R.dcp" />
|
||||
<DCCReference Include="View\RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="View\rtl.dcp" />
|
||||
<DCCReference Include="View\uIEditorAgente.pas" />
|
||||
<DCCReference Include="View\uIEditorAgentes.pas" />
|
||||
<DCCReference Include="View\uIEditorCliente.pas" />
|
||||
@ -103,6 +93,7 @@
|
||||
<DCCReference Include="View\uIEditorContactos.pas" />
|
||||
<DCCReference Include="View\uIEditorDatoBancarioContacto.pas" />
|
||||
<DCCReference Include="View\uIEditorDireccionContacto.pas" />
|
||||
<DCCReference Include="View\uIEditorElegirAgentes.pas" />
|
||||
<DCCReference Include="View\uIEditorElegirClientes.pas" />
|
||||
<DCCReference Include="View\uIEditorElegirContactos.pas" />
|
||||
<DCCReference Include="View\uIEditorElegirDireccionEntrega.pas" />
|
||||
@ -118,7 +109,11 @@
|
||||
<DCCReference Include="View\uIEditorPersonalContacto.pas" />
|
||||
<DCCReference Include="View\uIEditorProveedor.pas" />
|
||||
<DCCReference Include="View\uIEditorProveedores.pas" />
|
||||
<DCCReference Include="xmlrtl.dcp" />
|
||||
<DCCReference Include="View\vcl.dcp" />
|
||||
<DCCReference Include="View\vclactnband.dcp" />
|
||||
<DCCReference Include="View\vcldb.dcp" />
|
||||
<DCCReference Include="View\vclx.dcp" />
|
||||
<DCCReference Include="View\xmlrtl.dcp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<!-- EurekaLog First Line
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
unit uIEditorElegirAgentes;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
uIEditorContactos, uIEditorElegirContactos, uBizContactos, uGUIBase;
|
||||
|
||||
type
|
||||
IEditorElegirAgentes = interface(IEditorElegirContactos)
|
||||
['{88BA89D3-10E5-4954-86A9-F9A9CF0CFF73}']
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@ -28,6 +28,9 @@ type
|
||||
function Nuevo : IBizContacto; override;
|
||||
procedure Ver(AContacto : IBizContacto); override;
|
||||
procedure VerTodos(AContactos: IBizContacto); override;
|
||||
function ElegirContacto(AContactos : IBizContacto;
|
||||
AMensaje: String; AMultiSelect: Boolean): IBizContacto; override;
|
||||
|
||||
|
||||
function Eliminar(AAgente: IBizContacto; AllItems: Boolean = false): Boolean; overload;
|
||||
function EsEliminable(AAgente: IBizContacto): Boolean;
|
||||
@ -36,9 +39,9 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
Windows, SysUtils, cxControls, Dialogs, uDataModuleAgentes, uEditorRegistryUtils,
|
||||
Windows, SysUtils, Forms, cxControls, Controls, Dialogs, uDataModuleAgentes, uEditorRegistryUtils,
|
||||
uDataTableUtils, uDADataTable, DB, schContactosClient_Intf,
|
||||
uEditorGridBase, uIntegerListUtils;
|
||||
uEditorGridBase, uIntegerListUtils, uIEditorElegirAgentes;
|
||||
|
||||
{ TAgenteController }
|
||||
|
||||
@ -65,6 +68,31 @@ begin
|
||||
Result := inherited Duplicar(AContacto);
|
||||
end;
|
||||
|
||||
function TAgentesController.ElegirContacto(AContactos: IBizContacto;
|
||||
AMensaje: String; AMultiSelect: Boolean): IBizContacto;
|
||||
var
|
||||
AEditor : IEditorElegirAgentes;
|
||||
begin
|
||||
Result := NIL;
|
||||
|
||||
CreateEditor('EditorElegirAgentes', IEditorElegirAgentes, AEditor);
|
||||
if Assigned(AEditor) then
|
||||
begin
|
||||
try
|
||||
AEditor.Contactos := AContactos;
|
||||
AEditor.Controller := Self;
|
||||
AEditor.MultiSelect := AMultiSelect;
|
||||
AEditor.Mensaje := AMensaje;
|
||||
if IsPositiveResult(AEditor.ShowModal) then
|
||||
Result := AEditor.ContactosSeleccionados;
|
||||
finally
|
||||
AEditor.Release;
|
||||
AEditor := NIL;
|
||||
Application.ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TAgentesController.Eliminar(AAgente: IBizContacto; AllItems: Boolean = false): Boolean;
|
||||
//En el caso de eliminar almenos un elemento del conjunto se devuelve true
|
||||
var
|
||||
|
||||
@ -130,6 +130,7 @@ contains
|
||||
uViewAgenteComisiones in 'uViewAgenteComisiones.pas' {frViewAgenteComisiones: TFrame},
|
||||
uEditorAgente in 'uEditorAgente.pas' {fEditorAgente: TCustomEditor},
|
||||
uViewClienteDatosComerciales in 'uViewClienteDatosComerciales.pas' {frViewClienteDatosComerciales: TFrame},
|
||||
uViewClienteDescuentosArticulos in 'uViewClienteDescuentosArticulos.pas' {frViewClienteDescuentosArticulos: TFrame};
|
||||
uViewClienteDescuentosArticulos in 'uViewClienteDescuentosArticulos.pas' {frViewClienteDescuentosArticulos: TFrame},
|
||||
uEditorElegirAgentes in 'uEditorElegirAgentes.pas' {fEditorElegirAgentes: TCustomEditor};
|
||||
|
||||
end.
|
||||
|
||||
@ -49,65 +49,58 @@
|
||||
<DelphiCompile Include="Contactos_view.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\..\Lib\adortl.dcp" />
|
||||
<DCCReference Include="..\..\Lib\ApplicationBase.dcp" />
|
||||
<DCCReference Include="..\..\Lib\Articulos_controller.dcp" />
|
||||
<DCCReference Include="..\..\Lib\Base.dcp" />
|
||||
<DCCReference Include="..\..\Lib\bdertl.dcp" />
|
||||
<DCCReference Include="..\..\Lib\ccpackD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\cfpack_d11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\Contactos_controller.dcp" />
|
||||
<DCCReference Include="..\..\Lib\Contactos_model.dcp" />
|
||||
<DCCReference Include="..\..\Lib\cxDataD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\cxEditorsD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\cxExportD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\cxExtEditorsD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\cxGridD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\cxLibraryD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\cxPageControlD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\dbrtl.dcp" />
|
||||
<DCCReference Include="..\..\Lib\dclcxLibraryD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\designide.dcp" />
|
||||
<DCCReference Include="..\..\Lib\dsnap.dcp" />
|
||||
<DCCReference Include="..\..\Lib\dxComnD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\dxCoreD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\dxLayoutControlD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\dxPSCoreD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\dxPScxCommonD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\dxPScxGrid6LnkD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\dxPSLnksD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\dxThemeD11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\FormasPago_controller.dcp" />
|
||||
<DCCReference Include="..\..\Lib\FormasPago_model.dcp" />
|
||||
<DCCReference Include="..\..\Lib\GUIBase.dcp" />
|
||||
<DCCReference Include="..\..\Lib\GUISDK_D11R.dcp" />
|
||||
<DCCReference Include="..\..\Lib\Jcl.dcp" />
|
||||
<DCCReference Include="..\..\Lib\JclVcl.dcp" />
|
||||
<DCCReference Include="..\..\Lib\JSDialog100.dcp" />
|
||||
<DCCReference Include="..\..\Lib\JvAppFrmD11R.dcp" />
|
||||
<DCCReference Include="..\..\Lib\JvCoreD11R.dcp" />
|
||||
<DCCReference Include="..\..\Lib\JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\..\Lib\JvGlobusD11R.dcp" />
|
||||
<DCCReference Include="..\..\Lib\JvPageCompsD11R.dcp" />
|
||||
<DCCReference Include="..\..\Lib\JvStdCtrlsD11R.dcp" />
|
||||
<DCCReference Include="..\..\Lib\JvSystemD11R.dcp" />
|
||||
<DCCReference Include="..\..\Lib\PngComponentsD10.dcp" />
|
||||
<DCCReference Include="..\..\Lib\PNG_D10.dcp" />
|
||||
<DCCReference Include="..\..\Lib\RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="..\..\Lib\rtl.dcp" />
|
||||
<DCCReference Include="..\..\Lib\tb2k_d10.dcp" />
|
||||
<DCCReference Include="..\..\Lib\tbx_d10.dcp" />
|
||||
<DCCReference Include="..\..\Lib\TiposIVA_controller.dcp" />
|
||||
<DCCReference Include="..\..\Lib\TiposIVA_model.dcp" />
|
||||
<DCCReference Include="..\..\Lib\vcl.dcp" />
|
||||
<DCCReference Include="..\..\Lib\vclactnband.dcp" />
|
||||
<DCCReference Include="..\..\Lib\vcldb.dcp" />
|
||||
<DCCReference Include="..\..\Lib\vcljpg.dcp" />
|
||||
<DCCReference Include="..\..\Lib\vclshlctrls.dcp" />
|
||||
<DCCReference Include="..\..\Lib\vclx.dcp" />
|
||||
<DCCReference Include="..\..\Lib\xmlrtl.dcp" />
|
||||
<DCCReference Include="adortl.dcp" />
|
||||
<DCCReference Include="ApplicationBase.dcp" />
|
||||
<DCCReference Include="Articulos_controller.dcp" />
|
||||
<DCCReference Include="Base.dcp" />
|
||||
<DCCReference Include="bdertl.dcp" />
|
||||
<DCCReference Include="ccpackD11.dcp" />
|
||||
<DCCReference Include="cfpack_d11.dcp" />
|
||||
<DCCReference Include="Contactos_controller.dcp" />
|
||||
<DCCReference Include="Contactos_model.dcp" />
|
||||
<DCCReference Include="cxDataD11.dcp" />
|
||||
<DCCReference Include="cxEditorsD11.dcp" />
|
||||
<DCCReference Include="cxExportD11.dcp" />
|
||||
<DCCReference Include="cxExtEditorsD11.dcp" />
|
||||
<DCCReference Include="cxGridD11.dcp" />
|
||||
<DCCReference Include="cxLibraryD11.dcp" />
|
||||
<DCCReference Include="cxPageControlD11.dcp" />
|
||||
<DCCReference Include="DataAbstract_Core_D11.dcp" />
|
||||
<DCCReference Include="dbrtl.dcp" />
|
||||
<DCCReference Include="dclcxLibraryD11.dcp" />
|
||||
<DCCReference Include="designide.dcp" />
|
||||
<DCCReference Include="dsnap.dcp" />
|
||||
<DCCReference Include="dxComnD11.dcp" />
|
||||
<DCCReference Include="dxCoreD11.dcp" />
|
||||
<DCCReference Include="dxGDIPlusD11.dcp" />
|
||||
<DCCReference Include="dxLayoutControlD11.dcp" />
|
||||
<DCCReference Include="dxPSCoreD11.dcp" />
|
||||
<DCCReference Include="dxPScxCommonD11.dcp" />
|
||||
<DCCReference Include="dxPScxGrid6LnkD11.dcp" />
|
||||
<DCCReference Include="dxPSLnksD11.dcp" />
|
||||
<DCCReference Include="dxThemeD11.dcp" />
|
||||
<DCCReference Include="FormasPago_controller.dcp" />
|
||||
<DCCReference Include="FormasPago_model.dcp" />
|
||||
<DCCReference Include="GUIBase.dcp" />
|
||||
<DCCReference Include="GUISDK_D11R.dcp" />
|
||||
<DCCReference Include="Jcl.dcp" />
|
||||
<DCCReference Include="JclVcl.dcp" />
|
||||
<DCCReference Include="JSDialog100.dcp" />
|
||||
<DCCReference Include="JvAppFrmD11R.dcp" />
|
||||
<DCCReference Include="JvCoreD11R.dcp" />
|
||||
<DCCReference Include="JvCtrlsD11R.dcp" />
|
||||
<DCCReference Include="JvGlobusD11R.dcp" />
|
||||
<DCCReference Include="JvPageCompsD11R.dcp" />
|
||||
<DCCReference Include="JvStdCtrlsD11R.dcp" />
|
||||
<DCCReference Include="JvSystemD11R.dcp" />
|
||||
<DCCReference Include="PngComponentsD10.dcp" />
|
||||
<DCCReference Include="PNG_D10.dcp" />
|
||||
<DCCReference Include="RemObjects_Core_D11.dcp" />
|
||||
<DCCReference Include="rtl.dcp" />
|
||||
<DCCReference Include="tb2k_d10.dcp" />
|
||||
<DCCReference Include="tbx_d10.dcp" />
|
||||
<DCCReference Include="TiposIVA_controller.dcp" />
|
||||
<DCCReference Include="TiposIVA_model.dcp" />
|
||||
<DCCReference Include="uContactosViewRegister.pas" />
|
||||
<DCCReference Include="uEditorAgente.pas">
|
||||
<Form>fEditorAgente</Form>
|
||||
@ -140,6 +133,10 @@
|
||||
<Form>fEditorDireccion</Form>
|
||||
<DesignClass>TCustomEditor</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uEditorElegirAgentes.pas">
|
||||
<Form>fEditorElegirAgentes</Form>
|
||||
<DesignClass>TCustomEditor</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uEditorElegirClientes.pas">
|
||||
<Form>fEditorElegirClientes</Form>
|
||||
<DesignClass>TCustomEditor</DesignClass>
|
||||
@ -284,6 +281,13 @@
|
||||
<Form>frViewProveedores</Form>
|
||||
<DesignClass>TCustomView</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="vcl.dcp" />
|
||||
<DCCReference Include="vclactnband.dcp" />
|
||||
<DCCReference Include="vcldb.dcp" />
|
||||
<DCCReference Include="vcljpg.dcp" />
|
||||
<DCCReference Include="vclshlctrls.dcp" />
|
||||
<DCCReference Include="vclx.dcp" />
|
||||
<DCCReference Include="xmlrtl.dcp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<!-- EurekaLog First Line
|
||||
|
||||
@ -10,7 +10,7 @@ implementation
|
||||
uses
|
||||
uEditorRegistryUtils,
|
||||
uEditorClientes, uEditorProveedores,
|
||||
uEditorEmpleados, uEditorAgentes, uEditorElegirCLientes,
|
||||
uEditorEmpleados, uEditorAgentes, uEditorElegirCLientes, uEditorElegirAgentes,
|
||||
uEditorCliente, uEditorProveedor, uEditorAgente,
|
||||
uEditorEmpleado, uEditorElegirProveedores, uEditorDireccion,
|
||||
uEditorElegirDireccionEntrega, uEditorGruposCliente, uEditorGruposProveedor, uEditorGruposEmpleado,
|
||||
@ -22,7 +22,7 @@ begin
|
||||
EditorRegistry.RegisterClass(TfEditorClientes, 'EditorClientes');
|
||||
EditorRegistry.RegisterClass(TfEditorProveedores, 'EditorProveedores');
|
||||
EditorRegistry.RegisterClass(TfEditorEmpleados, 'EditorEmpleados');
|
||||
EditorRegistry.RegisterClass(TfEditorAgentes, 'EditorAgentes');
|
||||
EditorRegistry.RegisterClass(TfEditorAgentes, 'EditorAgentes');
|
||||
|
||||
EditorRegistry.RegisterClass(TfEditorCliente, 'EditorCliente');
|
||||
EditorRegistry.RegisterClass(TfEditorProveedor, 'EditorProveedor');
|
||||
@ -31,6 +31,7 @@ begin
|
||||
|
||||
EditorRegistry.RegisterClass(TfEditorElegirClientes, 'EditorElegirClientes');
|
||||
EditorRegistry.RegisterClass(TfEditorElegirProveedores, 'EditorElegirProveedores');
|
||||
EditorRegistry.RegisterClass(TfEditorElegirAgentes, 'EditorElegirAgentes');
|
||||
|
||||
EditorRegistry.RegisterClass(TfEditorDireccion, 'EditorDireccion');
|
||||
EditorRegistry.RegisterClass(TfEditorElegirDireccionEntrega, 'EditorElegirDireccionEntrega');
|
||||
@ -63,6 +64,7 @@ begin
|
||||
|
||||
EditorRegistry.UnRegisterClass(TfEditorElegirClientes);
|
||||
EditorRegistry.UnRegisterClass(TfEditorElegirProveedores);
|
||||
EditorRegistry.UnRegisterClass(TfEditorElegirAgentes);
|
||||
|
||||
EditorRegistry.UnRegisterClass(TfEditorDireccion);
|
||||
EditorRegistry.UnRegisterClass(TfEditorElegirDireccionEntrega);
|
||||
|
||||
@ -2,6 +2,8 @@ inherited fEditorContactos: TfEditorContactos
|
||||
Left = 285
|
||||
Top = 448
|
||||
Caption = 'Lista de contactos'
|
||||
ExplicitWidth = 320
|
||||
ExplicitHeight = 240
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
|
||||
199
Source/Modulos/Contactos/Views/uEditorElegirAgentes.dfm
Normal file
199
Source/Modulos/Contactos/Views/uEditorElegirAgentes.dfm
Normal file
@ -0,0 +1,199 @@
|
||||
inherited fEditorElegirAgentes: TfEditorElegirAgentes
|
||||
Caption = 'fEditorElegirAgentes'
|
||||
ExplicitWidth = 320
|
||||
ExplicitHeight = 240
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
Top = 64
|
||||
ExplicitTop = 64
|
||||
end
|
||||
inherited TBXDock: TTBXDock
|
||||
Top = 91
|
||||
ExplicitTop = 91
|
||||
end
|
||||
inherited frViewAgentes1: TfrViewAgentes
|
||||
Top = 166
|
||||
Height = 283
|
||||
ExplicitTop = 166
|
||||
ExplicitHeight = 283
|
||||
inherited cxGrid: TcxGrid
|
||||
Height = 155
|
||||
ExplicitHeight = 155
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Format = '0 agentes'
|
||||
Kind = skCount
|
||||
FieldName = 'ID'
|
||||
Column = frViewAgentes1.cxGridViewNIF_CIF
|
||||
end>
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 290
|
||||
Width = 290
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 382
|
||||
Width = 382
|
||||
end
|
||||
inherited eLista: TcxComboBox
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 140
|
||||
Width = 140
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||
Top = 257
|
||||
ExplicitTop = 257
|
||||
end
|
||||
inherited dxComponentPrinter: TdxComponentPrinter
|
||||
inherited dxComponentPrinterLink: TdxGridReportLink
|
||||
BuiltInReportLink = True
|
||||
end
|
||||
end
|
||||
inherited cxViewGridPopupMenu: TcxGridPopupMenu
|
||||
PopupMenus = <
|
||||
item
|
||||
GridView = frViewAgentes1.cxGridView
|
||||
HitTypes = [gvhtCell]
|
||||
Index = 0
|
||||
end>
|
||||
end
|
||||
end
|
||||
inline frViewBarraSeleccion1: TfrViewBarraSeleccion [4]
|
||||
Left = 0
|
||||
Top = 449
|
||||
Width = 786
|
||||
Height = 36
|
||||
Align = alBottom
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
ReadOnly = False
|
||||
ExplicitTop = 449
|
||||
ExplicitWidth = 786
|
||||
ExplicitHeight = 36
|
||||
inherited JvFooter1: TJvFooter
|
||||
Width = 786
|
||||
Height = 36
|
||||
ExplicitWidth = 683
|
||||
ExplicitHeight = 36
|
||||
inherited bSeleccionar: TJvFooterBtn
|
||||
Left = 574
|
||||
Top = 3
|
||||
ModalResult = 0
|
||||
ExplicitLeft = 471
|
||||
ExplicitTop = 3
|
||||
end
|
||||
inherited bCancelar: TJvFooterBtn
|
||||
Left = 678
|
||||
Top = 4
|
||||
ExplicitLeft = 678
|
||||
ExplicitTop = 4
|
||||
end
|
||||
end
|
||||
inherited BarraSeleccionActionList: TActionList
|
||||
inherited actSeleccionar: TAction
|
||||
OnExecute = frViewBarraSeleccion1actSeleccionarExecute
|
||||
OnUpdate = frViewBarraSeleccion1actSeleccionarUpdate
|
||||
end
|
||||
inherited actCancelar: TAction
|
||||
OnExecute = frViewBarraSeleccion1actCancelarExecute
|
||||
end
|
||||
end
|
||||
end
|
||||
object pnlHeader: TPanel [5]
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 786
|
||||
Height = 64
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Color = clWhite
|
||||
Padding.Left = 25
|
||||
Padding.Top = 8
|
||||
Padding.Right = 25
|
||||
Padding.Bottom = 8
|
||||
ParentBackground = False
|
||||
TabOrder = 5
|
||||
ExplicitTop = -37
|
||||
object lblTitle: TLabel
|
||||
AlignWithMargins = True
|
||||
Left = 25
|
||||
Top = 8
|
||||
Width = 114
|
||||
Height = 13
|
||||
Margins.Left = 0
|
||||
Margins.Top = 0
|
||||
Margins.Right = 0
|
||||
Margins.Bottom = 8
|
||||
Align = alTop
|
||||
Caption = 'Seleccione el cliente'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lblComments: TLabel
|
||||
AlignWithMargins = True
|
||||
Left = 50
|
||||
Top = 29
|
||||
Width = 3
|
||||
Height = 13
|
||||
Margins.Left = 25
|
||||
Margins.Top = 0
|
||||
Margins.Right = 0
|
||||
Align = alClient
|
||||
end
|
||||
end
|
||||
inherited EditorActionList: TActionList [6]
|
||||
end
|
||||
inherited SmallImages: TPngImageList [7]
|
||||
end
|
||||
inherited LargeImages: TPngImageList [8]
|
||||
end
|
||||
inherited JvFormStorage: TJvFormStorage [9]
|
||||
end
|
||||
inherited JvAppRegistryStorage: TJvAppRegistryStorage [10]
|
||||
end
|
||||
inherited dsDataTable: TDADataSource [11]
|
||||
end
|
||||
inherited StatusBarImages: TPngImageList [12]
|
||||
end
|
||||
inherited GridPopupMenu: TPopupMenu [13]
|
||||
end
|
||||
inherited JsPrevisualizarDialog: TJSDialog [14]
|
||||
end
|
||||
inherited JsImprimirDialog: TJSDialog [15]
|
||||
end
|
||||
end
|
||||
99
Source/Modulos/Contactos/Views/uEditorElegirAgentes.pas
Normal file
99
Source/Modulos/Contactos/Views/uEditorElegirAgentes.pas
Normal file
@ -0,0 +1,99 @@
|
||||
unit uEditorElegirAgentes;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, uEditorAgentes, pngimage, JSDialog, Menus, DB, uDAInterfaces,
|
||||
uDADataTable, JvAppStorage, JvAppRegistryStorage, JvComponentBase,
|
||||
JvFormPlacement, ImgList, PngImageList, StdActns, ActnList, uCustomView,
|
||||
uViewBase, uViewGridBase, uViewGrid, uViewContactos, uViewAgentes, ComCtrls,
|
||||
JvExComCtrls, JvStatusBar, TBX, TB2ExtItems, TBXExtItems, TB2Item, TB2Dock,
|
||||
TB2Toolbar, dxGDIPlusClasses, ExtCtrls, JvExControls, JvNavigationPane,
|
||||
uViewBarraSeleccion, uIEditorElegirAgentes, StdCtrls, uBizContactos;
|
||||
|
||||
type
|
||||
TfEditorElegirAgentes = class(TfEditorAgentes, IEditorElegirAgentes)
|
||||
frViewBarraSeleccion1: TfrViewBarraSeleccion;
|
||||
pnlHeader: TPanel;
|
||||
lblTitle: TLabel;
|
||||
lblComments: TLabel;
|
||||
procedure frViewBarraSeleccion1actSeleccionarUpdate(Sender: TObject);
|
||||
procedure frViewBarraSeleccion1actSeleccionarExecute(Sender: TObject);
|
||||
procedure frViewBarraSeleccion1actCancelarExecute(Sender: TObject);
|
||||
protected
|
||||
procedure SetMultiSelect (AValue : Boolean);
|
||||
function GetMultiSelect : Boolean;
|
||||
function GetContactosSeleccionados: IBizContacto;
|
||||
procedure SetViewGrid(const Value: IViewGridBase); override;
|
||||
procedure SetMensaje (const AValue: String);
|
||||
function GetMensaje: String;
|
||||
public
|
||||
property Mensaje : String read GetMensaje write SetMensaje;
|
||||
property ContactosSeleccionados: IBizContacto read GetContactosSeleccionados;
|
||||
property MultiSelect : Boolean read GetMultiSelect write SetMultiSelect;
|
||||
end;
|
||||
|
||||
implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses cxControls, uGridStatusUtils, uDBSelectionListUtils;
|
||||
|
||||
procedure TfEditorElegirAgentes.frViewBarraSeleccion1actCancelarExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfEditorElegirAgentes.frViewBarraSeleccion1actSeleccionarExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ModalResult := mrOk;
|
||||
end;
|
||||
|
||||
procedure TfEditorElegirAgentes.frViewBarraSeleccion1actSeleccionarUpdate(
|
||||
Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
(Sender as TAction).Enabled := (ViewGrid._FocusedView.Controller.SelectedRowCount > 0)
|
||||
end;
|
||||
|
||||
function TfEditorElegirAgentes.GetContactosSeleccionados: IBizContacto;
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Contactos as ISeleccionable).SelectedRecords);
|
||||
// En Contactos.SelectedRecords tengo los ID de las filas seleccionadas del grid
|
||||
Result := Controller.ExtraerSeleccionados(Contactos);
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfEditorElegirAgentes.GetMensaje: String;
|
||||
begin
|
||||
Result := lblComments.Caption;
|
||||
end;
|
||||
|
||||
function TfEditorElegirAgentes.GetMultiSelect: Boolean;
|
||||
begin
|
||||
Result := ViewGrid.MultiSelect;
|
||||
end;
|
||||
|
||||
procedure TfEditorElegirAgentes.SetMensaje(const AValue: String);
|
||||
begin
|
||||
lblComments.Caption := AValue;
|
||||
end;
|
||||
|
||||
procedure TfEditorElegirAgentes.SetMultiSelect(AValue: Boolean);
|
||||
begin
|
||||
ViewGrid.MultiSelect := AValue;
|
||||
end;
|
||||
|
||||
procedure TfEditorElegirAgentes.SetViewGrid(const Value: IViewGridBase);
|
||||
begin
|
||||
inherited;
|
||||
ViewGrid.OnDblClick := frViewBarraSeleccion1.actSeleccionar.OnExecute;
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -23,7 +23,7 @@ inherited fEditorElegirClientes: TfEditorElegirClientes
|
||||
ExplicitWidth = 683
|
||||
ExplicitHeight = 49
|
||||
inherited tbxMain: TTBXToolbar
|
||||
ExplicitWidth = 284
|
||||
ExplicitWidth = 378
|
||||
inherited TBXSubmenuItem3: TTBXSubmenuItem
|
||||
Enabled = False
|
||||
Visible = False
|
||||
@ -33,11 +33,11 @@ inherited fEditorElegirClientes: TfEditorElegirClientes
|
||||
end
|
||||
end
|
||||
inherited tbxFiltro: TTBXToolbar
|
||||
Left = 284
|
||||
Left = 378
|
||||
Top = 23
|
||||
DockPos = 96
|
||||
DockRow = 1
|
||||
ExplicitLeft = 284
|
||||
ExplicitLeft = 378
|
||||
ExplicitTop = 23
|
||||
inherited TBXItem34: TTBXItem
|
||||
Action = actQuitarFiltro2
|
||||
@ -202,36 +202,30 @@ inherited fEditorElegirClientes: TfEditorElegirClientes
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 689
|
||||
Width = 689
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 460
|
||||
Width = 460
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Left = 397
|
||||
Left = 429
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 397
|
||||
ExplicitLeft = 429
|
||||
ExplicitWidth = 123
|
||||
Width = 123
|
||||
end
|
||||
inherited eLista: TcxComboBox
|
||||
Left = 515
|
||||
Left = 555
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 515
|
||||
ExplicitWidth = 215
|
||||
Width = 215
|
||||
ExplicitLeft = 555
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
|
||||
@ -2373,6 +2373,142 @@ object RptFacturasCliente: TRptFacturasCliente
|
||||
Name = 'PORCENTAJE_AUMENTO_BENEFICIOS'
|
||||
DataType = datCurrency
|
||||
end>
|
||||
end
|
||||
item
|
||||
Params = <>
|
||||
Statements = <
|
||||
item
|
||||
Connection = 'IBX'
|
||||
TargetTable = 'V_FACTURAS_CLIENTE'
|
||||
SQL =
|
||||
#10'select'#10' A.ID_EMPRESA,'#10' A.ID_AGENTE,'#10' A.AGENTE,'#10' A.A' +
|
||||
'NO,'#10' A.MES,'#10' AO.CANTIDAD_OBJETIVO,'#10' AO.IMPORTE_OBJETIVO' +
|
||||
','#10' A.CANTIDAD_CONSEGUIDA,'#10' A.CANTIDAD_DEVUELTA,'#10' A.IMPO' +
|
||||
'RTE_CONSEGUIDO,'#10' A.IMPORTE_DEVUELTO,'#10' (A.CANTIDAD_CONSEGUI' +
|
||||
'DA - AO.CANTIDAD_OBJETIVO) as CANTIDAD_RESULTADO,'#10' (A.IMPORTE' +
|
||||
'_CONSEGUIDO - AO.IMPORTE_OBJETIVO) as IMPORTE_RESULTADO'#10#10#10'from v' +
|
||||
'_inf_objetivos_albaranes A'#10'left join V_INF_OBJETIVOS_ALB_AGENTES' +
|
||||
' AO on ((AO.id_agente = A.id_agente) and (AO.ano = A.ANO) and (A' +
|
||||
'O.mes = A.MES))'#10'where {where}'#10'order by 1,2,3,4,5'#10#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <
|
||||
item
|
||||
DatasetField = 'ID_EMPRESA'
|
||||
TableField = 'ID_EMPRESA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'MES'
|
||||
TableField = '<unknown>'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ANO'
|
||||
TableField = '<unknown>'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_AGENTE'
|
||||
TableField = 'ID_AGENTE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'AGENTE'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'AGENTE'
|
||||
end
|
||||
item
|
||||
DatasetField = 'CANTIDAD_OBJETIVO'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'CANTIDAD_OBJETIVO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IMPORTE_OBJETIVO'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'IMPORTE_OBJETIVO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'CANTIDAD_CONSEGUIDA'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'CANTIDAD_CONSEGUIDA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'CANTIDAD_DEVUELTA'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'CANTIDAD_DEVUELTA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IMPORTE_CONSEGUIDO'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'IMPORTE_CONSEGUIDO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IMPORTE_DEVUELTO'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'IMPORTE_DEVUELTO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'CANTIDAD_RESULTADO'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'CANTIDAD_RESULTADO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'IMPORTE_RESULTADO'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'IMPORTE_RESULTADO'
|
||||
end>
|
||||
end>
|
||||
Name = 'InformeListadoObjetivos'
|
||||
Fields = <
|
||||
item
|
||||
Name = 'ID_EMPRESA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ID_AGENTE'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'AGENTE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'ANO'
|
||||
DataType = datSmallInt
|
||||
end
|
||||
item
|
||||
Name = 'MES'
|
||||
DataType = datSmallInt
|
||||
end
|
||||
item
|
||||
Name = 'CANTIDAD_OBJETIVO'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_OBJETIVO'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'CANTIDAD_CONSEGUIDA'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'CANTIDAD_DEVUELTA'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_CONSEGUIDO'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_DEVUELTO'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'CANTIDAD_RESULTADO'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_RESULTADO'
|
||||
DataType = datCurrency
|
||||
end>
|
||||
end>
|
||||
JoinDataTables = <>
|
||||
UnionDataTables = <>
|
||||
@ -3222,47 +3358,27 @@ object RptFacturasCliente: TRptFacturasCliente
|
||||
PrintOptions.Printer = 'Por defecto'
|
||||
PrintOptions.PrintOnSheet = 0
|
||||
ReportOptions.CreateDate = 37800.807714351900000000
|
||||
ReportOptions.LastChange = 40652.437064270800000000
|
||||
ReportOptions.LastChange = 40934.742124178240000000
|
||||
ScriptLanguage = 'PascalScript'
|
||||
ScriptText.Strings = (
|
||||
'procedure Chart1OnBeforePrint(Sender: TfrxComponent);'
|
||||
'procedure mContinuaOnBeforePrint(Sender: TfrxComponent);'
|
||||
'begin'
|
||||
|
||||
' if (<frxDBInformeListadoFacturasGrafComp."ANO1"> <> 0) then ' +
|
||||
' '
|
||||
|
||||
' TLineSeries(Chart1.Series[0]).Title := '#39'Total Facturado '#39' +' +
|
||||
' IntToStr(<frxDBInformeListadoFacturasGrafComp."ANO1">);'
|
||||
''
|
||||
' if (<frxDBInformeListadoFacturasGrafComp."ANO2"> <> 0) then'
|
||||
|
||||
' TLineSeries(Chart1.Series[1]).Title := '#39'Total Facturado '#39' +' +
|
||||
' IntToStr(<frxDBInformeListadoFacturasGrafComp."ANO2">)'
|
||||
' else'
|
||||
' Chart1.Series[1].Active := False; '
|
||||
'end;'
|
||||
''
|
||||
'procedure Memo16OnBeforePrint(Sender: TfrxComponent);'
|
||||
'var'
|
||||
' Valor:Double; '
|
||||
'begin'
|
||||
|
||||
' Valor := SUM(<frxDBInformeListadoFacturasGrafComp."IMPORTE_TOT' +
|
||||
'AL1">) * 100; '
|
||||
|
||||
' if (SUM(<frxDBInformeListadoFacturasGrafComp."IMPORTE_TOTAL">)' +
|
||||
' = 0) then'
|
||||
' Valor := 100 - Valor '
|
||||
' else'
|
||||
|
||||
' Valor := 100 - (Valor/SUM(<frxDBInformeListadoFacturasGrafC' +
|
||||
'omp."IMPORTE_TOTAL">)); '
|
||||
''
|
||||
' memo16.lines.add(FormatFloat('#39'#,##0.00 %'#39',Valor));'
|
||||
' if Engine.FinalPass then'
|
||||
' begin'
|
||||
' if (<Page#> = <TotalPages#>) then'
|
||||
' begin '
|
||||
' mContinua.Visible := False;'
|
||||
' end '
|
||||
' else'
|
||||
' begin '
|
||||
' mContinua.Visible := True;'
|
||||
' end '
|
||||
' end; '
|
||||
'end;'
|
||||
''
|
||||
'begin'
|
||||
'end. ')
|
||||
''
|
||||
'end.')
|
||||
ShowProgress = False
|
||||
StoreInDFM = False
|
||||
OnGetValue = frxReportGetValue
|
||||
@ -4326,4 +4442,85 @@ object RptFacturasCliente: TRptFacturasCliente
|
||||
Left = 824
|
||||
Top = 600
|
||||
end
|
||||
object tbl_InformeObjetivos: TDAMemDataTable
|
||||
RemoteUpdatesOptions = []
|
||||
Fields = <
|
||||
item
|
||||
Name = 'ID_EMPRESA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ID_AGENTE'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'AGENTE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'ANO'
|
||||
DataType = datSmallInt
|
||||
end
|
||||
item
|
||||
Name = 'MES'
|
||||
DataType = datSmallInt
|
||||
end
|
||||
item
|
||||
Name = 'CANTIDAD_OBJETIVO'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_OBJETIVO'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'CANTIDAD_CONSEGUIDA'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'CANTIDAD_DEVUELTA'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_CONSEGUIDO'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_DEVUELTO'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'CANTIDAD_RESULTADO'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_RESULTADO'
|
||||
DataType = datCurrency
|
||||
end>
|
||||
Params = <>
|
||||
LogChanges = False
|
||||
StreamingOptions = [soDisableEventsWhileStreaming]
|
||||
RemoteFetchEnabled = False
|
||||
LocalSchema = schReport
|
||||
LocalDataStreamer = Bin2DataStreamer
|
||||
LogicalName = 'InformeListadoObjetivos'
|
||||
IndexDefs = <>
|
||||
Left = 152
|
||||
Top = 208
|
||||
end
|
||||
object DADSInformeObjetivos: TDADataSource
|
||||
DataSet = tbl_InformeObjetivos.Dataset
|
||||
DataTable = tbl_InformeObjetivos
|
||||
Left = 152
|
||||
Top = 152
|
||||
end
|
||||
object frxDBInformeObjetivos: TfrxDBDataset
|
||||
UserName = 'frxDBInformeObjetivos'
|
||||
CloseDataSource = False
|
||||
DataSource = DADSInformeObjetivos
|
||||
BCDToCurrency = False
|
||||
Left = 152
|
||||
Top = 96
|
||||
end
|
||||
end
|
||||
|
||||
@ -107,6 +107,9 @@ type
|
||||
tbl_InformeListadoBeneficiosGrafCompTrimestral: TDAMemDataTable;
|
||||
tbl_InformeListadoBeneficiosGrafCompMensual: TDAMemDataTable;
|
||||
schReport: TDASchema;
|
||||
tbl_InformeObjetivos: TDAMemDataTable;
|
||||
DADSInformeObjetivos: TDADataSource;
|
||||
frxDBInformeObjetivos: TfrxDBDataset;
|
||||
procedure DataModuleCreate(Sender: TObject);
|
||||
procedure DataModuleDestroy(Sender: TObject);
|
||||
procedure frxReportGetValue(const VarName: string; var Value: Variant);
|
||||
|
||||
@ -47,6 +47,8 @@ contains
|
||||
uIEditorInformeFacturasProveedorReportGrafComp in 'View\uIEditorInformeFacturasProveedorReportGrafComp.pas',
|
||||
uIEditorInformeFacturasClienteReportGrafComp in 'View\uIEditorInformeFacturasClienteReportGrafComp.pas',
|
||||
uIEditorInformeBeneficiosReportGrafComp in 'View\uIEditorInformeBeneficiosReportGrafComp.pas',
|
||||
uIEditorInformeAlbaranesClienteReportGrafComp in 'View\uIEditorInformeAlbaranesClienteReportGrafComp.pas';
|
||||
uIEditorInformeAlbaranesClienteReportGrafComp in 'View\uIEditorInformeAlbaranesClienteReportGrafComp.pas',
|
||||
uIEditorInformeObjetivosFacturasReport in 'View\uIEditorInformeObjetivosFacturasReport.pas',
|
||||
uIEditorInformeObjetivosAlbaranesReport in 'View\uIEditorInformeObjetivosAlbaranesReport.pas';
|
||||
|
||||
end.
|
||||
|
||||
@ -53,6 +53,8 @@
|
||||
<DCCReference Include="View\uIEditorInformeFacturasProveedorReportGrafComp.pas" />
|
||||
<DCCReference Include="View\uIEditorInformeIVAClientesReport.pas" />
|
||||
<DCCReference Include="View\uIEditorInformeIVAProveedoresReport.pas" />
|
||||
<DCCReference Include="View\uIEditorInformeObjetivosAlbaranesReport.pas" />
|
||||
<DCCReference Include="View\uIEditorInformeObjetivosFacturasReport.pas" />
|
||||
<DCCReference Include="View\uIEditorInformePedidosReport.pas" />
|
||||
<DCCReference Include="View\uIEditorInformePresupuestosReport.pas" />
|
||||
<DCCReference Include="View\uIEditorInformeRecibosClienteReport.pas" />
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
unit uIEditorInformeObjetivosAlbaranesReport;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
FactuGES_Intf, uIEditorInformeBase;
|
||||
|
||||
type
|
||||
IEditorInformeObjetivosAlbaranesReport = interface(IEditorInformeBase)
|
||||
['{B51555CD-C525-43F6-A329-6DE4E52A9F38}']
|
||||
|
||||
function GetIntervalo: Variant;
|
||||
function GetAno1: Variant;
|
||||
function GetAno2: Variant;
|
||||
function GetNTop: Variant;
|
||||
|
||||
function GetListaIDAgentes: TIntegerArray;
|
||||
|
||||
property Intervalo: Variant read GetIntervalo;
|
||||
property Ano1: Variant read GetAno1;
|
||||
property Ano2: Variant read GetAno2;
|
||||
property NTop: Variant read GetNTop;
|
||||
|
||||
property ListaIDAgentes: TIntegerArray read GetListaIDAgentes;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@ -0,0 +1,30 @@
|
||||
unit uIEditorInformeObjetivosFacturasReport;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
FactuGES_Intf, uIEditorInformeBase;
|
||||
|
||||
type
|
||||
IEditorInformeObjetivosFacturasReport = interface(IEditorInformeBase)
|
||||
['{D123C6D1-477A-40D6-AE28-E1F6B84A0AEE}']
|
||||
|
||||
function GetIntervalo: Variant;
|
||||
function GetAno1: Variant;
|
||||
function GetAno2: Variant;
|
||||
function GetNTop: Variant;
|
||||
|
||||
function GetListaIDAgentes: TIntegerArray;
|
||||
|
||||
property Intervalo: Variant read GetIntervalo;
|
||||
property Ano1: Variant read GetAno1;
|
||||
property Ano2: Variant read GetAno2;
|
||||
property NTop: Variant read GetNTop;
|
||||
|
||||
property ListaIDAgentes: TIntegerArray read GetListaIDAgentes;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@ -20,8 +20,9 @@ type
|
||||
procedure VerInformeListadoPresupuestos;
|
||||
|
||||
//MODULO ALBARANES DE CLIENTE
|
||||
function DarListaAnosAlbaranesCli: TStringList;
|
||||
function DarListaAnosAlbaranesCli: TStringList;
|
||||
procedure VerInformeAlbaranesCliGrafComp;
|
||||
procedure VerInformeObjetivosAlbaranes;
|
||||
|
||||
//MODULO FACTURAS DE CLIENTE
|
||||
procedure VerInformeIVAClientes;
|
||||
@ -30,6 +31,7 @@ type
|
||||
procedure VerInformeFacturasCliGrafComp;
|
||||
function DarListaAnosFacturasCli: TStringList;
|
||||
procedure VerInformeBeneficiosCliGrafComp;
|
||||
procedure VerInformeObjetivosFacturas;
|
||||
|
||||
//MODULO RECIBOS DE CLIENTE
|
||||
procedure VerInformeListadoRecibosCliPendientes;
|
||||
@ -82,6 +84,7 @@ type
|
||||
//MODULO ALBARANES DE CLIENTE
|
||||
function DarListaAnosAlbaranesCli: TStringList;
|
||||
procedure VerInformeAlbaranesCliGrafComp;
|
||||
procedure VerInformeObjetivosAlbaranes;
|
||||
|
||||
//MODULO FACTURAS DE CLIENTE
|
||||
procedure VerInformeIVAClientes;
|
||||
@ -90,6 +93,7 @@ type
|
||||
procedure VerInformeFacturasCliGrafComp;
|
||||
function DarListaAnosFacturasCli: TStringList;
|
||||
procedure VerInformeBeneficiosCliGrafComp;
|
||||
procedure VerInformeObjetivosFacturas;
|
||||
|
||||
//MODULO RECIBOS DE CLIENTE
|
||||
procedure VerInformeListadoRecibosCliPendientes;
|
||||
@ -127,7 +131,8 @@ uses
|
||||
uIEditorInformeRecibosProvPendientesReport,
|
||||
uIEditorInformePedidosReport, uIEditorInformeFacturasClienteReportGrafComp,
|
||||
uIEditorInformeFacturasProveedorReportGrafComp,
|
||||
uIEditorInformeBeneficiosReportGrafComp, uIEditorInformeAlbaranesClienteReportGrafComp;
|
||||
uIEditorInformeBeneficiosReportGrafComp, uIEditorInformeAlbaranesClienteReportGrafComp,
|
||||
uIEditorInformeObjetivosAlbaranesReport, uIEditorInformeObjetivosFacturasReport;
|
||||
|
||||
|
||||
{procedure CopiarArticulosPedido(AOrigen: IBizDetallesPedidoCliente;
|
||||
@ -704,6 +709,37 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TGestorInformesController.VerInformeObjetivosAlbaranes;
|
||||
var
|
||||
AStream: Binary;
|
||||
AEditor : IEditorInformeObjetivosAlbaranesReport;
|
||||
begin
|
||||
AEditor := NIL;
|
||||
ShowHourglassCursor;
|
||||
CreateEditor('EditorInformeObjetivosAlbaranesReport', IEditorInformeObjetivosAlbaranesReport, AEditor);
|
||||
if Assigned(AEditor) then
|
||||
try
|
||||
AEditor.Controller := Self;
|
||||
AEditor.Title := 'Informe comparativo de objetivos de agentes de albaranes';
|
||||
|
||||
AStream := FDataModule.GenerarInformeObjetivosAgentesAlbaranes(AppFactuGES.EmpresaActiva.ID,
|
||||
AEditor.Intervalo, AEditor.Ano1, AEditor.Ano2, AEditor.ListaIDAgentes, AEditor.NTop);
|
||||
|
||||
AEditor.LoadFromStream(AStream);
|
||||
AEditor.Preview;
|
||||
finally
|
||||
AEditor.Release;
|
||||
AEditor := Nil;
|
||||
HideHourglassCursor;
|
||||
FreeAndNil(AStream);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TGestorInformesController.VerInformeObjetivosFacturas;
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
{
|
||||
procedure TGestorInformesController.Ver(AFactura: IBizFacturaCliente);
|
||||
var
|
||||
|
||||
@ -29,6 +29,7 @@ type
|
||||
//MODULO ALBARANES DE CLIENTE
|
||||
function DarListaAnosAlbaranesCli: TStringList;
|
||||
function GenerarInformeAlbaranesCliGrafComp(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDClientes: TIntegerArray; Const NTop: Variant; const Serie: Variant): Binary;
|
||||
function GenerarInformeObjetivosAgentesAlbaranes(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDAgentes: TIntegerArray; Const NTop: Variant): Binary;
|
||||
|
||||
//MODULO FACTURAS DE CLIENTE
|
||||
function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
||||
@ -316,6 +317,12 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDataModuleGestorInformes.GenerarInformeObjetivosAgentesAlbaranes(const IdEmpresa: Integer; const Intervalo, Ano1, Ano2: Variant;
|
||||
const ListaIDAgentes: TIntegerArray; const NTop: Variant): Binary;
|
||||
begin
|
||||
Result := (RORemoteService as IsrvGestorInformes).GenerarInformeObjetivosAgentesAlbaranes(IdEmpresa, Intervalo, Ano1, Ano2, ListaIdAgentes, NTop);
|
||||
end;
|
||||
|
||||
procedure TDataModuleGestorInformes.getInforme;
|
||||
begin
|
||||
tbl_DirectoryData.close;
|
||||
|
||||
@ -16,8 +16,9 @@ type
|
||||
function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
||||
|
||||
//MODULO ALBARANES DE CLIENTE
|
||||
function DarListaAnosAlbaranesCli: TStringList;
|
||||
function DarListaAnosAlbaranesCli: TStringList;
|
||||
function GenerarInformeAlbaranesCliGrafComp(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDClientes: TIntegerArray; Const NTop: Variant; const Serie: Variant): Binary;
|
||||
function GenerarInformeObjetivosAgentesAlbaranes(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDAgentes: TIntegerArray; Const NTop: Variant): Binary;
|
||||
|
||||
//MODULO FACTURAS DE CLIENTE
|
||||
function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
||||
|
||||
@ -46,9 +46,7 @@ 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
|
||||
@ -147,6 +145,17 @@ object PluginGestorInformes: TPluginGestorInformes
|
||||
ImageIndex = 0
|
||||
OnExecute = actInformeAlbaranesClienteGrafCompExecute
|
||||
end
|
||||
object actInformeObjetivosAlbaranes: TAction
|
||||
Category = 'Agentes'
|
||||
Caption = 'Informe objetivos de agente en albaranes'
|
||||
ImageIndex = 0
|
||||
OnExecute = actInformeObjetivosAlbaranesExecute
|
||||
end
|
||||
object actInformeObjetivosFacturas: TAction
|
||||
Category = 'Agentes'
|
||||
Caption = 'Informe objetivos de agente en albaranes'
|
||||
ImageIndex = 0
|
||||
end
|
||||
end
|
||||
object MainMenu: TMainMenu
|
||||
Images = LargeImages
|
||||
@ -226,6 +235,10 @@ object PluginGestorInformes: TPluginGestorInformes
|
||||
Tag = 180
|
||||
Action = actInformeBeneficiosGrafComp
|
||||
end
|
||||
object actInformeObjetivos1: TMenuItem
|
||||
Tag = 190
|
||||
Action = actInformeObjetivosAlbaranes
|
||||
end
|
||||
end
|
||||
end
|
||||
object SmallImages: TPngImageList
|
||||
|
||||
@ -50,6 +50,9 @@ type
|
||||
Informecomparativodebeneficios1: TMenuItem;
|
||||
actInformeAlbaranesClienteGrafComp: TAction;
|
||||
actInformeAlbaranesClienteGrafComp1: TMenuItem;
|
||||
actInformeObjetivosAlbaranes: TAction;
|
||||
actInformeObjetivos1: TMenuItem;
|
||||
actInformeObjetivosFacturas: TAction;
|
||||
procedure actInformeFacturasClienteExecute(Sender: TObject);
|
||||
procedure actInformeFacturasClientePendientesExecute(Sender: TObject);
|
||||
procedure actInformeFacturasClienteIVAExecute(Sender: TObject);
|
||||
@ -64,6 +67,7 @@ type
|
||||
procedure actInformeFacturasProveedorGrafCompExecute(Sender: TObject);
|
||||
procedure actInformeBeneficiosGrafCompExecute(Sender: TObject);
|
||||
procedure actInformeAlbaranesClienteGrafCompExecute(Sender: TObject);
|
||||
procedure actInformeObjetivosAlbaranesExecute(Sender: TObject);
|
||||
private
|
||||
FController : IGestorInformesController;
|
||||
public
|
||||
@ -147,6 +151,11 @@ begin
|
||||
FController.VerInformeListadoFacturasProvPendientes;
|
||||
end;
|
||||
|
||||
procedure TPluginGestorInformes.actInformeObjetivosAlbaranesExecute(Sender: TObject);
|
||||
begin
|
||||
FController.VerInformeObjetivosAlbaranes;
|
||||
end;
|
||||
|
||||
procedure TPluginGestorInformes.actInformeRecibosClienteExecute(
|
||||
Sender: TObject);
|
||||
begin
|
||||
|
||||
@ -44,6 +44,8 @@ type
|
||||
//MODULO ALBARANES CLIENTE
|
||||
function GenerarInformeAlbaranesCliGrafComp(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDClientes: TIntegerArray; const TopN: Integer; const Serie: Variant): Binary;
|
||||
function DarListaAnosAlbaranesCli: StringArray;
|
||||
function GenerarInformeObjetivosAgentesAlbaranes(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDAgentes: TIntegerArray;
|
||||
const TopN: Integer): Binary;
|
||||
|
||||
//MODULO FACTURAS CLIENTE
|
||||
function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
||||
@ -53,6 +55,8 @@ type
|
||||
function GenerarInformeFacturasCliGrafComp(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDClientes: TIntegerArray; const TopN: Integer): Binary;
|
||||
function DarListaAnosFacturasCli: StringArray;
|
||||
function GenerarInformeBeneficiosGrafComp(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const Serie: Variant): Binary;
|
||||
function GenerarInformeObjetivosAgentesFacturas(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDAgentes: TIntegerArray;
|
||||
const TopN: Integer): Binary;
|
||||
|
||||
//MODULO RECIBOS CLIENTE
|
||||
function GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const FechaVenInicio: Variant; const FechaVenFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
||||
@ -372,6 +376,27 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsrvGestorInformes.GenerarInformeObjetivosAgentesAlbaranes(
|
||||
const IdEmpresa: Integer; const Intervalo, Ano1, Ano2: Variant;
|
||||
const ListaIDAgentes: TIntegerArray; const TopN: Integer): Binary;
|
||||
var
|
||||
AReportGenerator : TRptAlbaranesCliente;
|
||||
begin
|
||||
AReportGenerator := TRptAlbaranesCliente.Create(nil);
|
||||
try
|
||||
Result := AReportGenerator.GenerarInformeObjetivosAgentesAlbaranes(IdEmpresa, Intervalo, Ano1, Ano2, ListaIDAgentes, TopN);
|
||||
finally
|
||||
FreeAndNIL(AReportGenerator);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsrvGestorInformes.GenerarInformeObjetivosAgentesFacturas(
|
||||
const IdEmpresa: Integer; const Intervalo, Ano1, Ano2: Variant;
|
||||
const ListaIDAgentes: TIntegerArray; const TopN: Integer): Binary;
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
initialization
|
||||
TROClassFactory.Create('srvGestorInformes', Create_srvGestorInformes, TsrvGestorInformes_Invoker);
|
||||
|
||||
|
||||
@ -93,6 +93,9 @@ contains
|
||||
uEditorInformeFacturasClienteReportGrafComp in 'uEditorInformeFacturasClienteReportGrafComp.pas' {fEditorInformeFacturasClienteReportGrafComp: TForm},
|
||||
uEditorInformeFacturasProveedorReportGrafComp in 'uEditorInformeFacturasProveedorReportGrafComp.pas' {fEditorInformeFacturasProveedorReportGrafComp: TForm},
|
||||
uEditorInformeBeneficiosReportGrafComp in 'uEditorInformeBeneficiosReportGrafComp.pas' {fEditorInformeBeneficiosReportGrafComp: TForm},
|
||||
uEditorInformeAlbaranesClienteReportGrafComp in 'uEditorInformeAlbaranesClienteReportGrafComp.pas' {fEditorInformeAlbaranesClienteReportGrafComp: TForm};
|
||||
uEditorInformeAlbaranesClienteReportGrafComp in 'uEditorInformeAlbaranesClienteReportGrafComp.pas' {fEditorInformeAlbaranesClienteReportGrafComp: TForm},
|
||||
uEditorInformeObjetivosFacturasReport in 'uEditorInformeObjetivosFacturasReport.pas' {fEditorInformeObjetivosFacturasReport: TForm},
|
||||
uEditorInformeObjetivosAlbaranesReport in 'uEditorInformeObjetivosAlbaranesReport.pas' {fEditorInformeObjetivosAlbaranesReport: TForm},
|
||||
uViewFiltroAgentes in 'uViewFiltroAgentes.pas' {frViewFiltroAgentes: TFrame};
|
||||
|
||||
end.
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
<DCCReference Include="tb2k_d10.dcp" />
|
||||
<DCCReference Include="tbx_d10.dcp" />
|
||||
<DCCReference Include="uEditorInformeAlbaranesClienteReportGrafComp.pas">
|
||||
<Form>fEditorInformeBeneficiosReportGrafComp</Form>
|
||||
<Form>fEditorInformeAlbaranesClienteReportGrafComp</Form>
|
||||
<DesignClass>TForm</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uEditorInformeBase.pas">
|
||||
@ -119,6 +119,14 @@
|
||||
<Form>fEditorInformeIVAProveedoresReport</Form>
|
||||
<DesignClass>TForm</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uEditorInformeObjetivosAlbaranesReport.pas">
|
||||
<Form>fEditorInformeObjetivosAlbaranesReport</Form>
|
||||
<DesignClass>TForm</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uEditorInformeObjetivosFacturasReport.pas">
|
||||
<Form>fEditorInformeObjetivosFacturasReport</Form>
|
||||
<DesignClass>TForm</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uEditorInformePedidosReport.pas">
|
||||
<Form>fEditorInformePedidosReport</Form>
|
||||
<DesignClass>TForm</DesignClass>
|
||||
@ -144,6 +152,10 @@
|
||||
<DesignClass>TForm</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uGestorInformesViewRegister.pas" />
|
||||
<DCCReference Include="uViewFiltroAgentes.pas">
|
||||
<Form>frViewIntervaloComparativo</Form>
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uViewFiltroClientes.pas">
|
||||
<Form>frViewFiltroClientes</Form>
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
|
||||
@ -0,0 +1,214 @@
|
||||
inherited fEditorInformeObjetivosAlbaranesReport: TfEditorInformeObjetivosAlbaranesReport
|
||||
Caption = 'fEditorInformeObjetivosAlbaranesReport'
|
||||
ClientHeight = 655
|
||||
ClientWidth = 895
|
||||
ExplicitWidth = 903
|
||||
ExplicitHeight = 689
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
Width = 895
|
||||
ExplicitWidth = 895
|
||||
inherited Image1: TImage
|
||||
Left = 868
|
||||
ExplicitLeft = 868
|
||||
end
|
||||
end
|
||||
inherited TBXDock: TTBXDock
|
||||
Width = 895
|
||||
ExplicitWidth = 895
|
||||
inherited tbxMenu: TTBXToolbar
|
||||
ExplicitWidth = 895
|
||||
end
|
||||
inherited TBXToolbar1: TTBXToolbar
|
||||
ExplicitWidth = 591
|
||||
object TBXItem58: TTBXItem [0]
|
||||
Action = actRefrescar
|
||||
DisplayMode = nbdmImageAndText
|
||||
Images = SmallImages
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited StatusBar: TJvStatusBar
|
||||
Top = 636
|
||||
Width = 895
|
||||
ExplicitTop = 636
|
||||
ExplicitWidth = 895
|
||||
end
|
||||
inherited TBXMultiDockIzquierdo: TTBXMultiDock
|
||||
Height = 534
|
||||
ExplicitHeight = 534
|
||||
end
|
||||
inherited TBXMultiDockDerecho: TTBXMultiDock
|
||||
Left = 703
|
||||
Width = 192
|
||||
Height = 534
|
||||
ExplicitLeft = 703
|
||||
ExplicitWidth = 192
|
||||
ExplicitHeight = 534
|
||||
inherited pnlParametros: TTBXDockablePanel
|
||||
DockedWidth = 188
|
||||
ExplicitWidth = 192
|
||||
ExplicitHeight = 518
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
Top = 368
|
||||
ExplicitTop = 368
|
||||
ExplicitWidth = 188
|
||||
inherited TBXButton1: TTBXButton
|
||||
AlignWithMargins = True
|
||||
Left = 3
|
||||
Top = 3
|
||||
Width = 182
|
||||
Height = 37
|
||||
Margins.Left = 8
|
||||
Margins.Top = 8
|
||||
Margins.Right = 8
|
||||
Margins.Bottom = 8
|
||||
Align = alTop
|
||||
ExplicitLeft = 3
|
||||
ExplicitTop = 3
|
||||
ExplicitWidth = 182
|
||||
ExplicitHeight = 37
|
||||
end
|
||||
end
|
||||
inline frViewIntervaloComparativo1: TfrViewIntervaloComparativo
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 188
|
||||
Height = 313
|
||||
Align = alTop
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
ReadOnly = False
|
||||
ExplicitWidth = 188
|
||||
ExplicitHeight = 313
|
||||
inherited TBXAlignmentPanel2: TTBXAlignmentPanel
|
||||
Width = 182
|
||||
ExplicitWidth = 182
|
||||
inherited Label3: TLabel
|
||||
Width = 172
|
||||
end
|
||||
inherited cbIntervalo: TcxComboBox
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 166
|
||||
Width = 166
|
||||
end
|
||||
end
|
||||
inherited TBXLabel2: TTBXLabel
|
||||
Width = 188
|
||||
ExplicitWidth = 188
|
||||
end
|
||||
inherited TBXAlignmentPanel3: TTBXAlignmentPanel
|
||||
Width = 182
|
||||
ExplicitWidth = 182
|
||||
inherited lis: TLabel
|
||||
Width = 172
|
||||
end
|
||||
inherited cbAno1: TcxComboBox
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 166
|
||||
Width = 166
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
Width = 182
|
||||
Visible = False
|
||||
ExplicitWidth = 182
|
||||
inherited Label1: TLabel
|
||||
Width = 172
|
||||
end
|
||||
inherited cbAno2: TcxComboBox
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 166
|
||||
Width = 166
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel4: TTBXAlignmentPanel
|
||||
Top = 224
|
||||
Width = 182
|
||||
Visible = False
|
||||
ExplicitTop = 224
|
||||
ExplicitWidth = 182
|
||||
inherited Label2: TLabel
|
||||
Width = 172
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel5: TTBXAlignmentPanel
|
||||
Top = 176
|
||||
Width = 182
|
||||
Visible = False
|
||||
ExplicitTop = 176
|
||||
ExplicitWidth = 182
|
||||
inherited Label4: TLabel
|
||||
Width = 172
|
||||
end
|
||||
inherited cbSerie: TcxComboBox
|
||||
Properties.Items.Strings = (
|
||||
'Todos'
|
||||
'Servidos'
|
||||
'Incidencias'
|
||||
'Fuera de fecha'
|
||||
#211'rdenes dev.')
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 166
|
||||
Width = 166
|
||||
end
|
||||
end
|
||||
end
|
||||
inline frViewFiltroAgentes1: TfrViewFiltroAgentes
|
||||
Left = 0
|
||||
Top = 313
|
||||
Width = 188
|
||||
Height = 195
|
||||
Align = alTop
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
ReadOnly = False
|
||||
ExplicitLeft = -1
|
||||
ExplicitTop = 318
|
||||
ExplicitWidth = 188
|
||||
inherited TBXLabel2: TTBXLabel
|
||||
Width = 188
|
||||
ExplicitWidth = 188
|
||||
end
|
||||
inherited bElegirAgente: TBitBtn
|
||||
Width = 119
|
||||
ExplicitWidth = 119
|
||||
end
|
||||
inherited cbxDesglosado: TCheckBox
|
||||
Visible = False
|
||||
end
|
||||
inherited edtAgente: TcxTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 152
|
||||
Width = 152
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -0,0 +1,185 @@
|
||||
unit uEditorInformeObjetivosAlbaranesReport;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail,
|
||||
frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient,
|
||||
frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage,
|
||||
JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList,
|
||||
StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems,
|
||||
TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls,
|
||||
JvExControls, JvNavigationPane, uCustomView,
|
||||
uViewBase, uViewPeriodoFechas, uControllerBase,
|
||||
dxLayoutControl, cxControls, uViewFiltroImportes,
|
||||
FactuGES_Intf, TBXDkPanels, uEditorInformeBase,
|
||||
uIEditorInformeBase, uViewParametrosInforme, uIEditorInformeObjetivosAlbaranesReport,
|
||||
uViewIntervaloComparativo, uViewFiltroClientes, uViewFiltroAgentes;
|
||||
|
||||
type
|
||||
TfEditorInformeObjetivosAlbaranesReport = class(TfEditorInformeBase, IEditorInformeObjetivosAlbaranesReport)
|
||||
TBXItem58: TTBXItem;
|
||||
frViewIntervaloComparativo1: TfrViewIntervaloComparativo;
|
||||
frViewFiltroAgentes1: TfrViewFiltroAgentes;
|
||||
procedure actRefrescarExecute(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
|
||||
private
|
||||
FListaIDAgentes: TIntegerArray;
|
||||
function GetIntervalo: Variant;
|
||||
function GetAno1: Variant;
|
||||
function GetAno2: Variant;
|
||||
function GetSerie: variant;
|
||||
function GetListaIDAgentes: TIntegerArray;
|
||||
function GetNTop: Variant;
|
||||
|
||||
procedure RefrescarInforme;
|
||||
|
||||
protected
|
||||
procedure SetController (const Value : IControllerBase); override;
|
||||
|
||||
public
|
||||
property Intervalo: Variant read GetIntervalo;
|
||||
property Ano1: Variant read GetAno1;
|
||||
property Ano2: Variant read GetAno2;
|
||||
property ListaIDAgentes: TIntegerArray read GetListaIDAgentes;
|
||||
property NTop: Variant read GetNTop;
|
||||
property Serie: Variant read GetSerie;
|
||||
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
uses uROTypes, DateUtils, uGestorInformesController, uFactuGES_App;
|
||||
|
||||
{ TfEditorGestorInformesReport }
|
||||
|
||||
procedure TfEditorInformeObjetivosAlbaranesReport.actRefrescarExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
RefrescarInforme;
|
||||
end;
|
||||
|
||||
constructor TfEditorInformeObjetivosAlbaranesReport.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FListaIDAgentes := TIntegerArray.Create;
|
||||
end;
|
||||
|
||||
destructor TfEditorInformeObjetivosAlbaranesReport.Destroy;
|
||||
begin
|
||||
FListaIDAgentes.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TfEditorInformeObjetivosAlbaranesReport.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
actTodaPagina.Execute;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosAlbaranesReport.GetIntervalo: Variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.cbIntervalo.EditValue;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosAlbaranesReport.GetAno1: Variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.cbAno1.EditValue;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosAlbaranesReport.GetAno2: Variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.cbAno2.EditValue;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosAlbaranesReport.GetListaIDAgentes: TIntegerArray;
|
||||
begin
|
||||
FListaIDAgentes.Clear;
|
||||
if Assigned(frViewFiltroAgentes1.Agente) then
|
||||
FListaIDAgentes.Add(frViewFiltroAgentes1.Agente.ID);
|
||||
|
||||
Result := FListaIDAgentes;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosAlbaranesReport.GetNTop: Variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.stopN.Value;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosAlbaranesReport.GetSerie: variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.Serie;
|
||||
end;
|
||||
|
||||
procedure TfEditorInformeObjetivosAlbaranesReport.RefrescarInforme;
|
||||
var
|
||||
AStream: Binary;
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
|
||||
AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeObjetivosAgentesAlbaranes(
|
||||
AppFactuGES.EmpresaActiva.ID,
|
||||
Intervalo,
|
||||
Ano1,
|
||||
Ano2,
|
||||
ListaIDAgentes,
|
||||
NTop);
|
||||
|
||||
LoadFromStream(AStream);
|
||||
Report.ShowPreparedReport;
|
||||
finally
|
||||
FreeAndNil(AStream);
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfEditorInformeObjetivosAlbaranesReport.SetController(
|
||||
const Value: IControllerBase);
|
||||
var
|
||||
AListaAnos: TStringList;
|
||||
AListaIntervalos: TStringList;
|
||||
i: Integer;
|
||||
|
||||
begin
|
||||
inherited;
|
||||
|
||||
AListaIntervalos := (Controller as IGestorInformesController).DarListaIntervalos;
|
||||
AListaAnos := (Controller as IGestorInformesController).DarListaAnosAlbaranesCli;
|
||||
|
||||
if Assigned(AListaIntervalos) then
|
||||
begin
|
||||
frViewIntervaloComparativo1.cbIntervalo.Properties.Items.BeginUpdate;
|
||||
frViewIntervaloComparativo1.cbIntervalo.Properties.Items.Clear;
|
||||
for i := 0 to AListaIntervalos.Count - 1 do
|
||||
frViewIntervaloComparativo1.cbIntervalo.Properties.Items.Append(AListaIntervalos.Strings[i]);
|
||||
frViewIntervaloComparativo1.cbIntervalo.Properties.Items.EndUpdate;
|
||||
end;
|
||||
|
||||
if Assigned(AListaAnos) then
|
||||
begin
|
||||
frViewIntervaloComparativo1.cbAno1.Properties.Items.BeginUpdate;
|
||||
frViewIntervaloComparativo1.cbAno2.Properties.Items.BeginUpdate;
|
||||
frViewIntervaloComparativo1.cbAno1.Properties.Items.Clear;
|
||||
frViewIntervaloComparativo1.cbAno2.Properties.Items.Clear;
|
||||
for i := 0 to AListaAnos.Count - 2 do
|
||||
begin
|
||||
frViewIntervaloComparativo1.cbAno1.Properties.Items.Append(AListaAnos.Strings[i]);
|
||||
frViewIntervaloComparativo1.cbAno2.Properties.Items.Append(AListaAnos.Strings[i]);
|
||||
end;
|
||||
frViewIntervaloComparativo1.cbAno1.Properties.Items.EndUpdate;
|
||||
frViewIntervaloComparativo1.cbAno2.Properties.Items.EndUpdate;
|
||||
end;
|
||||
|
||||
frViewIntervaloComparativo1.cbIntervalo.ItemIndex := 0;
|
||||
frViewIntervaloComparativo1.cbAno1.ItemIndex := 0;
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -0,0 +1,208 @@
|
||||
inherited fEditorInformeObjetivosFacturasReport: TfEditorInformeObjetivosFacturasReport
|
||||
Caption = 'fEditorInformeObjetivosFacturasReport'
|
||||
ClientHeight = 655
|
||||
ClientWidth = 895
|
||||
ExplicitWidth = 903
|
||||
ExplicitHeight = 689
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
Width = 895
|
||||
ExplicitWidth = 895
|
||||
inherited Image1: TImage
|
||||
Left = 868
|
||||
ExplicitLeft = 868
|
||||
end
|
||||
end
|
||||
inherited TBXDock: TTBXDock
|
||||
Width = 895
|
||||
ExplicitWidth = 895
|
||||
inherited tbxMenu: TTBXToolbar
|
||||
ExplicitWidth = 895
|
||||
end
|
||||
inherited TBXToolbar1: TTBXToolbar
|
||||
ExplicitWidth = 591
|
||||
object TBXItem58: TTBXItem [0]
|
||||
Action = actRefrescar
|
||||
DisplayMode = nbdmImageAndText
|
||||
Images = SmallImages
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited StatusBar: TJvStatusBar
|
||||
Top = 636
|
||||
Width = 895
|
||||
ExplicitTop = 636
|
||||
ExplicitWidth = 895
|
||||
end
|
||||
inherited TBXMultiDockIzquierdo: TTBXMultiDock
|
||||
Height = 534
|
||||
ExplicitHeight = 534
|
||||
end
|
||||
inherited TBXMultiDockDerecho: TTBXMultiDock
|
||||
Left = 703
|
||||
Width = 192
|
||||
Height = 534
|
||||
ExplicitLeft = 703
|
||||
ExplicitWidth = 192
|
||||
ExplicitHeight = 534
|
||||
inherited pnlParametros: TTBXDockablePanel
|
||||
DockedWidth = 188
|
||||
ExplicitWidth = 192
|
||||
ExplicitHeight = 518
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
Top = 368
|
||||
ExplicitTop = 368
|
||||
ExplicitWidth = 188
|
||||
inherited TBXButton1: TTBXButton
|
||||
AlignWithMargins = True
|
||||
Left = 3
|
||||
Top = 3
|
||||
Width = 182
|
||||
Height = 37
|
||||
Margins.Left = 8
|
||||
Margins.Top = 8
|
||||
Margins.Right = 8
|
||||
Margins.Bottom = 8
|
||||
Align = alTop
|
||||
ExplicitLeft = 3
|
||||
ExplicitTop = 3
|
||||
ExplicitWidth = 182
|
||||
ExplicitHeight = 37
|
||||
end
|
||||
end
|
||||
inline frViewIntervaloComparativo1: TfrViewIntervaloComparativo
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 188
|
||||
Height = 313
|
||||
Align = alTop
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
ReadOnly = False
|
||||
ExplicitWidth = 188
|
||||
ExplicitHeight = 313
|
||||
inherited TBXAlignmentPanel2: TTBXAlignmentPanel
|
||||
Width = 182
|
||||
ExplicitWidth = 182
|
||||
inherited Label3: TLabel
|
||||
Width = 172
|
||||
end
|
||||
inherited cbIntervalo: TcxComboBox
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 166
|
||||
Width = 166
|
||||
end
|
||||
end
|
||||
inherited TBXLabel2: TTBXLabel
|
||||
Width = 188
|
||||
ExplicitWidth = 188
|
||||
end
|
||||
inherited TBXAlignmentPanel3: TTBXAlignmentPanel
|
||||
Width = 182
|
||||
ExplicitWidth = 182
|
||||
inherited lis: TLabel
|
||||
Width = 172
|
||||
end
|
||||
inherited cbAno1: TcxComboBox
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 166
|
||||
Width = 166
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
Width = 182
|
||||
ExplicitWidth = 182
|
||||
inherited Label1: TLabel
|
||||
Width = 172
|
||||
end
|
||||
inherited cbAno2: TcxComboBox
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 166
|
||||
Width = 166
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel4: TTBXAlignmentPanel
|
||||
Top = 224
|
||||
Width = 182
|
||||
ExplicitTop = 224
|
||||
ExplicitWidth = 182
|
||||
inherited Label2: TLabel
|
||||
Width = 172
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel5: TTBXAlignmentPanel
|
||||
Top = 176
|
||||
Width = 182
|
||||
ExplicitTop = 176
|
||||
ExplicitWidth = 182
|
||||
inherited Label4: TLabel
|
||||
Width = 172
|
||||
end
|
||||
inherited cbSerie: TcxComboBox
|
||||
Properties.Items.Strings = (
|
||||
'Todos'
|
||||
'Servidos'
|
||||
'Incidencias'
|
||||
'Fuera de fecha'
|
||||
#211'rdenes dev.')
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 166
|
||||
Width = 166
|
||||
end
|
||||
end
|
||||
end
|
||||
inline frViewFiltroClientes1: TfrViewFiltroClientes
|
||||
Left = 0
|
||||
Top = 313
|
||||
Width = 188
|
||||
Height = 195
|
||||
Align = alTop
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
ReadOnly = False
|
||||
ExplicitTop = 313
|
||||
ExplicitWidth = 188
|
||||
inherited TBXLabel2: TTBXLabel
|
||||
Width = 188
|
||||
ExplicitWidth = 188
|
||||
end
|
||||
inherited bElegirCliente: TBitBtn
|
||||
Width = 119
|
||||
ExplicitWidth = 119
|
||||
end
|
||||
inherited edtCliente: TcxTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 152
|
||||
Width = 152
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -0,0 +1,186 @@
|
||||
unit uEditorInformeObjetivosFacturasReport;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail,
|
||||
frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient,
|
||||
frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage,
|
||||
JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList,
|
||||
StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems,
|
||||
TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls,
|
||||
JvExControls, JvNavigationPane, uCustomView,
|
||||
uViewBase, uViewPeriodoFechas, uControllerBase,
|
||||
dxLayoutControl, cxControls, uViewFiltroImportes,
|
||||
FactuGES_Intf, TBXDkPanels, uEditorInformeBase,
|
||||
uIEditorInformeBase, uViewParametrosInforme, uIEditorInformeAlbaranesClienteReportGrafComp,
|
||||
uViewIntervaloComparativo, uViewFiltroClientes;
|
||||
|
||||
type
|
||||
TfEditorInformeObjetivosFacturasReport = class(TfEditorInformeBase, IEditorInformeAlbaranesClienteReportGrafComp)
|
||||
TBXItem58: TTBXItem;
|
||||
frViewIntervaloComparativo1: TfrViewIntervaloComparativo;
|
||||
frViewFiltroClientes1: TfrViewFiltroClientes;
|
||||
procedure actRefrescarExecute(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
|
||||
private
|
||||
FListaIDClientes: TIntegerArray;
|
||||
function GetIntervalo: Variant;
|
||||
function GetAno1: Variant;
|
||||
function GetAno2: Variant;
|
||||
function GetSerie: variant;
|
||||
function GetListaIDClientes: TIntegerArray;
|
||||
function GetNTop: Variant;
|
||||
|
||||
procedure RefrescarInforme;
|
||||
|
||||
protected
|
||||
procedure SetController (const Value : IControllerBase); override;
|
||||
|
||||
public
|
||||
property Intervalo: Variant read GetIntervalo;
|
||||
property Ano1: Variant read GetAno1;
|
||||
property Ano2: Variant read GetAno2;
|
||||
property ListaIDClientes: TIntegerArray read GetListaIDClientes;
|
||||
property NTop: Variant read GetNTop;
|
||||
property Serie: Variant read GetSerie;
|
||||
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
uses uROTypes, DateUtils, uGestorInformesController, uFactuGES_App;
|
||||
|
||||
{ TfEditorGestorInformesReport }
|
||||
|
||||
procedure TfEditorInformeObjetivosFacturasReport.actRefrescarExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
RefrescarInforme;
|
||||
end;
|
||||
|
||||
constructor TfEditorInformeObjetivosFacturasReport.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FListaIDClientes := TIntegerArray.Create;
|
||||
end;
|
||||
|
||||
destructor TfEditorInformeObjetivosFacturasReport.Destroy;
|
||||
begin
|
||||
FListaIDClientes.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TfEditorInformeObjetivosFacturasReport.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
actTodaPagina.Execute;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosFacturasReport.GetIntervalo: Variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.cbIntervalo.EditValue;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosFacturasReport.GetAno1: Variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.cbAno1.EditValue;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosFacturasReport.GetAno2: Variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.cbAno2.EditValue;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosFacturasReport.GetListaIDClientes: TIntegerArray;
|
||||
begin
|
||||
FListaIDClientes.Clear;
|
||||
if Assigned(frViewFiltroClientes1.Cliente) then
|
||||
FListaIDClientes.Add(frViewFiltroClientes1.Cliente.ID);
|
||||
|
||||
Result := FListaIDClientes;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosFacturasReport.GetNTop: Variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.stopN.Value;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosFacturasReport.GetSerie: variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.Serie;
|
||||
end;
|
||||
|
||||
procedure TfEditorInformeObjetivosFacturasReport.RefrescarInforme;
|
||||
var
|
||||
AStream: Binary;
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
|
||||
AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeAlbaranesCliGrafComp(
|
||||
AppFactuGES.EmpresaActiva.ID,
|
||||
Intervalo,
|
||||
Ano1,
|
||||
Ano2,
|
||||
ListaIDClientes,
|
||||
NTop,
|
||||
Serie);
|
||||
|
||||
LoadFromStream(AStream);
|
||||
Report.ShowPreparedReport;
|
||||
finally
|
||||
FreeAndNil(AStream);
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfEditorInformeObjetivosFacturasReport.SetController(
|
||||
const Value: IControllerBase);
|
||||
var
|
||||
AListaAnos: TStringList;
|
||||
AListaIntervalos: TStringList;
|
||||
i: Integer;
|
||||
|
||||
begin
|
||||
inherited;
|
||||
|
||||
AListaIntervalos := (Controller as IGestorInformesController).DarListaIntervalos;
|
||||
AListaAnos := (Controller as IGestorInformesController).DarListaAnosAlbaranesCli;
|
||||
|
||||
if Assigned(AListaIntervalos) then
|
||||
begin
|
||||
frViewIntervaloComparativo1.cbIntervalo.Properties.Items.BeginUpdate;
|
||||
frViewIntervaloComparativo1.cbIntervalo.Properties.Items.Clear;
|
||||
for i := 0 to AListaIntervalos.Count - 1 do
|
||||
frViewIntervaloComparativo1.cbIntervalo.Properties.Items.Append(AListaIntervalos.Strings[i]);
|
||||
frViewIntervaloComparativo1.cbIntervalo.Properties.Items.EndUpdate;
|
||||
end;
|
||||
|
||||
if Assigned(AListaAnos) then
|
||||
begin
|
||||
frViewIntervaloComparativo1.cbAno1.Properties.Items.BeginUpdate;
|
||||
frViewIntervaloComparativo1.cbAno2.Properties.Items.BeginUpdate;
|
||||
frViewIntervaloComparativo1.cbAno1.Properties.Items.Clear;
|
||||
frViewIntervaloComparativo1.cbAno2.Properties.Items.Clear;
|
||||
for i := 0 to AListaAnos.Count - 2 do
|
||||
begin
|
||||
frViewIntervaloComparativo1.cbAno1.Properties.Items.Append(AListaAnos.Strings[i]);
|
||||
frViewIntervaloComparativo1.cbAno2.Properties.Items.Append(AListaAnos.Strings[i]);
|
||||
end;
|
||||
frViewIntervaloComparativo1.cbAno1.Properties.Items.EndUpdate;
|
||||
frViewIntervaloComparativo1.cbAno2.Properties.Items.EndUpdate;
|
||||
end;
|
||||
|
||||
frViewIntervaloComparativo1.cbIntervalo.ItemIndex := 0;
|
||||
frViewIntervaloComparativo1.cbAno1.ItemIndex := 0;
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -0,0 +1,208 @@
|
||||
inherited fEditorInformeObjetivosReport: TfEditorInformeObjetivosReport
|
||||
Caption = 'fEditorInformeObjetivosReport'
|
||||
ClientHeight = 655
|
||||
ClientWidth = 895
|
||||
ExplicitWidth = 903
|
||||
ExplicitHeight = 689
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
Width = 895
|
||||
ExplicitWidth = 895
|
||||
inherited Image1: TImage
|
||||
Left = 868
|
||||
ExplicitLeft = 868
|
||||
end
|
||||
end
|
||||
inherited TBXDock: TTBXDock
|
||||
Width = 895
|
||||
ExplicitWidth = 895
|
||||
inherited tbxMenu: TTBXToolbar
|
||||
ExplicitWidth = 895
|
||||
end
|
||||
inherited TBXToolbar1: TTBXToolbar
|
||||
ExplicitWidth = 591
|
||||
object TBXItem58: TTBXItem [0]
|
||||
Action = actRefrescar
|
||||
DisplayMode = nbdmImageAndText
|
||||
Images = SmallImages
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited StatusBar: TJvStatusBar
|
||||
Top = 636
|
||||
Width = 895
|
||||
ExplicitTop = 636
|
||||
ExplicitWidth = 895
|
||||
end
|
||||
inherited TBXMultiDockIzquierdo: TTBXMultiDock
|
||||
Height = 534
|
||||
ExplicitHeight = 534
|
||||
end
|
||||
inherited TBXMultiDockDerecho: TTBXMultiDock
|
||||
Left = 703
|
||||
Width = 192
|
||||
Height = 534
|
||||
ExplicitLeft = 703
|
||||
ExplicitWidth = 192
|
||||
ExplicitHeight = 534
|
||||
inherited pnlParametros: TTBXDockablePanel
|
||||
DockedWidth = 188
|
||||
ExplicitWidth = 192
|
||||
ExplicitHeight = 518
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
Top = 368
|
||||
ExplicitTop = 368
|
||||
ExplicitWidth = 188
|
||||
inherited TBXButton1: TTBXButton
|
||||
AlignWithMargins = True
|
||||
Left = 3
|
||||
Top = 3
|
||||
Width = 182
|
||||
Height = 37
|
||||
Margins.Left = 8
|
||||
Margins.Top = 8
|
||||
Margins.Right = 8
|
||||
Margins.Bottom = 8
|
||||
Align = alTop
|
||||
ExplicitLeft = 3
|
||||
ExplicitTop = 3
|
||||
ExplicitWidth = 182
|
||||
ExplicitHeight = 37
|
||||
end
|
||||
end
|
||||
inline frViewIntervaloComparativo1: TfrViewIntervaloComparativo
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 188
|
||||
Height = 313
|
||||
Align = alTop
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
ReadOnly = False
|
||||
ExplicitWidth = 188
|
||||
ExplicitHeight = 313
|
||||
inherited TBXAlignmentPanel2: TTBXAlignmentPanel
|
||||
Width = 182
|
||||
ExplicitWidth = 182
|
||||
inherited Label3: TLabel
|
||||
Width = 172
|
||||
end
|
||||
inherited cbIntervalo: TcxComboBox
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 166
|
||||
Width = 166
|
||||
end
|
||||
end
|
||||
inherited TBXLabel2: TTBXLabel
|
||||
Width = 188
|
||||
ExplicitWidth = 188
|
||||
end
|
||||
inherited TBXAlignmentPanel3: TTBXAlignmentPanel
|
||||
Width = 182
|
||||
ExplicitWidth = 182
|
||||
inherited lis: TLabel
|
||||
Width = 172
|
||||
end
|
||||
inherited cbAno1: TcxComboBox
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 166
|
||||
Width = 166
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
Width = 182
|
||||
ExplicitWidth = 182
|
||||
inherited Label1: TLabel
|
||||
Width = 172
|
||||
end
|
||||
inherited cbAno2: TcxComboBox
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 166
|
||||
Width = 166
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel4: TTBXAlignmentPanel
|
||||
Top = 224
|
||||
Width = 182
|
||||
ExplicitTop = 224
|
||||
ExplicitWidth = 182
|
||||
inherited Label2: TLabel
|
||||
Width = 172
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel5: TTBXAlignmentPanel
|
||||
Top = 176
|
||||
Width = 182
|
||||
ExplicitTop = 176
|
||||
ExplicitWidth = 182
|
||||
inherited Label4: TLabel
|
||||
Width = 172
|
||||
end
|
||||
inherited cbSerie: TcxComboBox
|
||||
Properties.Items.Strings = (
|
||||
'Todos'
|
||||
'Servidos'
|
||||
'Incidencias'
|
||||
'Fuera de fecha'
|
||||
#211'rdenes dev.')
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 166
|
||||
Width = 166
|
||||
end
|
||||
end
|
||||
end
|
||||
inline frViewFiltroClientes1: TfrViewFiltroClientes
|
||||
Left = 0
|
||||
Top = 313
|
||||
Width = 188
|
||||
Height = 195
|
||||
Align = alTop
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
ReadOnly = False
|
||||
ExplicitTop = 313
|
||||
ExplicitWidth = 188
|
||||
inherited TBXLabel2: TTBXLabel
|
||||
Width = 188
|
||||
ExplicitWidth = 188
|
||||
end
|
||||
inherited bElegirCliente: TBitBtn
|
||||
Width = 119
|
||||
ExplicitWidth = 119
|
||||
end
|
||||
inherited edtCliente: TcxTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 152
|
||||
Width = 152
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -0,0 +1,186 @@
|
||||
unit uEditorInformeObjetivosReport;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail,
|
||||
frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient,
|
||||
frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage,
|
||||
JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList,
|
||||
StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems,
|
||||
TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls,
|
||||
JvExControls, JvNavigationPane, uCustomView,
|
||||
uViewBase, uViewPeriodoFechas, uControllerBase,
|
||||
dxLayoutControl, cxControls, uViewFiltroImportes,
|
||||
FactuGES_Intf, TBXDkPanels, uEditorInformeBase,
|
||||
uIEditorInformeBase, uViewParametrosInforme, uIEditorInformeAlbaranesClienteReportGrafComp,
|
||||
uViewIntervaloComparativo, uViewFiltroClientes;
|
||||
|
||||
type
|
||||
TfEditorInformeObjetivosReport = class(TfEditorInformeBase, IEditorInformeAlbaranesClienteReportGrafComp)
|
||||
TBXItem58: TTBXItem;
|
||||
frViewIntervaloComparativo1: TfrViewIntervaloComparativo;
|
||||
frViewFiltroClientes1: TfrViewFiltroClientes;
|
||||
procedure actRefrescarExecute(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
|
||||
private
|
||||
FListaIDClientes: TIntegerArray;
|
||||
function GetIntervalo: Variant;
|
||||
function GetAno1: Variant;
|
||||
function GetAno2: Variant;
|
||||
function GetSerie: variant;
|
||||
function GetListaIDClientes: TIntegerArray;
|
||||
function GetNTop: Variant;
|
||||
|
||||
procedure RefrescarInforme;
|
||||
|
||||
protected
|
||||
procedure SetController (const Value : IControllerBase); override;
|
||||
|
||||
public
|
||||
property Intervalo: Variant read GetIntervalo;
|
||||
property Ano1: Variant read GetAno1;
|
||||
property Ano2: Variant read GetAno2;
|
||||
property ListaIDClientes: TIntegerArray read GetListaIDClientes;
|
||||
property NTop: Variant read GetNTop;
|
||||
property Serie: Variant read GetSerie;
|
||||
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
uses uROTypes, DateUtils, uGestorInformesController, uFactuGES_App;
|
||||
|
||||
{ TfEditorGestorInformesReport }
|
||||
|
||||
procedure TfEditorInformeObjetivosReport.actRefrescarExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
RefrescarInforme;
|
||||
end;
|
||||
|
||||
constructor TfEditorInformeObjetivosReport.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FListaIDClientes := TIntegerArray.Create;
|
||||
end;
|
||||
|
||||
destructor TfEditorInformeObjetivosReport.Destroy;
|
||||
begin
|
||||
FListaIDClientes.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TfEditorInformeObjetivosReport.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
actTodaPagina.Execute;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosReport.GetIntervalo: Variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.cbIntervalo.EditValue;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosReport.GetAno1: Variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.cbAno1.EditValue;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosReport.GetAno2: Variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.cbAno2.EditValue;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosReport.GetListaIDClientes: TIntegerArray;
|
||||
begin
|
||||
FListaIDClientes.Clear;
|
||||
if Assigned(frViewFiltroClientes1.Cliente) then
|
||||
FListaIDClientes.Add(frViewFiltroClientes1.Cliente.ID);
|
||||
|
||||
Result := FListaIDClientes;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosReport.GetNTop: Variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.stopN.Value;
|
||||
end;
|
||||
|
||||
function TfEditorInformeObjetivosReport.GetSerie: variant;
|
||||
begin
|
||||
Result := frViewIntervaloComparativo1.Serie;
|
||||
end;
|
||||
|
||||
procedure TfEditorInformeObjetivosReport.RefrescarInforme;
|
||||
var
|
||||
AStream: Binary;
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
|
||||
AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeAlbaranesCliGrafComp(
|
||||
AppFactuGES.EmpresaActiva.ID,
|
||||
Intervalo,
|
||||
Ano1,
|
||||
Ano2,
|
||||
ListaIDClientes,
|
||||
NTop,
|
||||
Serie);
|
||||
|
||||
LoadFromStream(AStream);
|
||||
Report.ShowPreparedReport;
|
||||
finally
|
||||
FreeAndNil(AStream);
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfEditorInformeObjetivosReport.SetController(
|
||||
const Value: IControllerBase);
|
||||
var
|
||||
AListaAnos: TStringList;
|
||||
AListaIntervalos: TStringList;
|
||||
i: Integer;
|
||||
|
||||
begin
|
||||
inherited;
|
||||
|
||||
AListaIntervalos := (Controller as IGestorInformesController).DarListaIntervalos;
|
||||
AListaAnos := (Controller as IGestorInformesController).DarListaAnosAlbaranesCli;
|
||||
|
||||
if Assigned(AListaIntervalos) then
|
||||
begin
|
||||
frViewIntervaloComparativo1.cbIntervalo.Properties.Items.BeginUpdate;
|
||||
frViewIntervaloComparativo1.cbIntervalo.Properties.Items.Clear;
|
||||
for i := 0 to AListaIntervalos.Count - 1 do
|
||||
frViewIntervaloComparativo1.cbIntervalo.Properties.Items.Append(AListaIntervalos.Strings[i]);
|
||||
frViewIntervaloComparativo1.cbIntervalo.Properties.Items.EndUpdate;
|
||||
end;
|
||||
|
||||
if Assigned(AListaAnos) then
|
||||
begin
|
||||
frViewIntervaloComparativo1.cbAno1.Properties.Items.BeginUpdate;
|
||||
frViewIntervaloComparativo1.cbAno2.Properties.Items.BeginUpdate;
|
||||
frViewIntervaloComparativo1.cbAno1.Properties.Items.Clear;
|
||||
frViewIntervaloComparativo1.cbAno2.Properties.Items.Clear;
|
||||
for i := 0 to AListaAnos.Count - 2 do
|
||||
begin
|
||||
frViewIntervaloComparativo1.cbAno1.Properties.Items.Append(AListaAnos.Strings[i]);
|
||||
frViewIntervaloComparativo1.cbAno2.Properties.Items.Append(AListaAnos.Strings[i]);
|
||||
end;
|
||||
frViewIntervaloComparativo1.cbAno1.Properties.Items.EndUpdate;
|
||||
frViewIntervaloComparativo1.cbAno2.Properties.Items.EndUpdate;
|
||||
end;
|
||||
|
||||
frViewIntervaloComparativo1.cbIntervalo.ItemIndex := 0;
|
||||
frViewIntervaloComparativo1.cbAno1.ItemIndex := 0;
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -16,7 +16,9 @@ uses
|
||||
uEditorInformeIVAProveedoresReport, uEditorInformeFacturasProveedorReport, uEditorInformeFacturasProveedorPendientesReport,
|
||||
uEditorInformeRecibosProveedorReport, uEditorInformeRecibosProvPendientesReport,
|
||||
|
||||
uEditorInformeAlbaranesClienteReportGrafComp, uEditorInformeFacturasProveedorReportGrafComp, uEditorInformeFacturasClienteReportGrafComp, uEditorInformeBeneficiosReportGrafComp;
|
||||
uEditorInformeAlbaranesClienteReportGrafComp, uEditorInformeFacturasProveedorReportGrafComp, uEditorInformeFacturasClienteReportGrafComp, uEditorInformeBeneficiosReportGrafComp,
|
||||
|
||||
uEditorInformeObjetivosAlbaranesReport, uEditorInformeObjetivosFacturasReport;
|
||||
|
||||
procedure RegisterViews;
|
||||
begin
|
||||
@ -38,6 +40,8 @@ begin
|
||||
EditorRegistry.RegisterClass(TfEditorInformeFacturasProveedorReportGrafComp, 'EditorInformeFacturasProveedorReportGrafComp');
|
||||
EditorRegistry.RegisterClass(TfEditorInformeFacturasClienteReportGrafComp, 'EditorInformeFacturasClienteReportGrafComp');
|
||||
EditorRegistry.RegisterClass(TfEditorInformeBeneficiosReportGrafComp, 'EditorInformeBeneficiosReportGrafComp');
|
||||
EditorRegistry.RegisterClass(TfEditorInformeObjetivosAlbaranesReport, 'EditorInformeObjetivosAlbaranesReport');
|
||||
EditorRegistry.RegisterClass(TfEditorInformeObjetivosFacturasReport, 'EditorInformeObjetivosFacturasReport');
|
||||
end;
|
||||
|
||||
procedure UnregisterViews;
|
||||
@ -59,7 +63,9 @@ begin
|
||||
|
||||
EditorRegistry.UnRegisterClass(TfEditorInformeFacturasProveedorReportGrafComp);
|
||||
EditorRegistry.UnRegisterClass(TfEditorInformeFacturasClienteReportGrafComp);
|
||||
EditorRegistry.UnRegisterClass(TfEditorInformeAlbaranesClienteReportGrafComp);
|
||||
EditorRegistry.UnRegisterClass(TfEditorInformeAlbaranesClienteReportGrafComp);
|
||||
EditorRegistry.UnRegisterClass(TfEditorInformeObjetivosAlbaranesReport);
|
||||
EditorRegistry.UnRegisterClass(TfEditorInformeObjetivosFacturasReport);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
131
Source/Modulos/Gestor de informes/Views/uViewFiltroAgentes.dfm
Normal file
131
Source/Modulos/Gestor de informes/Views/uViewFiltroAgentes.dfm
Normal file
@ -0,0 +1,131 @@
|
||||
inherited frViewFiltroAgentes: TfrViewFiltroAgentes
|
||||
Width = 451
|
||||
Align = alTop
|
||||
OnCreate = CustomViewCreate
|
||||
OnDestroy = CustomViewDestroy
|
||||
ExplicitWidth = 451
|
||||
DesignSize = (
|
||||
451
|
||||
195)
|
||||
object TBXLabel2: TTBXLabel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 451
|
||||
Height = 29
|
||||
Margins.Top = 5
|
||||
Margins.Bottom = 10
|
||||
Align = alTop
|
||||
Caption = 'Agentes'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = True
|
||||
ParentFont = False
|
||||
Underline = True
|
||||
end
|
||||
object bElegirAgente: TBitBtn
|
||||
AlignWithMargins = True
|
||||
Left = 61
|
||||
Top = 123
|
||||
Width = 382
|
||||
Height = 23
|
||||
Margins.Left = 0
|
||||
Margins.Top = 0
|
||||
Margins.Right = 2
|
||||
Margins.Bottom = 0
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
Caption = 'Elegir un agente'
|
||||
Enabled = False
|
||||
TabOrder = 1
|
||||
OnClick = bElegirAgenteClick
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000000000000000000000000000000000000FF00FF00FF00
|
||||
FF00FF00FF00EB00EB00C507C600AB13AD00A119A2009F19A000A215A400AA10
|
||||
AC00B608B800CE00CE00EF00EF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00B426B000526840004A823400478F310043962F0042992F0043972F004690
|
||||
3100488533004B7237005A405100D201D200FF00FF00FF00FF00FF00FF00FF00
|
||||
FF0062654E004F81350047903100409C2E003AA62C0038AA2B0039A72B003E9E
|
||||
2D00459230004D84340056753800A0189F00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF005F6B4C004B89330042992F0039A82B0032B428002EBB260031B6270037AB
|
||||
2A00409C2E00498C3200527B3600B015B100FF00FF00FF00FF00FF00FF00FF00
|
||||
FF0090488700488D32003E9E2D0035AF290035B631007ACB7B002DBF280033B2
|
||||
28003DA12D0047903100576A4800EC01EC00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00F008F1005F7351003E9F2D0034B0290080AC8100D2D3D30081BB820032B2
|
||||
28003DA22D004A863A00C519C500FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00EE09EF007861730036923E00598CAE00498CBB004A81A6002B70
|
||||
3A00606D5900D613D600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00FF00FF00EA0CF400608CD00054A2D80053A1D6004F9DD300488B
|
||||
C2009D11AC00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00FF00FF008C67DE005CA9DD005CA9DD005AA7DC0056A4D900519F
|
||||
D400565FAB00EA00EA00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00EC0DF60060A7DE0063B0E30063B0E30061AEE1005CA9DD0056A4
|
||||
D9004E94CC00C105C600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00C532ED0066B2E5006BB7E9006BB7E90067B3E60061AEE1005AA7
|
||||
DC00539FD500A817BE00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00BA3AE7004989B1004A85AC005895BD0068B2E30064B0E4005CA9
|
||||
DE0053A0D400AA1BC300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00CA23E8005098C400539AC7004E93BE00437DA2005190BA005198
|
||||
C6003C79A000BE08C300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00F804FC006995D40062ACDA005DA6D3005299C6004284AD003C7F
|
||||
A900535AA100F300F300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00FF00FF00C140ED0071BAEA0068B2E00059A1CF004990BC004378
|
||||
AA00C315D600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00FF00FF00FF00FF00C83EF000808BDF00668BCC007C60C700D116
|
||||
E400FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
|
||||
end
|
||||
object cbxDesglosado: TCheckBox
|
||||
Left = 28
|
||||
Top = 52
|
||||
Width = 146
|
||||
Height = 17
|
||||
Caption = 'Desglosar por agente'
|
||||
TabOrder = 2
|
||||
end
|
||||
object edtAgente: TcxTextEdit
|
||||
Left = 28
|
||||
Top = 99
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
AutoSize = False
|
||||
Enabled = False
|
||||
Properties.ReadOnly = True
|
||||
Properties.UseLeftAlignmentOnEditing = False
|
||||
Style.BorderColor = clWindowFrame
|
||||
Style.BorderStyle = ebs3D
|
||||
Style.HotTrack = False
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.TextColor = clWindowText
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
TabOrder = 3
|
||||
Height = 21
|
||||
Width = 415
|
||||
end
|
||||
object rbTodosAgentes: TRadioButton
|
||||
Left = 6
|
||||
Top = 29
|
||||
Width = 147
|
||||
Height = 17
|
||||
Caption = 'Incluir a todos los agentes'
|
||||
Checked = True
|
||||
TabOrder = 4
|
||||
TabStop = True
|
||||
OnClick = rbTodosAgentesClick
|
||||
end
|
||||
object rbUnAgente: TRadioButton
|
||||
Left = 6
|
||||
Top = 76
|
||||
Width = 175
|
||||
Height = 17
|
||||
Caption = 'S'#243'lo listar el agente siguiente:'
|
||||
TabOrder = 5
|
||||
OnClick = rbUnAgenteClick
|
||||
end
|
||||
end
|
||||
@ -0,0 +1,95 @@
|
||||
unit uViewFiltroAgentes;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, uViewBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxDBEdit,
|
||||
StdCtrls, Buttons, TBXDkPanels, uViewParametrosInforme, uBizContactos,
|
||||
uAgentesController;
|
||||
|
||||
type
|
||||
IViewFiltroAgentes = interface(IViewParametrosInforme)
|
||||
['{95ACBD97-13A4-4360-A2F7-EC3B0905BB94}']
|
||||
end;
|
||||
|
||||
TfrViewFiltroAgentes = class(TfrViewParametrosInforme, IViewFiltroAgentes)
|
||||
TBXLabel2: TTBXLabel;
|
||||
rbTodosAgentes: TRadioButton;
|
||||
rbUnAgente: TRadioButton;
|
||||
cbxDesglosado: TCheckBox;
|
||||
bElegirAgente: TBitBtn;
|
||||
edtAgente: TcxTextEdit;
|
||||
procedure rbTodosAgentesClick(Sender: TObject);
|
||||
procedure rbUnAgenteClick(Sender: TObject);
|
||||
procedure CustomViewCreate(Sender: TObject);
|
||||
procedure bElegirAgenteClick(Sender: TObject);
|
||||
procedure CustomViewDestroy(Sender: TObject);
|
||||
private
|
||||
FAgente : IBizAgente;
|
||||
FAgentesController : IAgentesController;
|
||||
public
|
||||
property Agente : IBizAgente read FAgente;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrViewFiltroAgentes.bElegirAgenteClick(Sender: TObject);
|
||||
var
|
||||
AAgente : IBizAgente;
|
||||
begin
|
||||
inherited;
|
||||
AAgente := IBizAgente(FAgentesController.BuscarTodos);
|
||||
try
|
||||
FAgente := IBizAgente(FAgentesController.ElegirContacto(AAgente, '', False));
|
||||
if Assigned(FAgente) then
|
||||
begin
|
||||
FAgente.Open;
|
||||
edtAgente.Text := FAgente.NOMBRE;
|
||||
end;
|
||||
finally
|
||||
AAgente := NIL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrViewFiltroAgentes.CustomViewCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FAgente := NIL;
|
||||
FAgentesController := NIL;
|
||||
end;
|
||||
|
||||
procedure TfrViewFiltroAgentes.CustomViewDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FAgente := NIL;
|
||||
FAgentesController := NIL;
|
||||
end;
|
||||
|
||||
procedure TfrViewFiltroAgentes.rbTodosAgentesClick(Sender: TObject);
|
||||
begin
|
||||
if rbTodosAgentes.Checked then
|
||||
begin
|
||||
cbxDesglosado.Enabled := True;
|
||||
FAgente := NIL;
|
||||
bElegirAgente.Enabled := False;
|
||||
edtAgente.Clear;
|
||||
edtAgente.Enabled := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrViewFiltroAgentes.rbUnAgenteClick(Sender: TObject);
|
||||
begin
|
||||
if rbUnAgente.Checked then
|
||||
begin
|
||||
cbxDesglosado.Enabled := False;
|
||||
bElegirAgente.Enabled := True;
|
||||
edtAgente.Enabled := True;
|
||||
if not Assigned(FAgentesController) then
|
||||
FAgentesController := TAgentesController.Create;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -1038,6 +1038,42 @@
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
<Operation Name="GenerarInformeObjetivosAgentesAlbaranes" UID="{0CC0DE4A-DB4F-4899-B086-7214FD5B6F1C}">
|
||||
<Parameters>
|
||||
<Parameter Name="Result" DataType="Binary" Flag="Result">
|
||||
</Parameter>
|
||||
<Parameter Name="IdEmpresa" DataType="Integer" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="Intervalo" DataType="Variant" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="Ano1" DataType="Variant" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="Ano2" DataType="Variant" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="ListaIDAgentes" DataType="TIntegerArray" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="TopN" DataType="Integer" Flag="In" >
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
<Operation Name="GenerarInformeObjetivosAgentesFacturas" UID="{D5E9992E-C205-45F3-A2C0-FDF54F1C13CD}">
|
||||
<Parameters>
|
||||
<Parameter Name="Result" DataType="Binary" Flag="Result">
|
||||
</Parameter>
|
||||
<Parameter Name="IdEmpresa" DataType="Integer" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="Intervalo" DataType="Variant" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="Ano1" DataType="Variant" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="Ano2" DataType="Variant" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="ListaIDAgentes" DataType="TIntegerArray" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="TopN" DataType="Integer" Flag="In" >
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
</Operations>
|
||||
</Interface>
|
||||
</Interfaces>
|
||||
|
||||
@ -832,6 +832,10 @@ type
|
||||
function GenerarInformeAlbaranesCliGrafComp(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDClientes: TIntegerArray;
|
||||
const TopN: Integer; const Serie: Variant): Binary;
|
||||
function GenerarInformeBeneficiosGrafComp(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const Serie: Variant): Binary;
|
||||
function GenerarInformeObjetivosAgentesAlbaranes(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDAgentes: TIntegerArray;
|
||||
const TopN: Integer): Binary;
|
||||
function GenerarInformeObjetivosAgentesFacturas(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDAgentes: TIntegerArray;
|
||||
const TopN: Integer): Binary;
|
||||
end;
|
||||
|
||||
{ CosrvGestorInformes }
|
||||
@ -879,6 +883,10 @@ type
|
||||
function GenerarInformeAlbaranesCliGrafComp(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDClientes: TIntegerArray;
|
||||
const TopN: Integer; const Serie: Variant): Binary;
|
||||
function GenerarInformeBeneficiosGrafComp(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const Serie: Variant): Binary;
|
||||
function GenerarInformeObjetivosAgentesAlbaranes(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDAgentes: TIntegerArray;
|
||||
const TopN: Integer): Binary;
|
||||
function GenerarInformeObjetivosAgentesFacturas(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDAgentes: TIntegerArray;
|
||||
const TopN: Integer): Binary;
|
||||
end;
|
||||
|
||||
{ IsrvComisiones }
|
||||
@ -3114,6 +3122,52 @@ begin
|
||||
end
|
||||
end;
|
||||
|
||||
function TsrvGestorInformes_Proxy.GenerarInformeObjetivosAgentesAlbaranes(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDAgentes: TIntegerArray;
|
||||
const TopN: Integer): Binary;
|
||||
begin
|
||||
try
|
||||
result := nil;
|
||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeObjetivosAgentesAlbaranes');
|
||||
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
|
||||
__Message.Write('Intervalo', TypeInfo(Variant), Intervalo, []);
|
||||
__Message.Write('Ano1', TypeInfo(Variant), Ano1, []);
|
||||
__Message.Write('Ano2', TypeInfo(Variant), Ano2, []);
|
||||
__Message.Write('ListaIDAgentes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDAgentes, []);
|
||||
__Message.Write('TopN', TypeInfo(Integer), TopN, []);
|
||||
__Message.Finalize;
|
||||
|
||||
__TransportChannel.Dispatch(__Message);
|
||||
|
||||
__Message.Read('Result', TypeInfo(Binary), result, []);
|
||||
finally
|
||||
__Message.UnsetAttributes(__TransportChannel);
|
||||
__Message.FreeStream;
|
||||
end
|
||||
end;
|
||||
|
||||
function TsrvGestorInformes_Proxy.GenerarInformeObjetivosAgentesFacturas(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDAgentes: TIntegerArray;
|
||||
const TopN: Integer): Binary;
|
||||
begin
|
||||
try
|
||||
result := nil;
|
||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeObjetivosAgentesFacturas');
|
||||
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
|
||||
__Message.Write('Intervalo', TypeInfo(Variant), Intervalo, []);
|
||||
__Message.Write('Ano1', TypeInfo(Variant), Ano1, []);
|
||||
__Message.Write('Ano2', TypeInfo(Variant), Ano2, []);
|
||||
__Message.Write('ListaIDAgentes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDAgentes, []);
|
||||
__Message.Write('TopN', TypeInfo(Integer), TopN, []);
|
||||
__Message.Finalize;
|
||||
|
||||
__TransportChannel.Dispatch(__Message);
|
||||
|
||||
__Message.Read('Result', TypeInfo(Binary), result, []);
|
||||
finally
|
||||
__Message.UnsetAttributes(__TransportChannel);
|
||||
__Message.FreeStream;
|
||||
end
|
||||
end;
|
||||
|
||||
{ CosrvComisiones }
|
||||
|
||||
class function CosrvComisiones.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvComisiones;
|
||||
|
||||
@ -318,6 +318,8 @@ type
|
||||
procedure Invoke_GenerarInformeFacturasCliGrafComp(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
procedure Invoke_GenerarInformeAlbaranesCliGrafComp(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
procedure Invoke_GenerarInformeBeneficiosGrafComp(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
procedure Invoke_GenerarInformeObjetivosAgentesAlbaranes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
procedure Invoke_GenerarInformeObjetivosAgentesFacturas(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
end;
|
||||
|
||||
TsrvComisiones_Invoker = class(TDataAbstractService_Invoker)
|
||||
@ -2777,6 +2779,88 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeObjetivosAgentesAlbaranes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
{ function GenerarInformeObjetivosAgentesAlbaranes(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDAgentes: TIntegerArray;
|
||||
const TopN: Integer): Binary; }
|
||||
var
|
||||
IdEmpresa: Integer;
|
||||
Intervalo: Variant;
|
||||
Ano1: Variant;
|
||||
Ano2: Variant;
|
||||
ListaIDAgentes: FactuGES_Intf.TIntegerArray;
|
||||
TopN: Integer;
|
||||
lResult: Binary;
|
||||
__lObjectDisposer: TROObjectDisposer;
|
||||
begin
|
||||
ListaIDAgentes := nil;
|
||||
lResult := nil;
|
||||
try
|
||||
__Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
|
||||
__Message.Read('Intervalo', TypeInfo(Variant), Intervalo, []);
|
||||
__Message.Read('Ano1', TypeInfo(Variant), Ano1, []);
|
||||
__Message.Read('Ano2', TypeInfo(Variant), Ano2, []);
|
||||
__Message.Read('ListaIDAgentes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDAgentes, []);
|
||||
__Message.Read('TopN', TypeInfo(Integer), TopN, []);
|
||||
|
||||
lResult := (__Instance as IsrvGestorInformes).GenerarInformeObjetivosAgentesAlbaranes(IdEmpresa, Intervalo, Ano1, Ano2, ListaIDAgentes, TopN);
|
||||
|
||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeObjetivosAgentesAlbaranesResponse');
|
||||
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
||||
__Message.Finalize;
|
||||
__Message.UnsetAttributes(__Transport);
|
||||
|
||||
finally
|
||||
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
|
||||
try
|
||||
__lObjectDisposer.Add(ListaIDAgentes);
|
||||
__lObjectDisposer.Add(lResult);
|
||||
finally
|
||||
__lObjectDisposer.Free();
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeObjetivosAgentesFacturas(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
{ function GenerarInformeObjetivosAgentesFacturas(const IdEmpresa: Integer; const Intervalo: Variant; const Ano1: Variant; const Ano2: Variant; const ListaIDAgentes: TIntegerArray;
|
||||
const TopN: Integer): Binary; }
|
||||
var
|
||||
IdEmpresa: Integer;
|
||||
Intervalo: Variant;
|
||||
Ano1: Variant;
|
||||
Ano2: Variant;
|
||||
ListaIDAgentes: FactuGES_Intf.TIntegerArray;
|
||||
TopN: Integer;
|
||||
lResult: Binary;
|
||||
__lObjectDisposer: TROObjectDisposer;
|
||||
begin
|
||||
ListaIDAgentes := nil;
|
||||
lResult := nil;
|
||||
try
|
||||
__Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
|
||||
__Message.Read('Intervalo', TypeInfo(Variant), Intervalo, []);
|
||||
__Message.Read('Ano1', TypeInfo(Variant), Ano1, []);
|
||||
__Message.Read('Ano2', TypeInfo(Variant), Ano2, []);
|
||||
__Message.Read('ListaIDAgentes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDAgentes, []);
|
||||
__Message.Read('TopN', TypeInfo(Integer), TopN, []);
|
||||
|
||||
lResult := (__Instance as IsrvGestorInformes).GenerarInformeObjetivosAgentesFacturas(IdEmpresa, Intervalo, Ano1, Ano2, ListaIDAgentes, TopN);
|
||||
|
||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeObjetivosAgentesFacturasResponse');
|
||||
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
||||
__Message.Finalize;
|
||||
__Message.UnsetAttributes(__Transport);
|
||||
|
||||
finally
|
||||
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
|
||||
try
|
||||
__lObjectDisposer.Add(ListaIDAgentes);
|
||||
__lObjectDisposer.Add(lResult);
|
||||
finally
|
||||
__lObjectDisposer.Free();
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TsrvComisiones_Invoker }
|
||||
|
||||
constructor TsrvComisiones_Invoker.Create;
|
||||
|
||||
Binary file not shown.
@ -35,7 +35,23 @@
|
||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||
<Borland.ProjectType />
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters><Parameters Name="RunParams">/standalone</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">1</VersionInfo><VersionInfo Name="Release">9</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.1.9.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.1.9.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">lunes, 03 de octubre de 2011 17:23</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters><Parameters Name="RunParams">/standalone</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">2</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.2.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.2.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">lunes, 31 de octubre de 2011 11:24</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPSCoreD11.bpl">ExpressPrinting System by Developer Express Inc.</Excluded_Packages>
|
||||
</Excluded_Packages><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
|
||||
Reference in New Issue
Block a user