Primera fase de preparacion de informes de proveedor, se han cambiado el nombre de procedimientos en los informes de cliente

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@713 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
roberto 2008-10-21 17:58:25 +00:00
parent 9451e968d5
commit 366a1946b2
56 changed files with 4829 additions and 2449 deletions

View File

@ -54,11 +54,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">1</VersionInfo><VersionInfo Name="MinorVer">3</VersionInfo><VersionInfo Name="Release">7</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">1.3.7.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">1.3.7.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<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">1</VersionInfo><VersionInfo Name="MinorVer">4</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">1.4.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">1.4.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>

View File

@ -1,7 +1,7 @@
MAINICON ICON "C:\Codigo Tecsitel\Resources\Iconos\Factuges.ico"
1 VERSIONINFO
FILEVERSION 1,3,7,0
PRODUCTVERSION 1,3,7,0
FILEVERSION 1,4,0,0
PRODUCTVERSION 1,4,0,0
FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L
FILEOS 0x40004L
@ -13,10 +13,10 @@ BEGIN
BLOCK "0C0A04E4"
BEGIN
VALUE "CompanyName", "Rodax Software S.L.\0"
VALUE "FileVersion", "1.3.7.0\0"
VALUE "FileVersion", "1.4.0.0\0"
VALUE "InternalName", "FactuGES\0"
VALUE "ProductName", "FactuGES\0"
VALUE "ProductVersion", "1.3.7.0\0"
VALUE "ProductVersion", "1.4.0.0\0"
END
END
BLOCK "VarFileInfo"

Binary file not shown.

View File

@ -94,8 +94,8 @@ type
function GenerarFactura(const ListaID : TIntegerArray): Binary;
function GenerarFacturaEnPDF(const ListaID : TIntegerArray): Binary;
function GenerarInformeIVA(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
end;
implementation
@ -187,7 +187,7 @@ begin
Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, ImporteMinimo);
end;
function TRptFacturasCliente.GetInformeListadoFacturas(const IdEmpresa: Integer;
function TRptFacturasCliente.GenerarInformeListadoFacturas(const IdEmpresa: Integer;
const FechaInicio, FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
var
@ -204,7 +204,7 @@ begin
Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, ImporteMinimo);
end;
function TRptFacturasCliente.GetInformeListadoFacturasPendientes(
function TRptFacturasCliente.GenerarInformeListadoFacturasPendientes(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;

View File

@ -123,13 +123,13 @@ begin
begin
case JsInformesDialog.CustomButtonResult of
100 : begin // Listado de facturas pendientes
AGestorInformesController.VerInformeListadoFacturasPendientes;
AGestorInformesController.VerInformeListadoFacturasCliPendientes;
end;
200 : begin // Listado de IVA
AGestorInformesController.VerInformeIVAClientes;
end;
300 : begin // Listado de facturas de cliente
AGestorInformesController.VerInformeListadoFacturas;
AGestorInformesController.VerInformeListadoFacturasCli;
end;
end;
end;

View File

@ -0,0 +1,6 @@
inherited fEditorPreview1: TfEditorPreview1
Caption = 'fEditorPreview1'
ExplicitHeight = 492
PixelsPerInch = 96
TextHeight = 13
end

View File

@ -0,0 +1,30 @@
unit uEditorInfFacturasClienteReport;
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;
type
TfEditorPreview1 = class(TfEditorPreview)
private
{ Private declarations }
public
{ Public declarations }
end;
var
fEditorPreview1: TfEditorPreview1;
implementation
{$R *.dfm}
end.

View File

@ -7,36 +7,88 @@ uses
Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
uDAInterfaces;
uDAInterfaces, uDADataStreamer, IBCustomDataSet, IBQuery, IBDatabase,
uDAMemDataTable, FactuGES_Intf, frxExportPDF;
type
TRptFacturasProveedor = class(TDataModule)
DADataCabecera: TDADataSource;
DADataDetalles: TDADataSource;
tbl_FacturaProveedor: TDACDSDataTable;
tbl_DetallesFacturaProveedor: TDACDSDataTable;
DABINAdapter: TDABINAdapter;
frxRichObject1: TfrxRichObject;
frxBarCodeObject1: TfrxBarCodeObject;
frxOLEObject1: TfrxOLEObject;
frxCrossObject1: TfrxCrossObject;
frxCheckBoxObject1: TfrxCheckBoxObject;
frxGradientObject1: TfrxGradientObject;
frxChartObject1: TfrxChartObject;
frxDBCabecera: TfrxDBDataset;
frxDBDetalles: TfrxDBDataset;
tbl_Vencimientos: TDACDSDataTable;
DADataVencimientos: TDADataSource;
frxDBDataset1: TfrxDBDataset;
schReport: TDASchema;
DataDictionary: TDADataDictionary;
IBDatabase1: TIBDatabase;
IBTransaction1: TIBTransaction;
DataSource1: TDataSource;
DataSource2: TDataSource;
cabecera: TIBQuery;
detalles: TIBQuery;
DABINAdapter: TDABINAdapter;
DADSCabecera: TDADataSource;
DADSDetalles: TDADataSource;
tbl_Detalles: TDAMemDataTable;
tbl_Cabecera: TDAMemDataTable;
frxCheckBoxObject1: TfrxCheckBoxObject;
frxChartObject1: TfrxChartObject;
frxGradientObject1: TfrxGradientObject;
frxCrossObject1: TfrxCrossObject;
frxOLEObject1: TfrxOLEObject;
frxBarCodeObject1: TfrxBarCodeObject;
frxRichObject1: TfrxRichObject;
frxReport: TfrxReport;
cabeceraID: TIntegerField;
cabeceraID_EMPRESA: TIntegerField;
cabeceraREFERENCIA: TIBStringField;
cabeceraTIPO: TIBStringField;
cabeceraFECHA_FACTURA: TDateField;
cabeceraBASE_IMPONIBLE: TIBBCDField;
cabeceraSITUACION: TIBStringField;
cabeceraDESCUENTO: TFloatField;
cabeceraIMPORTE_DESCUENTO: TIBBCDField;
cabeceraIVA: TFloatField;
cabeceraIMPORTE_IVA: TIBBCDField;
cabeceraRE: TFloatField;
cabeceraIMPORTE_RE: TIBBCDField;
cabeceraIMPORTE_TOTAL: TIBBCDField;
cabeceraOBSERVACIONES: TMemoField;
cabeceraNIF_CIF: TIBStringField;
cabeceraID_CLIENTE: TIntegerField;
cabeceraNOMBRE: TIBStringField;
cabeceraCALLE: TIBStringField;
cabeceraPROVINCIA: TIBStringField;
cabeceraPOBLACION: TIBStringField;
cabeceraCODIGO_POSTAL: TIBStringField;
cabeceraRECARGO_EQUIVALENCIA: TSmallintField;
cabeceraIMPORTE_NETO: TIBBCDField;
cabeceraIMPORTE_PORTE: TIBBCDField;
cabeceraFORMA_PAGO: TIBStringField;
detallesID: TIntegerField;
detallesID_FACTURA: TIntegerField;
detallesPOSICION: TIntegerField;
detallesTIPO_DETALLE: TIBStringField;
detallesCONCEPTO: TIBStringField;
detallesCANTIDAD: TIntegerField;
detallesIMPORTE_UNIDAD: TIBBCDField;
detallesDESCUENTO: TFloatField;
detallesIMPORTE_TOTAL: TIBBCDField;
detallesVISIBLE: TSmallintField;
detallesREFERENCIA: TIBStringField;
vencimientos: TIBQuery;
DataSource3: TDataSource;
cabeceraDATOS_BANCARIOS: TIBStringField;
vencimientosFECHA_VENCIMIENTO: TDateField;
vencimientosIMPORTE_TOTAL: TIBBCDField;
frxPDFExport1: TfrxPDFExport;
tbl_InformeListadoFacturas: TDAMemDataTable;
DADSInformeListadoFacturas: TDADataSource;
frxDBInformeListadoFacturas: TfrxDBDataset;
schReport: TDASchema;
procedure DataModuleCreate(Sender: TObject);
private
FConnection: IDAConnection;
procedure GenerarFactura(const AFacturaID: integer); overload;
function _GenerarInforme(const TipoInforme: String; const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const ImporteMinimo: Currency): Binary;
public
function GenerarFactura(const AFacturaID : String): Binary; overload;
function GenerarInformeIVA(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
end;
implementation
@ -47,12 +99,12 @@ uses
uDataModuleServer, schFacturasProveedorClient_Intf;
const
rptFacturaProveedor = 'InfFacturaProveedor.fr3';
{ Dataset names for schReport }
ds_InformeFacturasProveedor = 'InformeFacturasProveedor';
ds_InformeFacturasProveedor_Detalles = 'InformeFacturasProveedor_Detalles';
ds_InformeFacturasProveedor_Vencimientos = 'InformeFacturasProveedor_Vencimientos';
rptInformeIVA = 'InformeIVAProveedores.fr3';
rptInformeIVADesglosado = 'InformeIVAProveedoresDesglosado.fr3';
rptInformeListadoFacturasProveedor = 'InformeListadoFacturasProveedor.fr3';
rptInformeListadoFacturasProveedorDesglosado = 'InformeListadoFacturasProveedorDesglosado.fr3';
rptInformeListadoFactuasProveedorPendiente = 'InformeListadoFacturasProveedorPendientes.fr3';
rptInformeListadoFactuasProveedorPendienteDesglosado = 'InformeListadoFacturasProveedorPendientesDesglosado.fr3';
{ TRptFacturasProveedor }
@ -62,66 +114,165 @@ begin
schReport.ConnectionManager := dmServer.ConnectionManager;
FConnection := dmServer.DarNuevaConexion;
frxReport.EngineOptions.NewSilentMode := simReThrow;
frxDBCabecera.DataSource := DADSCabecera;
frxDBDetalles.DataSource := DADSDetalles;
end;
function TRptFacturasProveedor.GenerarFactura(const AFacturaID: String): Binary;
function TRptFacturasProveedor.GenerarInformeIVA(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
var
ID_Facturas: TStringList;
ATipoInforme: String;
begin
//DESGLOSADO POR PROVEEDOR EN ESTE INFORME NO SE DESGLOSARÁ POR PROVEEDOR
if Desglosado then
ATipoInforme := rptInformeIVADesglosado
else
ATipoInforme := rptInformeIVA;
Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, ImporteMinimo);
end;
function TRptFacturasProveedor.GenerarInformeListadoFacturas(const IdEmpresa: Integer;
const FechaInicio, FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
var
ATipoInforme: String;
begin
//DESGLOSADO POR PROVEEDOR EN ESTE INFORME NO SE DESGLOSARÁ POR PROVEEDOR
if Desglosado then
ATipoInforme := rptInformeListadoFacturasProveedorDesglosado
else
ATipoInforme := rptInformeListadoFacturasProveedor;
Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, ImporteMinimo);
end;
function TRptFacturasProveedor.GenerarInformeListadoFacturasPendientes(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
var
Condicion: TDAWhereExpression;
ATipoInforme: String;
begin
if tbl_InformeListadoFacturas.Active then
tbl_InformeListadoFacturas.Active := False;
// Filtrar el informe por situacion
with tbl_InformeListadoFacturas.DynamicWhere do
begin
// (ID_EMPRESA >= ID)
Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorSITUACION), NewConstant('PAGADA', datString), dboNotEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
//DESGLOSADO POR PROVEEDOR EN ESTE INFORME
if Desglosado then
ATipoInforme := rptInformeListadoFactuasProveedorPendienteDesglosado
else
ATipoInforme := rptInformeListadoFactuasProveedorPendiente;
Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, ImporteMinimo);
end;
function TRptFacturasProveedor._GenerarInforme(const TipoInforme: String;
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDProveedores: TIntegerArray; const ImporteMinimo: Currency): Binary;
var
Condicion: TDAWhereExpression;
i: Integer;
begin
Result := Binary.Create;
FConnection.BeginTransaction;
//FConnection.BeginTransaction; <--- Creo que no va a hacer falta.
try
ID_Facturas := TStringList.Create;
ID_Facturas.CommaText := AFacturaID;
//Vamos generando todos y cada uno de los albaranes recibidos
for i := 0 to ID_Facturas.Count - 1 do
GenerarFactura(StrToInt(ID_Facturas.Strings[i]));
if tbl_InformeListadoFacturas.Active then
tbl_InformeListadoFacturas.Active := False;
// Filtrar el informe por empresa
with tbl_InformeListadoFacturas.DynamicWhere do
begin
// (ID_EMPRESA >= ID)
Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorID_EMPRESA), NewConstant(IdEmpresa, datInteger), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
// Filtrar el informe por fechas
if not VarIsNull(FechaInicio)
and not VarIsNull(FechaFin) then
begin
with tbl_InformeListadoFacturas.DynamicWhere do
begin
// (FECHA_INICIO between FECHA_FIN)
Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorFECHA_FACTURA), NewConstant(FechaInicio, datDateTime), dboGreaterOrEqual);
Condicion := NewBinaryExpression(NewBinaryExpression(NewField('', fld_FacturasProveedorFECHA_FACTURA), NewConstant(FechaFin, datDateTime), dboLessOrEqual), Condicion, dboAnd);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
// Filtrar el informe por Proveedor
if Assigned(ListaIDProveedores) then
begin
with tbl_InformeListadoFacturas.DynamicWhere do
begin
for i := 0 to ListaIDProveedores.Count - 1 do
begin
// (ID_PROVEEDOR = ID)
Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorID_PROVEEDOR), NewConstant(ListaIDProveedores.Items[i], datInteger), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
end;
// Filtrar el informe por importe minimo
if (ImporteMinimo > 0) then
begin
with tbl_InformeListadoFacturas.DynamicWhere do
begin
// (IMPORTE_TOTAL > ImporteMinimo)
Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorIMPORTE_TOTAL), NewConstant(ImporteMinimo, datCurrency), dboGreaterOrEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
tbl_InformeListadoFacturas.Active := True;
frxReport.LoadFromFile(DarRutaInformes + TipoInforme, True);
frxReport.Variables.Variables['FechaInicio'] := FechaInicio;
frxReport.Variables.Variables['FechaFin'] := FechaFin;
frxReport.PrepareReport(False);
frxReport.PreviewPages.SaveToStream(Result);
finally
FConnection.RollbackTransaction;
end;
end;
procedure TRptFacturasProveedor.GenerarFactura(const AFacturaID: integer);
var
AStream: TMemoryStream;
dsMaster: IDADataset;
dsDetail: IDADataset;
dsVencimientos : IDADataset;
begin
AStream := TMemoryStream.Create;
try
dsMaster := schReport.NewDataset(FConnection, ds_InformeFacturasProveedor, ['ID'], [AFacturaID]);
dsDetail := schReport.NewDataset(FConnection, ds_InformeFacturasProveedor_Detalles, ['ID_FACTURA'], [AFacturaID], False);
dsVencimientos := schReport.NewDataset(FConnection, ds_InformeFacturasProveedor_Vencimientos, ['ID_FACTURA'], [AFacturaID], False);
AStream.Clear;
DABINAdapter.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1);
DABINAdapter.ReadDataset(AStream, tbl_FacturaProveedor, TRUE, '', TRUE, TRUE);
AStream.Clear;
DABINAdapter.WriteDataset(AStream, dsDetail, [woRows, woSchema], -1);
DABINAdapter.ReadDataset(AStream, tbl_DetallesFacturaProveedor, TRUE, '', TRUE, TRUE);
AStream.Clear;
DABINAdapter.WriteDataset(AStream, dsVencimientos, [woRows, woSchema], -1);
DABINAdapter.ReadDataset(AStream, tbl_Vencimientos, TRUE, '', TRUE, TRUE);
frxReport.LoadFromFile(DarRutaInformes + rptFacturaProveedor, True);
frxReport.PrepareReport(False);
finally
AStream.Free;
dsMaster := Nil;
dsDetail := Nil;
//FConnection.RollbackTransaction; <--- Creo que no va a hacer falta.
end;
end;

View File

@ -36,6 +36,13 @@ contains
uIEditorInformeIVAClientesReport in 'View\uIEditorInformeIVAClientesReport.pas',
uIEditorInformeFacturasClientePendientesReport in 'View\uIEditorInformeFacturasClientePendientesReport.pas',
uIEditorInformeRecibosClienteReport in 'View\uIEditorInformeRecibosClienteReport.pas',
uIEditorInformeRecibosCliPendientesReport in 'View\uIEditorInformeRecibosCliPendientesReport.pas';
uIEditorInformeRecibosCliPendientesReport in 'View\uIEditorInformeRecibosCliPendientesReport.pas',
uIEditorInformeIVAProveedoresReport in 'View\uIEditorInformeIVAProveedoresReport.pas',
uIEditorInformeRecibosProvPendientesReport in 'View\uIEditorInformeRecibosProvPendientesReport.pas',
uIEditorInformeFacturasProveedorPendientesReport in 'View\uIEditorInformeFacturasProveedorPendientesReport.pas',
uIEditorInformeFacturasProveedorReport in 'View\uIEditorInformeFacturasProveedorReport.pas',
uIEditorInformePresupuestosReport in 'View\uIEditorInformePresupuestosReport.pas',
uIEditorInformeRecibosProveedorReport in 'View\uIEditorInformeRecibosProveedorReport.pas',
uIEditorInformePedidosReport in 'View\uIEditorInformePedidosReport.pas';
end.

View File

@ -45,9 +45,16 @@
<DCCReference Include="View\uIEditorInformeBase.pas" />
<DCCReference Include="View\uIEditorInformeFacturasClientePendientesReport.pas" />
<DCCReference Include="View\uIEditorInformeFacturasClienteReport.pas" />
<DCCReference Include="View\uIEditorInformeFacturasProveedorPendientesReport.pas" />
<DCCReference Include="View\uIEditorInformeFacturasProveedorReport.pas" />
<DCCReference Include="View\uIEditorInformeIVAClientesReport.pas" />
<DCCReference Include="View\uIEditorInformeIVAProveedoresReport.pas" />
<DCCReference Include="View\uIEditorInformePedidosReport.pas" />
<DCCReference Include="View\uIEditorInformePresupuestosReport.pas" />
<DCCReference Include="View\uIEditorInformeRecibosClienteReport.pas" />
<DCCReference Include="View\uIEditorInformeRecibosCliPendientesReport.pas" />
<DCCReference Include="View\uIEditorInformeRecibosProveedorReport.pas" />
<DCCReference Include="View\uIEditorInformeRecibosProvPendientesReport.pas" />
</ItemGroup>
</Project>
<!-- EurekaLog First Line

View File

@ -0,0 +1,26 @@
unit uIEditorInformeFacturasProveedorPendientesReport;
interface
uses
FactuGES_Intf, uIEditorInformeBase;
type
IEditorInformeFacturasProveedorPendientesReport = interface(IEditorInformeBase)
['{C0EFEC01-BF2C-4B56-9876-2818892FABFA}']
function GetFechaFin: TDateTime;
function GetFechaInicio: TDateTime;
function GetListaIDProveedores: TIntegerArray;
function GetDesglosadoProveedor: Boolean;
function GetImporteMinimo: Currency;
property FechaInicio: TDateTime read GetFechaInicio;
property FechaFin: TDateTime read GetFechaFin;
property ListaIDProveedores: TIntegerArray read GetListaIDProveedores;
property DesglosadoProveedor: Boolean read GetDesglosadoProveedor;
property ImporteMinimo: Currency read getImporteMinimo;
end;
implementation
end.

View File

@ -0,0 +1,26 @@
unit uIEditorInformeFacturasProveedorReport;
interface
uses
FactuGES_Intf, uIEditorInformeBase;
type
IEditorInformeFacturasProveedorReport = interface(IEditorInformeBase)
['{0E60C309-336C-455D-825B-7E4892A6CBC5}']
function GetFechaFin: TDateTime;
function GetFechaInicio: TDateTime;
function GetListaIDProveedores: TIntegerArray;
function GetDesglosadoProveedor: Boolean;
function GetImporteMinimo: Currency;
property FechaInicio: TDateTime read GetFechaInicio;
property FechaFin: TDateTime read GetFechaFin;
property ListaIDProveedores: TIntegerArray read GetListaIDProveedores;
property DesglosadoProveedor: Boolean read GetDesglosadoProveedor;
property ImporteMinimo: Currency read getImporteMinimo;
end;
implementation
end.

View File

@ -0,0 +1,26 @@
unit uIEditorInformeIVAProveedoresReport;
interface
uses
FactuGES_Intf, uIEditorInformeBase;
type
IEditorInformeIVAProveedoresReport = interface(IEditorInformeBase)
['{1EC723DF-B7F7-49F9-83FA-DF628FEF4B26}']
function GetFechaFin: TDateTime;
function GetFechaInicio: TDateTime;
function GetListaIDProveedores: TIntegerArray;
function GetDesglosadoProveedor: Boolean;
function GetImporteMinimo: Currency;
property FechaInicio: TDateTime read GetFechaInicio;
property FechaFin: TDateTime read GetFechaFin;
property ListaIDProveedores: TIntegerArray read GetListaIDProveedores;
property DesglosadoProveedor: Boolean read GetDesglosadoProveedor;
property ImporteMinimo: Currency read getImporteMinimo;
end;
implementation
end.

View File

@ -0,0 +1,26 @@
unit uIEditorInformePedidosReport;
interface
uses
FactuGES_Intf, uIEditorInformeBase;
type
IEditorInformePedidosReport = interface(IEditorInformeBase)
['{70B07429-BCB2-416F-8C42-6D7BFFA152D5}']
function GetFechaFin: TDateTime;
function GetFechaInicio: TDateTime;
function GetListaIDProveedores: TIntegerArray;
function GetDesglosadoProveedor: Boolean;
function GetImporteMinimo: Currency;
property FechaInicio: TDateTime read GetFechaInicio;
property FechaFin: TDateTime read GetFechaFin;
property ListaIDProveedores: TIntegerArray read GetListaIDProveedores;
property DesglosadoProveedor: Boolean read GetDesglosadoProveedor;
property ImporteMinimo: Currency read getImporteMinimo;
end;
implementation
end.

View File

@ -0,0 +1,26 @@
unit uIEditorInformePresupuestosReport;
interface
uses
FactuGES_Intf, uIEditorInformeBase;
type
IEditorInformePresupuestosReport = interface(IEditorInformeBase)
['{99BBD05C-8AEF-4BA7-83C6-FC467F14488C}']
function GetFechaFin: TDateTime;
function GetFechaInicio: TDateTime;
function GetListaIDClientes: TIntegerArray;
function GetDesglosadoCliente: Boolean;
function GetImporteMinimo: Currency;
property FechaInicio: TDateTime read GetFechaInicio;
property FechaFin: TDateTime read GetFechaFin;
property ListaIDClientes: TIntegerArray read GetListaIDClientes;
property DesglosadoCliente: Boolean read GetDesglosadoCliente;
property ImporteMinimo: Currency read getImporteMinimo;
end;
implementation
end.

View File

@ -0,0 +1,26 @@
unit uIEditorInformeRecibosProvPendientesReport;
interface
uses
FactuGES_Intf, uIEditorInformeBase;
type
IEditorInformeRecibosProvPendientesReport = interface(IEditorInformeBase)
['{DC6AA05C-24F5-4F2A-BCB7-625629BF4297}']
function GetFechaFin: TDateTime;
function GetFechaInicio: TDateTime;
function GetListaIDProveedores: TIntegerArray;
function GetDesglosadoProveedor: Boolean;
function GetImporteMinimo: Currency;
property FechaInicio: TDateTime read GetFechaInicio;
property FechaFin: TDateTime read GetFechaFin;
property ListaIDProveedores: TIntegerArray read GetListaIDProveedores;
property DesglosadoProveedor: Boolean read GetDesglosadoProveedor;
property ImporteMinimo: Currency read getImporteMinimo;
end;
implementation
end.

View File

@ -0,0 +1,26 @@
unit uIEditorInformeRecibosProveedorReport;
interface
uses
FactuGES_Intf, uIEditorInformeBase;
type
IEditorInformeRecibosProveedorReport = interface(IEditorInformeBase)
['{63D1B0D1-9BDD-48B6-BD3B-C05AC6B49C9C}']
function GetFechaFin: TDateTime;
function GetFechaInicio: TDateTime;
function GetListaIDProveedores: TIntegerArray;
function GetDesglosadoProveedor: Boolean;
function GetImporteMinimo: Currency;
property FechaInicio: TDateTime read GetFechaInicio;
property FechaFin: TDateTime read GetFechaFin;
property ListaIDProveedores: TIntegerArray read GetListaIDProveedores;
property DesglosadoProveedor: Boolean read GetDesglosadoProveedor;
property ImporteMinimo: Currency read getImporteMinimo;
end;
implementation
end.

View File

@ -15,14 +15,29 @@ type
// procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false);
// procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false);
//MODULO PRESUPUESTOS DE CLIENTE
procedure VerInformeListadoPresupuestos;
//MODULO FACTURAS DE CLIENTE
procedure VerInformeIVAClientes;
procedure VerInformeListadoFacturas;
procedure VerInformeListadoFacturasPendientes;
procedure VerInformeListadoFacturasCli;
procedure VerInformeListadoFacturasCliPendientes;
//MODULO RECIBOS DE CLIENTE
procedure VerInformeListadoRecibosCliPendientes;
procedure VerInformeListadoRecibosCliente;
//MODULO PEDIDOS DE PROVEEDOR
procedure VerInformeListadoPedidos;
//MODULO FACTURAS DE PROVEEDOR
procedure VerInformeIVAProveedores;
procedure VerInformeListadoFacturasProv;
procedure VerInformeListadoFacturasProvPendientes;
//MODULO RECIBOS DE PROVEEDOR
procedure VerInformeListadoRecibosProvPendientes;
procedure VerInformeListadoRecibosProveedor;
end;
TGestorInformesController = class(TControllerBase, IGestorInformesController)
@ -49,14 +64,30 @@ type
}
property DataModule: IDataModuleGestorInformes read GetDataModule;
//MODULO PRESUPUESTOS DE CLIENTE
procedure VerInformeListadoPresupuestos;
//MODULO FACTURAS DE CLIENTE
procedure VerInformeIVAClientes;
procedure VerInformeListadoFacturas;
procedure VerInformeListadoFacturasPendientes;
procedure VerInformeListadoFacturasCli;
procedure VerInformeListadoFacturasCliPendientes;
//MODULO RECIBOS DE CLIENTE
procedure VerInformeListadoRecibosCliPendientes;
procedure VerInformeListadoRecibosCliente;
//MODULO PEDIDOS DE PROVEEDOR
procedure VerInformeListadoPedidos;
//MODULO FACTURAS DE PROVEEDOR
procedure VerInformeIVAProveedores;
procedure VerInformeListadoFacturasProv;
procedure VerInformeListadoFacturasProvPendientes;
//MODULO RECIBOS DE PROVEEDOR
procedure VerInformeListadoRecibosProvPendientes;
procedure VerInformeListadoRecibosProveedor;
end;
implementation
@ -66,10 +97,14 @@ uses
uDAInterfaces, uDataTableUtils, uDateUtils, uNumUtils,
DateUtils, Forms, uIntegerListUtils, uDataModuleGestorInformes,
uSistemaFunc, uDialogElegirEMail, uEMailUtils, Dialogs,
uIEditorInformePresupuestosReport,
uIEditorInformeIVAClientesReport, uIEditorInformeFacturasClienteReport,
uIEditorInformeFacturasClientePendientesReport, uIEditorInformeRecibosClienteReport,
uIEditorInformeRecibosCliPendientesReport
;
uIEditorInformeRecibosCliPendientesReport,
uIEditorInformeIVAProveedoresReport, uIEditorInformeFacturasProveedorReport,
uIEditorInformeFacturasProveedorPendientesReport, uIEditorInformeRecibosProveedorReport,
uIEditorInformeRecibosProvPendientesReport,
uIEditorInformePedidosReport;
{procedure CopiarArticulosPedido(AOrigen: IBizDetallesPedidoCliente;
@ -255,7 +290,7 @@ begin
begin
AEditor.Controller := Self;
AEditor.Title := 'Listado de IVA de facturas de cliente';
AStream := FDataModule.GetInformeIVAClientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
AStream := FDataModule.GenerarInformeIVAClientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
LoadFromStream(AStream);
Preview;
Release;
@ -269,7 +304,36 @@ begin
end;
end;
procedure TGestorInformesController.VerInformeListadoFacturas;
procedure TGestorInformesController.VerInformeIVAProveedores;
var
AStream: Binary;
AEditor : IEditorInformeIVAProveedoresReport;
begin
AEditor := NIL;
ShowHourglassCursor;
try
try
CreateEditor('EditorInformeIVAProveedoresReport', IEditorInformeIVAProveedoresReport, AEditor);
if Assigned(AEditor) then
with AEditor do
begin
AEditor.Controller := Self;
AEditor.Title := 'Listado de IVA de facturas de proveedor';
AStream := FDataModule.GenerarInformeIVAProveedores(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDProveedores, DesglosadoProveedor, ImporteMinimo);
LoadFromStream(AStream);
Preview;
Release;
end;
finally
FreeAndNil(AStream);
AEditor := Nil;
end;
finally
HideHourglassCursor;
end;
end;
procedure TGestorInformesController.VerInformeListadoFacturasCli;
var
AStream: Binary;
AEditor : IEditorInformeFacturasClienteReport;
@ -284,7 +348,7 @@ begin
begin
AEditor.Controller := Self;
AEditor.Title := 'Listado de facturas de cliente';
AStream := FDataModule.GetInformeListadoFacturas(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
AStream := FDataModule.GenerarInformeListadoFacturasCli(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
LoadFromStream(AStream);
Preview;
Release;
@ -298,7 +362,7 @@ begin
end;
end;
procedure TGestorInformesController.VerInformeListadoFacturasPendientes;
procedure TGestorInformesController.VerInformeListadoFacturasCliPendientes;
var
AStream: Binary;
AEditor : IEditorInformeFacturasClientePendientesReport;
@ -313,7 +377,123 @@ begin
begin
AEditor.Controller := Self;
AEditor.Title := 'Listado de facturas de cliente pendientes';
AStream := FDataModule.GetInformeListadoFacturasPendientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
AStream := FDataModule.GenerarInformeListadoFacturasCliPendientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
LoadFromStream(AStream);
Preview;
Release;
end;
finally
FreeAndNil(AStream);
AEditor := Nil;
end;
finally
HideHourglassCursor;
end;
end;
procedure TGestorInformesController.VerInformeListadoFacturasProv;
var
AStream: Binary;
AEditor : IEditorInformeFacturasProveedorReport;
begin
AEditor := NIL;
ShowHourglassCursor;
try
try
CreateEditor('EditorInformeFacturasProveedorReport', IEditorInformeFacturasProveedorReport, AEditor);
if Assigned(AEditor) then
with AEditor do
begin
AEditor.Controller := Self;
AEditor.Title := 'Listado de facturas de proveedor';
AStream := FDataModule.GenerarInformeListadoFacturasProv(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDProveedores, DesglosadoProveedor, ImporteMinimo);
LoadFromStream(AStream);
Preview;
Release;
end;
finally
FreeAndNil(AStream);
AEditor := Nil;
end;
finally
HideHourglassCursor;
end;
end;
procedure TGestorInformesController.VerInformeListadoFacturasProvPendientes;
var
AStream: Binary;
AEditor : IEditorInformeFacturasProveedorPendientesReport;
begin
AEditor := NIL;
ShowHourglassCursor;
try
try
CreateEditor('EditorInformeFacturasProveedorPendientesReport', IEditorInformeFacturasProveedorPendientesReport, AEditor);
if Assigned(AEditor) then
with AEditor do
begin
AEditor.Controller := Self;
AEditor.Title := 'Listado de facturas de proveedor pendientes';
AStream := FDataModule.GenerarInformeListadoFacturasProvPendientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDProveedores, DesglosadoProveedor, ImporteMinimo);
LoadFromStream(AStream);
Preview;
Release;
end;
finally
FreeAndNil(AStream);
AEditor := Nil;
end;
finally
HideHourglassCursor;
end;
end;
procedure TGestorInformesController.VerInformeListadoPedidos;
var
AStream: Binary;
AEditor : IEditorInformePedidosReport;
begin
AEditor := NIL;
ShowHourglassCursor;
try
try
CreateEditor('EditorInformePedidosReport', IEditorInformePedidosReport, AEditor);
if Assigned(AEditor) then
with AEditor do
begin
AEditor.Controller := Self;
AEditor.Title := 'Listado de pedidos de proveedor';
AStream := FDataModule.GenerarInformeListadoPedidos(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDProveedores, DesglosadoProveedor, ImporteMinimo);
LoadFromStream(AStream);
Preview;
Release;
end;
finally
FreeAndNil(AStream);
AEditor := Nil;
end;
finally
HideHourglassCursor;
end;
end;
procedure TGestorInformesController.VerInformeListadoPresupuestos;
var
AStream: Binary;
AEditor : IEditorInformePresupuestosReport;
begin
AEditor := NIL;
ShowHourglassCursor;
try
try
CreateEditor('EditorInformePresupuestosReport', IEditorInformePresupuestosReport, AEditor);
if Assigned(AEditor) then
with AEditor do
begin
AEditor.Controller := Self;
AEditor.Title := 'Listado de presupuestos de cliente';
AStream := FDataModule.GenerarInformeListadoPresupuestos(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
LoadFromStream(AStream);
Preview;
Release;
@ -341,7 +521,7 @@ begin
with AEditor do
begin
AEditor.Controller := Self;
AStream := FDataModule.GetInformeListadoRecibosCliente(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
AStream := FDataModule.GenerarInformeListadoRecibosCliente(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
LoadFromStream(AStream);
Preview;
Release;
@ -369,7 +549,7 @@ begin
with AEditor do
begin
AEditor.Controller := Self;
AStream := FDataModule.GetInformeListadoRecibosCliPendientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
AStream := FDataModule.GenerarInformeListadoRecibosCliPendientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo);
LoadFromStream(AStream);
Preview;
Release;
@ -384,6 +564,62 @@ begin
end;
procedure TGestorInformesController.VerInformeListadoRecibosProveedor;
var
AStream: Binary;
AEditor : IEditorInformeRecibosProveedorReport;
begin
AEditor := NIL;
ShowHourglassCursor;
try
try
CreateEditor('EditorInformeRecibosProveedorReport', IEditorInformeRecibosProveedorReport, AEditor);
if Assigned(AEditor) then
with AEditor do
begin
AEditor.Controller := Self;
AStream := FDataModule.GenerarInformeListadoRecibosProveedor(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDProveedores, DesglosadoProveedor, ImporteMinimo);
LoadFromStream(AStream);
Preview;
Release;
end;
finally
FreeAndNil(AStream);
AEditor := Nil;
end;
finally
HideHourglassCursor;
end;
end;
procedure TGestorInformesController.VerInformeListadoRecibosProvPendientes;
var
AStream: Binary;
AEditor : IEditorInformeRecibosProvPendientesReport;
begin
AEditor := NIL;
ShowHourglassCursor;
try
try
CreateEditor('EditorInformeRecibosProvPendientesReport', IEditorInformeRecibosProvPendientesReport, AEditor);
if Assigned(AEditor) then
with AEditor do
begin
AEditor.Controller := Self;
AStream := FDataModule.GenerarInformeListadoRecibosProvPendientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDProveedores, DesglosadoProveedor, ImporteMinimo);
LoadFromStream(AStream);
Preview;
Release;
end;
finally
FreeAndNil(AStream);
AEditor := Nil;
end;
finally
HideHourglassCursor;
end;
end;
{
procedure TGestorInformesController.Ver(AFactura: IBizFacturaCliente);
var

View File

@ -22,15 +22,29 @@ type
public
// function GetItems : IBizFacturaCliente;
//MODULO PRESUPUESTOS DE CLIENTE
function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO FACTURAS DE CLIENTE
function GetInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO RECIBOS DE CLIENTE
function GetInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO PEDIDOS DE PROVEEDOR
function GenerarInformeListadoPedidos(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO FACTURAS DE PROVEEDOR
function GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO RECIBOS DE CLIENTE
function GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
procedure getInforme;
end;
@ -51,54 +65,131 @@ begin
RORemoteService.Message := dmConexion.Message;
end;
function TDataModuleGestorInformes.GetInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function TDataModuleGestorInformes.GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
Result := (RORemoteService as IsrvGestorInformes).GetInformeIVAClientes(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo);
Result := (RORemoteService as IsrvGestorInformes).GenerarInformeIVAClientes(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo);
finally
end;
end;
function TDataModuleGestorInformes.GetInformeListadoFacturas(
function TDataModuleGestorInformes.GenerarInformeIVAProveedores(
const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime;
const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
begin
try
Result := (RORemoteService as IsrvGestorInformes).GenerarInformeIVAProveedores(IdEmpresa, FechaInicio, FechaFin, ListaIdProveedores, Desglosado, ImporteMinimo);
finally
end;
end;
function TDataModuleGestorInformes.GenerarInformeListadoFacturasCli(
const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime;
const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
begin
try
Result := (RORemoteService as IsrvGestorInformes).GetInformeListadoFacturas(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo);
Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoFacturasCli(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo);
finally
end;
end;
function TDataModuleGestorInformes.GetInformeListadoFacturasPendientes(
function TDataModuleGestorInformes.GenerarInformeListadoFacturasCliPendientes(
const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime;
const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
begin
try
Result := (RORemoteService as IsrvGestorInformes).GetInformeListadoFacturasPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo);
Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoFacturasCliPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo);
finally
end;
end;
function TDataModuleGestorInformes.GetInformeListadoRecibosCliente(
function TDataModuleGestorInformes.GenerarInformeListadoFacturasProv(
const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime;
const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
begin
try
Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoFacturasProv(IdEmpresa, FechaInicio, FechaFin, ListaIdProveedores, Desglosado, ImporteMinimo);
finally
end;
end;
function TDataModuleGestorInformes.GenerarInformeListadoFacturasProvPendientes(
const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime;
const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
begin
try
Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoFacturasProvPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIdProveedores, Desglosado, ImporteMinimo);
finally
end;
end;
function TDataModuleGestorInformes.GenerarInformeListadoPedidos(
const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime;
const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
begin
try
Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoPedidos(IdEmpresa, FechaInicio, FechaFin, ListaIdProveedores, Desglosado, ImporteMinimo);
finally
end;
end;
function TDataModuleGestorInformes.GenerarInformeListadoPresupuestos(
const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime;
const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
begin
try
Result := (RORemoteService as IsrvGestorInformes).GetInformeListadoRecibosCliente(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo);
Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoPresupuestos(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo);
finally
end;
end;
function TDataModuleGestorInformes.GetInformeListadoRecibosCliPendientes(
function TDataModuleGestorInformes.GenerarInformeListadoRecibosCliente(
const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime;
const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
begin
try
Result := (RORemoteService as IsrvGestorInformes).GetInformeListadoRecibosCliPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo);
Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoRecibosCliente(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo);
finally
end;
end;
function TDataModuleGestorInformes.GenerarInformeListadoRecibosCliPendientes(
const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime;
const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
begin
try
Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoRecibosCliPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo);
finally
end;
end;
function TDataModuleGestorInformes.GenerarInformeListadoRecibosProveedor(
const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime;
const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
begin
try
Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoRecibosProveedor(IdEmpresa, FechaInicio, FechaFin, ListaIdProveedores, Desglosado, ImporteMinimo);
finally
end;
end;
function TDataModuleGestorInformes.GenerarInformeListadoRecibosProvPendientes(
const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime;
const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
begin
try
Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoRecibosProvPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIdProveedores, Desglosado, ImporteMinimo);
finally
end;
end;

View File

@ -10,14 +10,31 @@ type
['{65FB8E9E-5218-43DC-80AD-BDB4383B7064}']
// function GetItems: IBizFacturaCliente;
procedure getInforme;
//MODULO FACTURAS CLIENTE
function GetInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO RECIBOS CLIENTE
function GetInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO PRESUPUESTOS DE CLIENTE
function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO FACTURAS DE CLIENTE
function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO RECIBOS DE CLIENTE
function GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO PEDIDOS DE PROVEEDOR
function GenerarInformeListadoPedidos(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO FACTURAS DE PROVEEDOR
function GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO RECIBOS DE CLIENTE
function GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
end;
implementation

View File

@ -60,7 +60,7 @@ exports
procedure TPluginGestorInformes.actInformeFacturasClienteExecute(
Sender: TObject);
begin
FController.VerInformeListadoFacturas;
FController.VerInformeListadoFacturasCli;
end;
procedure TPluginGestorInformes.actInformeFacturasClienteIVAExecute(
@ -72,7 +72,7 @@ end;
procedure TPluginGestorInformes.actInformeFacturasClientePendientesExecute(
Sender: TObject);
begin
FController.VerInformeListadoFacturasPendientes;
FController.VerInformeListadoFacturasCliPendientes;
end;
procedure TPluginGestorInformes.actInformeRecibosClienteExecute(

View File

@ -45,14 +45,29 @@ type
procedure FillWinDirDataset(const aDataset: IDAEditableDataset);
public
//MODULO PRESUPUESTOS CLIENTE
function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO FACTURAS CLIENTE
function GetInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO RECIBOS CLIENTE
function GetInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO PEDIDOS PROVEEDOR
function GenerarInformeListadoPedidos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO FACTURAS PROVEEDOR
function GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
//MODULO RECIBOS PROVEEDOR
function GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
end;
implementation
@ -60,7 +75,8 @@ implementation
{$R *.dfm}
uses
{Generated:} FactuGES_Invk, uDataModuleServer, uDatabaseUtils, Dialogs,
uRptFacturasCliente_Server, uRptRecibosCliente_Server;
uRptPresupuestosCliente_Server, uRptFacturasCliente_Server, uRptRecibosCliente_Server,
uRptPedidosProveedor_Server, uRptFacturasProveedor_Server, uRptRecibosProveedor_Server;
procedure Create_srvGestorInformes(out anInstance: IUnknown);
begin
@ -150,7 +166,7 @@ begin
}
end;
function TsrvGestorInformes.GetInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function TsrvGestorInformes.GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
var
AReportGenerator : TRptFacturasCliente;
begin
@ -162,7 +178,21 @@ begin
end;
end;
function TsrvGestorInformes.GetInformeListadoFacturas(const IdEmpresa: Integer;
function TsrvGestorInformes.GenerarInformeIVAProveedores(const IdEmpresa: Integer;
const FechaInicio, FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
var
AReportGenerator : TRptFacturasProveedor;
begin
AReportGenerator := TRptFacturasProveedor.Create(nil);
try
Result := AReportGenerator.GenerarInformeIVA(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo);
finally
FreeAndNIL(AReportGenerator);
end;
end;
function TsrvGestorInformes.GenerarInformeListadoFacturasCli(const IdEmpresa: Integer;
const FechaInicio, FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
var
@ -170,13 +200,13 @@ var
begin
AReportGenerator := TRptFacturasCliente.Create(nil);
try
Result := AReportGenerator.GetInformeListadoFacturas(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
Result := AReportGenerator.GenerarInformeListadoFacturas(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
finally
FreeAndNIL(AReportGenerator);
end;
end;
function TsrvGestorInformes.GetInformeListadoFacturasPendientes(
function TsrvGestorInformes.GenerarInformeListadoFacturasCliPendientes(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
@ -185,13 +215,72 @@ var
begin
AReportGenerator := TRptFacturasCliente.Create(nil);
try
Result := AReportGenerator.GetInformeListadoFacturasPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
Result := AReportGenerator.GenerarInformeListadoFacturasPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
finally
FreeAndNIL(AReportGenerator);
end;
end;
function TsrvGestorInformes.GetInformeListadoRecibosCliente(
function TsrvGestorInformes.GenerarInformeListadoFacturasProv(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
var
AReportGenerator : TRptFacturasProveedor;
begin
AReportGenerator := TRptFacturasProveedor.Create(nil);
try
Result := AReportGenerator.GenerarInformeListadoFacturas(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo);
finally
FreeAndNIL(AReportGenerator);
end;
end;
function TsrvGestorInformes.GenerarInformeListadoFacturasProvPendientes(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
var
AReportGenerator : TRptFacturasProveedor;
begin
AReportGenerator := TRptFacturasProveedor.Create(nil);
try
Result := AReportGenerator.GenerarInformeListadoFacturasPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo);
finally
FreeAndNIL(AReportGenerator);
end;
end;
function TsrvGestorInformes.GenerarInformeListadoPedidos(const IdEmpresa: Integer;
const FechaInicio, FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
var
AReportGenerator : TRptPedidosProveedor;
begin
AReportGenerator := TRptPedidosProveedor.Create(nil);
try
Result := AReportGenerator.GenerarInformeListadoPedidos(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo);
finally
FreeAndNIL(AReportGenerator);
end;
end;
function TsrvGestorInformes.GenerarInformeListadoPresupuestos(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
var
AReportGenerator : TRptPresupuestosCliente;
begin
AReportGenerator := TRptPresupuestosCliente.Create(nil);
try
Result := AReportGenerator.GenerarInformeListadoPresupuestos(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
finally
FreeAndNIL(AReportGenerator);
end;
end;
function TsrvGestorInformes.GenerarInformeListadoRecibosCliente(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
@ -200,13 +289,13 @@ var
begin
AReportGenerator := TRptRecibosCliente.Create(nil);
try
Result := AReportGenerator.GetInformeListadoRecibosCliente(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
Result := AReportGenerator.GenerarInformeListadoRecibos(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
finally
FreeAndNIL(AReportGenerator);
end;
end;
function TsrvGestorInformes.GetInformeListadoRecibosCliPendientes(
function TsrvGestorInformes.GenerarInformeListadoRecibosCliPendientes(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
@ -215,7 +304,37 @@ var
begin
AReportGenerator := TRptRecibosCliente.Create(nil);
try
Result := AReportGenerator.GetInformeListadoRecibosCliPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
Result := AReportGenerator.GenerarInformeListadoRecibosPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
finally
FreeAndNIL(AReportGenerator);
end;
end;
function TsrvGestorInformes.GenerarInformeListadoRecibosProveedor(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
var
AReportGenerator : TRptRecibosProveedor;
begin
AReportGenerator := TRptRecibosProveedor.Create(nil);
try
Result := AReportGenerator.GenerarInformeListadoRecibos(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo);
finally
FreeAndNIL(AReportGenerator);
end;
end;
function TsrvGestorInformes.GenerarInformeListadoRecibosProvPendientes(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
var
AReportGenerator : TRptRecibosProveedor;
begin
AReportGenerator := TRptRecibosProveedor.Create(nil);
try
Result := AReportGenerator.GenerarInformeListadoRecibosPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo);
finally
FreeAndNIL(AReportGenerator);
end;

View File

@ -38,38 +38,44 @@
<DelphiCompile Include="GestorInformes_view.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="ApplicationBase.dcp" />
<DCCReference Include="Base.dcp" />
<DCCReference Include="ccpackD11.dcp" />
<DCCReference Include="cfpack_d11.dcp" />
<DCCReference Include="Contactos_controller.dcp" />
<DCCReference Include="Contactos_model.dcp" />
<DCCReference Include="Contactos_view.dcp" />
<DCCReference Include="cxLibraryD11.dcp" />
<DCCReference Include="dbrtl.dcp" />
<DCCReference Include="designide.dcp" />
<DCCReference Include="dxComnD11.dcp" />
<DCCReference Include="dxGDIPlusD11.dcp" />
<DCCReference Include="dxLayoutControlD11.dcp" />
<DCCReference Include="dxThemeD11.dcp" />
<DCCReference Include="frx11.dcp" />
<DCCReference Include="frxe11.dcp" />
<DCCReference Include="fs11.dcp" />
<DCCReference Include="GestorInformes_controller.dcp" />
<DCCReference Include="GUIBase.dcp" />
<DCCReference Include="GUISDK_D11.dcp" />
<DCCReference Include="Jcl.dcp" />
<DCCReference Include="JclVcl.dcp" />
<DCCReference Include="JvCoreD11R.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="C:\Documents and Settings\Usuario\ApplicationBase.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Base.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\ccpackD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cfpack_d11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Contactos_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Contactos_model.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Contactos_view.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxLibraryD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dbrtl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\designide.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dxComnD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dxGDIPlusD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dxLayoutControlD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dxThemeD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\frx11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\frxe11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\fs11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\GestorInformes_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\GUIBase.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\GUISDK_D11.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\JvCoreD11R.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\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\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\vclx.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\xmlrtl.dcp" />
<DCCReference Include="uEditorInformeBase.pas">
<Form>fEditorInformeBase</Form>
<DesignClass>TForm</DesignClass>
@ -111,12 +117,6 @@
<Form>frViewPeriodoFechas</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="vcl.dcp" />
<DCCReference Include="vclactnband.dcp" />
<DCCReference Include="vcldb.dcp" />
<DCCReference Include="vcljpg.dcp" />
<DCCReference Include="vclx.dcp" />
<DCCReference Include="xmlrtl.dcp" />
</ItemGroup>
</Project>
<!-- EurekaLog First Line

View File

@ -82,7 +82,7 @@ inherited fEditorInformeFacturasClientePendientesReport: TfEditorInformeFacturas
Width = 182
ExplicitWidth = 182
inherited Label3: TLabel
Width = 172
Width = 85
end
inherited edtFechaFin: TcxDateEdit
Style.LookAndFeel.SkinName = ''
@ -107,7 +107,7 @@ inherited fEditorInformeFacturasClientePendientesReport: TfEditorInformeFacturas
end
end
inherited TBXDockablePanel1: TTBXDockablePanel
Top = 456
Top = 368
TabOrder = 2
ExplicitTop = 456
ExplicitWidth = 188

View File

@ -113,7 +113,7 @@ var
begin
ShowHourglassCursor;
try
AStream := (Controller as IGestorInformesController).DataModule.GetInformeListadoFacturasPendientes(
AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoFacturasCliPendientes(
AppFactuGES.EmpresaActiva.ID,
FechaInicio,
FechaFin,

View File

@ -82,7 +82,7 @@ inherited fEditorInformeFacturasClienteReport: TfEditorInformeFacturasClienteRep
Width = 182
ExplicitWidth = 182
inherited Label3: TLabel
Width = 172
Width = 85
end
inherited edtFechaFin: TcxDateEdit
Style.LookAndFeel.SkinName = ''
@ -107,7 +107,7 @@ inherited fEditorInformeFacturasClienteReport: TfEditorInformeFacturasClienteRep
end
end
inherited TBXDockablePanel1: TTBXDockablePanel
Top = 446
Top = 368
TabOrder = 2
ExplicitTop = 440
ExplicitWidth = 188

View File

@ -112,7 +112,7 @@ var
begin
ShowHourglassCursor;
try
AStream := (Controller as IGestorInformesController).DataModule.GetInformeListadoFacturas(
AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoFacturasCli(
AppFactuGES.EmpresaActiva.ID,
FechaInicio,
FechaFin,

View File

@ -82,7 +82,7 @@ inherited fEditorInformeIVAClientesReport: TfEditorInformeIVAClientesReport
Width = 182
ExplicitWidth = 182
inherited Label3: TLabel
Width = 172
Width = 85
end
inherited edtFechaFin: TcxDateEdit
Style.LookAndFeel.SkinName = ''
@ -107,7 +107,7 @@ inherited fEditorInformeIVAClientesReport: TfEditorInformeIVAClientesReport
end
end
inherited TBXDockablePanel1: TTBXDockablePanel
Top = 446
Top = 368
TabOrder = 2
ExplicitTop = 424
ExplicitWidth = 188

View File

@ -112,7 +112,7 @@ var
begin
ShowHourglassCursor;
try
AStream := (Controller as IGestorInformesController).DataModule.GetInformeIVAClientes(
AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeIVAClientes(
AppFactuGES.EmpresaActiva.ID,
FechaInicio,
FechaFin,

View File

@ -0,0 +1,201 @@
inherited fEditorInformePresupuestosReport: TfEditorInformePresupuestosReport
Caption = 'fEditorInformePresupuestosReport'
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
inline frViewPeriodoFechas1: TfrViewPeriodoFechas [0]
Left = 0
Top = 0
Width = 188
Height = 136
Align = alTop
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitWidth = 188
ExplicitHeight = 136
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 182
ExplicitWidth = 182
inherited cbPeriodo: TcxComboBox
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 153
Width = 153
end
end
inherited TBXAlignmentPanel2: TTBXAlignmentPanel
Width = 182
ExplicitWidth = 182
inherited Label3: TLabel
Width = 85
end
inherited edtFechaFin: TcxDateEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 99
Width = 99
end
inherited edtFechaIni: TcxDateEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 97
Width = 97
end
end
inherited TBXLabel2: TTBXLabel
Width = 188
ExplicitWidth = 188
end
end
inherited TBXDockablePanel1: TTBXDockablePanel
Top = 368
TabOrder = 2
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 frViewFiltroImportes1: TfrViewFiltroImportes
Left = 0
Top = 136
Width = 188
Height = 77
Align = alTop
AutoSize = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 1
ReadOnly = False
ExplicitTop = 136
ExplicitWidth = 188
ExplicitHeight = 77
inherited TBXLabel2: TTBXLabel
Width = 188
ExplicitWidth = 188
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 182
ExplicitWidth = 182
inherited eImporte: TcxSpinEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
end
end
inline frViewFiltroClientes1: TfrViewFiltroClientes
Left = 0
Top = 213
Width = 188
Height = 146
Align = alTop
AutoSize = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 3
ReadOnly = False
ExplicitTop = 213
ExplicitWidth = 188
ExplicitHeight = 146
inherited TBXLabel2: TTBXLabel
Width = 188
ExplicitWidth = 188
end
inherited bElegirCliente: TBitBtn
Width = 108
ExplicitWidth = 108
end
inherited edtCliente: TcxTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 141
Width = 141
end
end
end
end
end

View File

@ -0,0 +1,131 @@
unit uEditorInformePresupuestosReport;
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, uViewDatosYSeleccionClienteBase,
uViewFiltroClientes, dxLayoutControl, cxControls, uViewFiltroImportes,
FactuGES_Intf, TBXDkPanels, uEditorInformeBase,
uIEditorInformeBase, uViewParametrosInforme, uIEditorInformePresupuestosReport;
type
TfEditorInformePresupuestosReport = class(TfEditorInformeBase, IEditorInformePresupuestosReport)
TBXItem58: TTBXItem;
frViewPeriodoFechas1: TfrViewPeriodoFechas;
frViewFiltroImportes1: TfrViewFiltroImportes;
frViewFiltroClientes1: TfrViewFiltroClientes;
procedure actRefrescarExecute(Sender: TObject);
private
FListaIDClientes: TIntegerArray;
function GetFechaFin: TDateTime;
function GetFechaInicio: TDateTime;
function GetListaIDClientes: TIntegerArray;
function GetImporteMinimo: Currency;
function GetDesglosadoCliente: Boolean;
procedure RefrescarInforme;
public
property FechaInicio: TDateTime read GetFechaInicio;
property FechaFin: TDateTime read GetFechaFin;
property ListaIDClientes: TIntegerArray read GetListaIDClientes;
property DesglosadoCliente: Boolean read GetDesglosadoCliente;
property ImporteMinimo: Currency read GetImporteMinimo;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
implementation
{$R *.dfm}
uses uROTypes, uGestorInformesController, uFactuGES_App;
{ TfEditorGestorInformesReport }
procedure TfEditorInformePresupuestosReport.actRefrescarExecute(Sender: TObject);
begin
inherited;
RefrescarInforme;
end;
constructor TfEditorInformePresupuestosReport.Create(AOwner: TComponent);
begin
inherited;
FListaIDClientes := TIntegerArray.Create;
end;
destructor TfEditorInformePresupuestosReport.Destroy;
begin
FListaIDClientes.Free;
inherited;
end;
function TfEditorInformePresupuestosReport.GetDesglosadoCliente: Boolean;
begin
if frViewFiltroImportes1.cbxDesglosado.Enabled then
Result := frViewFiltroClientes1.cbxDesglosado.Checked
else
Result := False;
end;
function TfEditorInformePresupuestosReport.GetFechaFin: TDateTime;
begin
Result := frViewPeriodoFechas1.edtFechaFin.Date;
end;
function TfEditorInformePresupuestosReport.GetFechaInicio: TDateTime;
begin
Result := frViewPeriodoFechas1.edtFechaIni.Date;
end;
function TfEditorInformePresupuestosReport.GetImporteMinimo: Currency;
begin
if frViewFiltroImportes1.eImporte.Enabled then
Result := frViewFiltroImportes1.eImporte.Value
else
Result := 0;
end;
function TfEditorInformePresupuestosReport.GetListaIDClientes: TIntegerArray;
begin
FListaIDClientes.Clear;
if Assigned(frViewFiltroClientes1.Cliente) then
FListaIDClientes.Add(frViewFiltroClientes1.Cliente.ID);
Result := FListaIDClientes;
end;
procedure TfEditorInformePresupuestosReport.RefrescarInforme;
var
AStream: Binary;
begin
ShowHourglassCursor;
try
AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoPresupuestos(
AppFactuGES.EmpresaActiva.ID,
FechaInicio,
FechaFin,
ListaIDClientes,
DesglosadoCliente,
ImporteMinimo);
LoadFromStream(AStream);
Report.ShowPreparedReport;
finally
FreeAndNil(AStream);
HideHourglassCursor;
end;
end;
end.

View File

@ -82,7 +82,7 @@ inherited fEditorInformeRecibosCliPendientesReport: TfEditorInformeRecibosCliPen
Width = 182
ExplicitWidth = 182
inherited Label3: TLabel
Width = 172
Width = 85
end
inherited edtFechaFin: TcxDateEdit
Style.LookAndFeel.SkinName = ''

View File

@ -112,7 +112,7 @@ var
begin
ShowHourglassCursor;
try
AStream := (Controller as IGestorInformesController).DataModule.GetInformeListadoRecibosCliPendientes(
AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoRecibosCliPendientes(
AppFactuGES.EmpresaActiva.ID,
FechaInicio,
FechaFin,

View File

@ -82,7 +82,7 @@ inherited fEditorInformeRecibosClienteReport: TfEditorInformeRecibosClienteRepor
Width = 182
ExplicitWidth = 182
inherited Label3: TLabel
Width = 172
Width = 85
end
inherited edtFechaFin: TcxDateEdit
Style.LookAndFeel.SkinName = ''

View File

@ -112,7 +112,7 @@ var
begin
ShowHourglassCursor;
try
AStream := (Controller as IGestorInformesController).DataModule.GetInformeListadoRecibosCliente(
AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoRecibosCliente(
AppFactuGES.EmpresaActiva.ID,
FechaInicio,
FechaFin,

View File

@ -10,11 +10,12 @@ implementation
uses
uEditorRegistryUtils,
uEditorInformeIVAClientesReport, uEditorInformeFacturasClienteReport, uEditorInformeFacturasClientePendientesReport,
uEditorInformeRecibosClienteReport, uEditorInformeRecibosCliPendientesReport
uEditorInformeRecibosClienteReport, uEditorInformeRecibosCliPendientesReport, uEditorInformePresupuestosReport
;
procedure RegisterViews;
begin
EditorRegistry.RegisterClass(TfEditorInformePresupuestosReport, 'EditorInformePresupuestosReport');
EditorRegistry.RegisterClass(TfEditorInformeIVAClientesReport, 'EditorInformeIVAClientesReport');
EditorRegistry.RegisterClass(TfEditorInformeFacturasClienteReport, 'EditorInformeFacturasClienteReport');
EditorRegistry.RegisterClass(TfEditorInformeFacturasClientePendientesReport, 'EditorInformeFacturasClientePendientesReport');
@ -24,6 +25,7 @@ end;
procedure UnregisterViews;
begin
EditorRegistry.UnRegisterClass(TfEditorInformePresupuestosReport);
EditorRegistry.UnRegisterClass(TfEditorInformeIVAClientesReport);
EditorRegistry.UnRegisterClass(TfEditorInformeFacturasClienteReport);
EditorRegistry.UnRegisterClass(TfEditorInformeFacturasClientePendientesReport);

View File

@ -1,16 +1,16 @@
inherited frViewFiltroClientes: TfrViewFiltroClientes
Width = 211
Width = 451
Align = alTop
OnCreate = CustomViewCreate
OnDestroy = CustomViewDestroy
ExplicitWidth = 451
DesignSize = (
211
451
195)
object TBXLabel2: TTBXLabel
Left = 0
Top = 0
Width = 211
Width = 451
Height = 29
Margins.Top = 5
Margins.Bottom = 10
@ -24,13 +24,12 @@ inherited frViewFiltroClientes: TfrViewFiltroClientes
ParentColor = True
ParentFont = False
Underline = True
ExplicitWidth = 451
end
object bElegirCliente: TBitBtn
AlignWithMargins = True
Left = 61
Top = 123
Width = 142
Width = 382
Height = 23
Margins.Left = 0
Margins.Top = 0
@ -76,7 +75,6 @@ inherited frViewFiltroClientes: TfrViewFiltroClientes
AA00C315D600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00C83EF000808BDF00668BCC007C60C700D116
E400FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
ExplicitWidth = 382
end
object cbxDesglosado: TCheckBox
Left = 23
@ -109,9 +107,8 @@ inherited frViewFiltroClientes: TfrViewFiltroClientes
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 3
ExplicitWidth = 415
Height = 21
Width = 175
Width = 415
end
object rbTodosClientes: TRadioButton
Left = 6

View File

@ -75,6 +75,7 @@ begin
cbxDesglosado.Enabled := True;
FCliente := NIL;
bElegirCliente.Enabled := False;
edtCliente.Clear;
edtCliente.Enabled := False;
end;
end;

View File

@ -2,7 +2,7 @@ object RptPedidosProveedor: TRptPedidosProveedor
OldCreateOrder = True
OnCreate = DataModuleCreate
Height = 522
Width = 540
Width = 766
object DABINAdapter: TDABINAdapter
Left = 48
Top = 80
@ -11,6 +11,139 @@ object RptPedidosProveedor: TRptPedidosProveedor
ConnectionManager = dmServer.ConnectionManager
DataDictionary = DataDictionary
Datasets = <
item
Params = <>
Statements = <
item
Connection = 'IBX'
ConnectionType = 'Interbase'
Default = True
TargetTable = 'V_PEDIDOS_PROVEEDOR'
Name = 'IBX'
SQL =
#10' '#10'select ID_EMPRESA,'#10'extract (month from fecha_pedido) as MES,' +
#10'case'#10'when extract (month from fecha_pedido) = 1 then '#39'ENERO - '#39 +
' || extract (year from fecha_pedido)'#10'when extract (month from fe' +
'cha_pedido) = 2 then '#39'FEBRERO - '#39' || extract (year from fecha_pe' +
'dido)'#10'when extract (month from fecha_pedido) = 3 then '#39'MARZO - '#39 +
' || extract (year from fecha_pedido)'#10'when extract (month from fe' +
'cha_pedido) = 4 then '#39'ABRIL - '#39' || extract (year from fecha_pedi' +
'do)'#10'when extract (month from fecha_pedido) = 5 then '#39'MAYO - '#39' ||' +
' extract (year from fecha_pedido)'#10'when extract (month from fecha' +
'_pedido) = 6 then '#39'JUNIO - '#39' || extract (year from fecha_pedido)' +
#10'when extract (month from fecha_pedido) = 7 then '#39'JULIO - '#39' || e' +
'xtract (year from fecha_pedido)'#10'when extract (month from fecha_p' +
'edido) = 8 then '#39'AGOSTO - '#39' || extract (year from fecha_pedido)'#10 +
'when extract (month from fecha_pedido) = 9 then '#39'SEPTIEMBRE - '#39' ' +
'|| extract (year from fecha_pedido)'#10'when extract (month from fec' +
'ha_pedido) = 10 then '#39'OCTUBRE - '#39' || extract (year from fecha_pe' +
'dido)'#10'when extract (month from fecha_pedido) = 11 then '#39'NOVIEMBR' +
'E - '#39' || extract (year from fecha_pedido)'#10'when extract (month fr' +
'om fecha_pedido) = 12 then '#39'DICIEMBRE - '#39' || extract (year from ' +
'fecha_pedido)'#10'end as TITULO,'#10'REFERENCIA, ID_PROVEEDOR, NOMBRE, ' +
'SITUACION, fecha_pedido, FECHA_CONFIRMACION, FECHA_ENTREGA, IMPO' +
'RTE_TOTAL'#10#10'from V_PEDIDOS_PROVEEDOR'#10'where {where}'#10'order by FECHA' +
'_PEDIDO'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ID_EMPRESA'
TableField = 'ID_EMPRESA'
end
item
DatasetField = 'MES'
TableField = '<unknown>'
SQLOrigin = 'MES'
end
item
DatasetField = 'TITULO'
TableField = '<unknown>'
SQLOrigin = 'TITULO'
end
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end
item
DatasetField = 'ID_PROVEEDOR'
TableField = 'ID_PROVEEDOR'
end
item
DatasetField = 'NOMBRE'
TableField = 'NOMBRE'
end
item
DatasetField = 'SITUACION'
TableField = 'SITUACION'
end
item
DatasetField = 'FECHA_PEDIDO'
TableField = 'FECHA_PEDIDO'
end
item
DatasetField = 'FECHA_CONFIRMACION'
TableField = 'FECHA_CONFIRMACION'
end
item
DatasetField = 'FECHA_ENTREGA'
TableField = 'FECHA_ENTREGA'
end
item
DatasetField = 'IMPORTE_TOTAL'
TableField = 'IMPORTE_TOTAL'
end>
end>
Name = 'InformeListadoPedidos'
Fields = <
item
Name = 'ID_EMPRESA'
DataType = datInteger
end
item
Name = 'MES'
DataType = datSmallInt
end
item
Name = 'TITULO'
DataType = datString
Size = 19
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'ID_PROVEEDOR'
DataType = datInteger
end
item
Name = 'NOMBRE'
DataType = datString
Size = 255
end
item
Name = 'SITUACION'
DataType = datString
Size = 9
end
item
Name = 'FECHA_PEDIDO'
DataType = datDateTime
end
item
Name = 'FECHA_CONFIRMACION'
DataType = datDateTime
end
item
Name = 'FECHA_ENTREGA'
DataType = datDateTime
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
end>
end
item
IsPublic = False
Params = <
@ -855,4 +988,81 @@ object RptPedidosProveedor: TRptPedidosProveedor
Left = 440
Top = 296
end
object frxDBInformeListadoPedidos: TfrxDBDataset
UserName = 'frxDBInformeListadoPedidos'
CloseDataSource = True
DataSource = DADSInformeListadoPedidos
Left = 600
Top = 24
end
object DADSInformeListadoPedidos: TDADataSource
DataSet = tbl_InformeListadoPedidos.Dataset
DataTable = tbl_InformeListadoPedidos
Left = 600
Top = 80
end
object tbl_InformeListadoPedidos: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'ID_EMPRESA'
DataType = datInteger
end
item
Name = 'MES'
DataType = datSmallInt
end
item
Name = 'TITULO'
DataType = datString
Size = 19
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'ID_PROVEEDOR'
DataType = datInteger
end
item
Name = 'NOMBRE'
DataType = datString
Size = 255
end
item
Name = 'SITUACION'
DataType = datString
Size = 9
end
item
Name = 'FECHA_PEDIDO'
DataType = datDateTime
end
item
Name = 'FECHA_CONFIRMACION'
DataType = datDateTime
end
item
Name = 'FECHA_ENTREGA'
DataType = datDateTime
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
end>
Params = <>
LogChanges = False
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteFetchEnabled = False
LocalSchema = schReport
LocalDataStreamer = DABINAdapter
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'InformeListadoPedidos'
IndexDefs = <>
Left = 600
Top = 136
end
end

View File

@ -62,6 +62,9 @@ type
frxPDFExport1: TfrxPDFExport;
schReport: TDASchema;
DataDictionary: TDADataDictionary;
frxDBInformeListadoPedidos: TfrxDBDataset;
DADSInformeListadoPedidos: TDADataSource;
tbl_InformeListadoPedidos: TDAMemDataTable;
procedure DataModuleCreate(Sender: TObject);
procedure frxReportGetValue(const VarName: string; var Value: Variant);
private
@ -69,6 +72,8 @@ type
FImprimirPrecio : Boolean;
FImprimirRefProveedor : Boolean;
procedure _GenerarPedido(const ID : Integer);
function _GenerarInforme(const TipoInforme: String; const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const ImporteMinimo: Currency): Binary;
public
function GenerarPedido(const ListaID : TIntegerArray;
const ImprimirPrecio: Boolean = True;
@ -77,6 +82,8 @@ type
function GenerarPedidoEnPDF(const ListaID: TIntegerArray;
const ImprimirPrecio: Boolean = True;
const ImprimirRefProveedor: Boolean = True): Binary;
function GenerarInformeListadoPedidos(const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
end;
implementation
@ -88,6 +95,8 @@ uses
const
rptInforme = 'InfPedidoProveedor.fr3';
rptInformeListadoPedidosDesglosado = 'InformeListadoPedidosDesglosado.fr3';
rptInformeListadoPedidos = 'InformeListadoPedidos.fr3';
{ Dataset names for schReport }
ds_InformeCabecera = 'Informe_Cabecera';
@ -117,6 +126,25 @@ begin
Value := FImprimirRefProveedor;
end;
function TRptPedidosProveedor.GenerarInformeListadoPedidos(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
var
ATipoInforme: String;
begin
//DESGLOSADO POR CLIENTE EN ESTE INFORME NO SE DESGLOSARÁ POR CLIENTE
if Desglosado then
ATipoInforme := rptInformeListadoPedidosDesglosado
else
ATipoInforme := rptInformeListadoPedidos;
Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, ImporteMinimo);
end;
function TRptPedidosProveedor.GenerarPedido(const ListaID : TIntegerArray;
const ImprimirPrecio: Boolean = True;
const ImprimirRefProveedor: Boolean = True): Binary;
@ -139,6 +167,96 @@ begin
end;
end;
function TRptPedidosProveedor._GenerarInforme(const TipoInforme: String;
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDClientes: TIntegerArray; const ImporteMinimo: Currency): Binary;
var
Condicion: TDAWhereExpression;
i: Integer;
begin
Result := Binary.Create;
//FConnection.BeginTransaction; <--- Creo que no va a hacer falta.
try
if tbl_InformeListadoPedidos.Active then
tbl_InformeListadoPedidos.Active := False;
// Filtrar el informe por empresa
with tbl_InformeListadoPedidos.DynamicWhere do
begin
// (ID_EMPRESA >= ID)
Condicion := NewBinaryExpression(NewField('', fld_PedidosProveedorID_EMPRESA), NewConstant(IdEmpresa, datInteger), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
// Filtrar el informe por fechas
if not VarIsNull(FechaInicio)
and not VarIsNull(FechaFin) then
begin
with tbl_InformeListadoPedidos.DynamicWhere do
begin
// (FECHA_INICIO between FECHA_FIN)
Condicion := NewBinaryExpression(NewField('', fld_PedidosProveedorFECHA_PEDIDO), NewConstant(FechaInicio, datDateTime), dboGreaterOrEqual);
Condicion := NewBinaryExpression(NewBinaryExpression(NewField('', fld_PedidosProveedorFECHA_PEDIDO), NewConstant(FechaFin, datDateTime), dboLessOrEqual), Condicion, dboAnd);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
// Filtrar el informe por cliente
if Assigned(ListaIDClientes) then
begin
with tbl_InformeListadoPedidos.DynamicWhere do
begin
for i := 0 to ListaIDClientes.Count - 1 do
begin
// (ID_CLIENTE = ID)
Condicion := NewBinaryExpression(NewField('', fld_PedidosProveedorID_PROVEEDOR), NewConstant(ListaIDClientes.Items[i], datInteger), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
end;
// Filtrar el informe por importe minimo
if (ImporteMinimo > 0) then
begin
with tbl_InformeListadoPedidos.DynamicWhere do
begin
// (IMPORTE_TOTAL > ImporteMinimo)
Condicion := NewBinaryExpression(NewField('', fld_PedidosProveedorIMPORTE_TOTAL), NewConstant(ImporteMinimo, datCurrency), dboGreaterOrEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
tbl_InformeListadoPedidos.Active := True;
frxReport.LoadFromFile(DarRutaInformes + TipoInforme, True);
frxReport.Variables.Variables['FechaInicio'] := FechaInicio;
frxReport.Variables.Variables['FechaFin'] := FechaFin;
frxReport.PrepareReport(False);
frxReport.PreviewPages.SaveToStream(Result);
finally
//FConnection.RollbackTransaction; <--- Creo que no va a hacer falta.
end;
end;
procedure TRptPedidosProveedor._GenerarPedido(const ID: Integer);
begin
tbl_Cabecera.Active := False;

View File

@ -2,7 +2,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
OldCreateOrder = True
OnCreate = DataModuleCreate
Height = 556
Width = 602
Width = 858
object DADSCabecera: TDADataSource
DataSet = tbl_Cabecera.Dataset
DataTable = tbl_Cabecera
@ -39,6 +39,151 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
ConnectionManager = dmServer.ConnectionManager
DataDictionary = DataDictionary
Datasets = <
item
Params = <>
Statements = <
item
Connection = 'IBX'
ConnectionType = 'Interbase'
Default = True
TargetTable = 'V_PRESUPUESTOS_CLIENTE'
Name = 'IBX'
SQL =
'select ID_EMPRESA,'#10'extract (month from fecha_presupuesto) as MES' +
','#10'case'#10'when extract (month from fecha_presupuesto) = 1 then '#39'ENE' +
'RO - '#39' || extract (year from fecha_presupuesto)'#10'when extract (mo' +
'nth from fecha_presupuesto) = 2 then '#39'FEBRERO - '#39' || extract (ye' +
'ar from fecha_presupuesto)'#10'when extract (month from fecha_presup' +
'uesto) = 3 then '#39'MARZO - '#39' || extract (year from fecha_presupues' +
'to)'#10'when extract (month from fecha_presupuesto) = 4 then '#39'ABRIL ' +
'- '#39' || extract (year from fecha_presupuesto)'#10'when extract (month' +
' from fecha_presupuesto) = 5 then '#39'MAYO - '#39' || extract (year fro' +
'm fecha_presupuesto)'#10'when extract (month from fecha_presupuesto)' +
' = 6 then '#39'JUNIO - '#39' || extract (year from fecha_presupuesto)'#10'wh' +
'en extract (month from fecha_presupuesto) = 7 then '#39'JULIO - '#39' ||' +
' extract (year from fecha_presupuesto)'#10'when extract (month from ' +
'fecha_presupuesto) = 8 then '#39'AGOSTO - '#39' || extract (year from fe' +
'cha_presupuesto)'#10'when extract (month from fecha_presupuesto) = 9' +
' then '#39'SEPTIEMBRE - '#39' || extract (year from fecha_presupuesto)'#10'w' +
'hen extract (month from fecha_presupuesto) = 10 then '#39'OCTUBRE - ' +
#39' || extract (year from fecha_presupuesto)'#10'when extract (month f' +
'rom fecha_presupuesto) = 11 then '#39'NOVIEMBRE - '#39' || extract (year' +
' from fecha_presupuesto)'#10'when extract (month from fecha_presupue' +
'sto) = 12 then '#39'DICIEMBRE - '#39' || extract (year from fecha_presup' +
'uesto)'#10'end as TITULO,'#10'REFERENCIA, ID_CLIENTE, NOMBRE, SITUACION' +
', NIF_CIF, FECHA_PRESUPUESTO, FECHA_DECISION, FACTURA, IMPORTE_T' +
'OTAL'#10#10'from V_presupuestos_cliente'#10'where {where}'#10'order by FECHA_P' +
'RESUPUESTO'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ID_EMPRESA'
TableField = 'ID_EMPRESA'
end
item
DatasetField = 'MES'
TableField = '<unknown>'
SQLOrigin = 'MES'
end
item
DatasetField = 'TITULO'
TableField = '<unknown>'
SQLOrigin = 'TITULO'
end
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end
item
DatasetField = 'ID_CLIENTE'
TableField = 'ID_CLIENTE'
end
item
DatasetField = 'NOMBRE'
TableField = 'NOMBRE'
end
item
DatasetField = 'SITUACION'
TableField = 'SITUACION'
end
item
DatasetField = 'NIF_CIF'
TableField = 'NIF_CIF'
end
item
DatasetField = 'FECHA_PRESUPUESTO'
TableField = 'FECHA_PRESUPUESTO'
end
item
DatasetField = 'FECHA_DECISION'
TableField = 'FECHA_DECISION'
end
item
DatasetField = 'FACTURA'
TableField = 'FACTURA'
end
item
DatasetField = 'IMPORTE_TOTAL'
TableField = 'IMPORTE_TOTAL'
end>
end>
Name = 'InformeListadoPresupuestos'
Fields = <
item
Name = 'ID_EMPRESA'
DataType = datInteger
end
item
Name = 'MES'
DataType = datSmallInt
end
item
Name = 'TITULO'
DataType = datString
Size = 19
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'ID_CLIENTE'
DataType = datInteger
end
item
Name = 'NOMBRE'
DataType = datString
Size = 255
end
item
Name = 'SITUACION'
DataType = datString
Size = 255
end
item
Name = 'NIF_CIF'
DataType = datString
Size = 15
end
item
Name = 'FECHA_PRESUPUESTO'
DataType = datDateTime
end
item
Name = 'FECHA_DECISION'
DataType = datDateTime
end
item
Name = 'FACTURA'
DataType = datString
Size = 255
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
end>
end
item
Params = <
item
@ -1463,4 +1608,87 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
Left = 528
Top = 440
end
object DADSInformeListadoPresupuestos: TDADataSource
DataSet = tbl_InformeListadoPresupuestos.Dataset
DataTable = tbl_InformeListadoPresupuestos
Left = 680
Top = 72
end
object tbl_InformeListadoPresupuestos: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'ID_EMPRESA'
DataType = datInteger
end
item
Name = 'MES'
DataType = datSmallInt
end
item
Name = 'TITULO'
DataType = datString
Size = 19
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'ID_CLIENTE'
DataType = datInteger
end
item
Name = 'NOMBRE'
DataType = datString
Size = 255
end
item
Name = 'SITUACION'
DataType = datString
Size = 255
end
item
Name = 'NIF_CIF'
DataType = datString
Size = 15
end
item
Name = 'FECHA_PRESUPUESTO'
DataType = datDateTime
end
item
Name = 'FECHA_DECISION'
DataType = datDateTime
end
item
Name = 'FACTURA'
DataType = datString
Size = 255
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
end>
Params = <>
LogChanges = False
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteFetchEnabled = False
LocalSchema = schReport
LocalDataStreamer = DABin2DataStreamer1
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'InformeListadoPresupuestos'
IndexDefs = <>
Left = 680
Top = 128
end
object frxDBInformeListadoPresupuestos: TfrxDBDataset
UserName = 'frxDBInformeListadoPresupuestos'
CloseDataSource = True
DataSource = DADSInformeListadoPresupuestos
Left = 680
Top = 16
end
end

View File

@ -78,13 +78,18 @@ type
frxPDFExport1: TfrxPDFExport;
schReport: TDASchema;
DataDictionary: TDADataDictionary;
DADSInformeListadoPresupuestos: TDADataSource;
tbl_InformeListadoPresupuestos: TDAMemDataTable;
frxDBInformeListadoPresupuestos: TfrxDBDataset;
procedure DataModuleCreate(Sender: TObject);
private
FConnection: IDAConnection;
procedure _GenerarPresupuesto(const AID : Integer);
function _GenerarInforme(const TipoInforme: String; const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const ImporteMinimo: Currency): Binary;
public
function GenerarPresupuesto(const ListaID : TIntegerArray): Binary;
function GenerarPresupuestoEnPDF(const ListaID : TIntegerArray): Binary;
function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
end;
implementation
@ -96,6 +101,8 @@ uses
const
rptInforme = 'InfPresupuestoCliente.fr3';
rptInformeListadoPresupuestosDesglosado = 'InformeListadoPresupuestosDesglosado.fr3';
rptInformeListadoPresupuestos = 'InformeListadoPresupuestos.fr3';
{ TRptPresupuestosProveedor }
@ -132,6 +139,24 @@ begin
end;
end;
function TRptPresupuestosCliente.GenerarInformeListadoPresupuestos(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
var
ATipoInforme: String;
begin
//DESGLOSADO POR CLIENTE EN ESTE INFORME NO SE DESGLOSARÁ POR CLIENTE
if Desglosado then
ATipoInforme := rptInformeListadoPresupuestosDesglosado
else
ATipoInforme := rptInformeListadoPresupuestos;
Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, ImporteMinimo);
end;
function TRptPresupuestosCliente.GenerarPresupuesto(const ListaID: TIntegerArray): Binary;
var
i: Integer;
@ -150,6 +175,96 @@ begin
end;
end;
function TRptPresupuestosCliente._GenerarInforme(const TipoInforme: String;
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDClientes: TIntegerArray; const ImporteMinimo: Currency): Binary;
var
Condicion: TDAWhereExpression;
i: Integer;
begin
Result := Binary.Create;
//FConnection.BeginTransaction; <--- Creo que no va a hacer falta.
try
if tbl_InformeListadoPresupuestos.Active then
tbl_InformeListadoPresupuestos.Active := False;
// Filtrar el informe por empresa
with tbl_InformeListadoPresupuestos.DynamicWhere do
begin
// (ID_EMPRESA >= ID)
Condicion := NewBinaryExpression(NewField('', fld_PresupuestosClienteID_EMPRESA), NewConstant(IdEmpresa, datInteger), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
// Filtrar el informe por fechas
if not VarIsNull(FechaInicio)
and not VarIsNull(FechaFin) then
begin
with tbl_InformeListadoPresupuestos.DynamicWhere do
begin
// (FECHA_INICIO between FECHA_FIN)
Condicion := NewBinaryExpression(NewField('', fld_PresupuestosClienteFECHA_PRESUPUESTO), NewConstant(FechaInicio, datDateTime), dboGreaterOrEqual);
Condicion := NewBinaryExpression(NewBinaryExpression(NewField('', fld_PresupuestosClienteFECHA_PRESUPUESTO), NewConstant(FechaFin, datDateTime), dboLessOrEqual), Condicion, dboAnd);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
// Filtrar el informe por cliente
if Assigned(ListaIDClientes) then
begin
with tbl_InformeListadoPresupuestos.DynamicWhere do
begin
for i := 0 to ListaIDClientes.Count - 1 do
begin
// (ID_CLIENTE = ID)
Condicion := NewBinaryExpression(NewField('', fld_PresupuestosClienteID_CLIENTE), NewConstant(ListaIDClientes.Items[i], datInteger), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
end;
// Filtrar el informe por importe minimo
if (ImporteMinimo > 0) then
begin
with tbl_InformeListadoPresupuestos.DynamicWhere do
begin
// (IMPORTE_TOTAL > ImporteMinimo)
Condicion := NewBinaryExpression(NewField('', fld_PresupuestosClienteIMPORTE_TOTAL), NewConstant(ImporteMinimo, datCurrency), dboGreaterOrEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
tbl_InformeListadoPresupuestos.Active := True;
frxReport.LoadFromFile(DarRutaInformes + TipoInforme, True);
frxReport.Variables.Variables['FechaInicio'] := FechaInicio;
frxReport.Variables.Variables['FechaFin'] := FechaFin;
frxReport.PrepareReport(False);
frxReport.PreviewPages.SaveToStream(Result);
finally
//FConnection.RollbackTransaction; <--- Creo que no va a hacer falta.
end;
end;
procedure TRptPresupuestosCliente._GenerarPresupuesto(const AID: Integer);
begin
tbl_Cabecera.Active := False;

View File

@ -38,8 +38,8 @@ type
function _GenerarInforme(const TipoInforme: String; const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const ImporteMinimo: Currency): Binary;
public
function GenerarRecibo(const ListaID : TIntegerArray): Binary;
function GetInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
end;
implementation
@ -90,7 +90,7 @@ begin
end;
end;
function TRptRecibosCliente.GetInformeListadoRecibosCliente(
function TRptRecibosCliente.GenerarInformeListadoRecibos(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
@ -107,7 +107,7 @@ begin
Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, ImporteMinimo);
end;
function TRptRecibosCliente.GetInformeListadoRecibosCliPendientes(
function TRptRecibosCliente.GenerarInformeListadoRecibosPendientes(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;

View File

@ -1,755 +0,0 @@
object RptRecibosCliente: TRptRecibosCliente
OldCreateOrder = True
OnCreate = DataModuleCreate
Height = 405
Width = 447
object DADataCabecera: TDADataSource
DataTable = tbl_Cabecera
Left = 264
Top = 72
end
object tbl_Cabecera: TDACDSDataTable
RemoteUpdatesOptions = []
Fields = <>
Params = <>
MasterMappingMode = mmDataRequest
LogChanges = False
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteFetchEnabled = False
SchemaCall.Params = <>
DataRequestCall.Params = <>
DataUpdateCall.Params = <>
ScriptCall.Params = <>
ReadOnly = False
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
IndexDefs = <>
Left = 264
Top = 128
end
object DABINAdapter: TDABINAdapter
Left = 48
Top = 80
end
object frxRichObject1: TfrxRichObject
Left = 48
Top = 296
end
object frxBarCodeObject1: TfrxBarCodeObject
Left = 144
Top = 296
end
object frxOLEObject1: TfrxOLEObject
Left = 48
Top = 344
end
object frxCrossObject1: TfrxCrossObject
Left = 144
Top = 344
end
object frxCheckBoxObject1: TfrxCheckBoxObject
Left = 256
Top = 296
end
object frxGradientObject1: TfrxGradientObject
Left = 360
Top = 296
end
object frxChartObject1: TfrxChartObject
Left = 256
Top = 344
end
object schReport: TDASchema
ConnectionManager = dmServer.ConnectionManager
DataDictionary = DataDictionary
Datasets = <
item
Params = <
item
Name = 'ID'
DataType = datInteger
BlobType = dabtUnknown
Value = ''
ParamType = daptInput
end>
Statements = <
item
Connection = 'IBX'
TargetTable = 'REMESAS_CLIENTE'
SQL =
'SELECT'#10' V_RECIBOS_CLIENTE.ID,'#10' V_RECIBOS_CLIENTE.ID_EMPRES' +
'A,'#10' V_RECIBOS_CLIENTE.REFERENCIA,'#10' V_RECIBOS_CLIENTE.SITUA' +
'CION,'#10' V_RECIBOS_CLIENTE.ID_FACTURA,'#10' V_RECIBOS_CLIENTE.ID' +
'_REMESA,'#10' V_RECIBOS_CLIENTE.REFERENCIA_REMESA,'#10' V_RECIBOS_' +
'CLIENTE.FECHA_EMISION,'#10' V_RECIBOS_CLIENTE.FECHA_VENCIMIENTO,'#10 +
' V_RECIBOS_CLIENTE.DESCRIPCION,'#10' V_RECIBOS_CLIENTE.OBSERVA' +
'CIONES,'#10' V_RECIBOS_CLIENTE.IMPORTE,'#10' V_RECIBOS_CLIENTE.OTR' +
'OS_GASTOS,'#10' V_RECIBOS_CLIENTE.IMPORTE_TOTAL,'#10' V_RECIBOS_CL' +
'IENTE.FECHA_FACTURA,'#10' V_RECIBOS_CLIENTE.FORMA_PAGO_FACTURA,'#10' ' +
' V_RECIBOS_CLIENTE.IMPORTE_FACTURA,'#10' V_RECIBOS_CLIENTE.NOMB' +
'RE_CLIENTE,'#10' V_RECIBOS_CLIENTE.NIF_CIF_CLIENTE,'#10' V_RECIBOS' +
'_CLIENTE.ENTIDAD_CLIENTE,'#10' V_RECIBOS_CLIENTE.SUCURSAL_CLIENTE' +
','#10' V_RECIBOS_CLIENTE.DC_CLIENTE,'#10' V_RECIBOS_CLIENTE.CUENTA' +
'_CLIENTE,'#10#10' EMPRESAS.NIF_CIF as NIF_CIF_EMPRESA, EMPRESAS.RAZ' +
'ON_SOCIAL,'#10' EMPRESAS.CALLE as CALLE_EMPRESA, EMPRESAS.POBLACI' +
'ON as POBLACION_EMPRESA,'#10' EMPRESAS.PROVINCIA as PROVINCIA_EMP' +
'RESA, EMPRESAS.CODIGO_POSTAL as CODIGO_POSTAL_EMPRESA,'#10' EMPRE' +
'SAS.TELEFONO_1, EMPRESAS.FAX, EMPRESAS.MOVIL_1, EMPRESAS.EMAIL_1' +
','#10' EMPRESAS.PAGINA_WEB, EMPRESAS.REGISTRO_MERCANTIL, EMPRESAS' +
'.LOGOTIPO'#10#10'FROM'#10' V_RECIBOS_CLIENTE'#10' LEFT OUTER JOIN EMPRESAS O' +
'N (EMPRESAS.ID = V_RECIBOS_CLIENTE.ID_EMPRESA)'#10'WHERE'#10' V_RECIBOS' +
'_CLIENTE.ID = :ID'
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'ID_EMPRESA'
TableField = 'ID_EMPRESA'
end
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end
item
DatasetField = 'SITUACION'
TableField = 'SITUACION'
end
item
DatasetField = 'ID_FACTURA'
TableField = 'ID_FACTURA'
end
item
DatasetField = 'ID_REMESA'
TableField = 'ID_REMESA'
end
item
DatasetField = 'REFERENCIA_REMESA'
TableField = 'REFERENCIA_REMESA'
end
item
DatasetField = 'FECHA_VENCIMIENTO'
TableField = 'FECHA_VENCIMIENTO'
end
item
DatasetField = 'DESCRIPCION'
TableField = 'DESCRIPCION'
end
item
DatasetField = 'OBSERVACIONES'
TableField = 'OBSERVACIONES'
end
item
DatasetField = 'IMPORTE'
TableField = 'IMPORTE'
end
item
DatasetField = 'FECHA_FACTURA'
TableField = 'FECHA_FACTURA'
end
item
DatasetField = 'FORMA_PAGO_FACTURA'
TableField = 'FORMA_PAGO_FACTURA'
end
item
DatasetField = 'IMPORTE_FACTURA'
TableField = 'IMPORTE_FACTURA'
end
item
DatasetField = 'NOMBRE_CLIENTE'
TableField = 'NOMBRE_CLIENTE'
end
item
DatasetField = 'NIF_CIF_CLIENTE'
TableField = 'NIF_CIF_CLIENTE'
end
item
DatasetField = 'ENTIDAD_CLIENTE'
TableField = 'ENTIDAD_CLIENTE'
end
item
DatasetField = 'SUCURSAL_CLIENTE'
TableField = 'SUCURSAL_CLIENTE'
end
item
DatasetField = 'DC_CLIENTE'
TableField = 'DC_CLIENTE'
end
item
DatasetField = 'CUENTA_CLIENTE'
TableField = 'CUENTA_CLIENTE'
end
item
DatasetField = 'NIF_CIF_EMPRESA'
TableField = 'NIF_CIF_EMPRESA'
end
item
DatasetField = 'RAZON_SOCIAL'
TableField = 'RAZON_SOCIAL'
end
item
DatasetField = 'CALLE_EMPRESA'
TableField = 'CALLE_EMPRESA'
end
item
DatasetField = 'POBLACION_EMPRESA'
TableField = 'POBLACION_EMPRESA'
end
item
DatasetField = 'PROVINCIA_EMPRESA'
TableField = 'PROVINCIA_EMPRESA'
end
item
DatasetField = 'CODIGO_POSTAL_EMPRESA'
TableField = 'CODIGO_POSTAL_EMPRESA'
end
item
DatasetField = 'TELEFONO_1'
TableField = 'TELEFONO_1'
end
item
DatasetField = 'FAX'
TableField = 'FAX'
end
item
DatasetField = 'MOVIL_1'
TableField = 'MOVIL_1'
end
item
DatasetField = 'EMAIL_1'
TableField = 'EMAIL_1'
end
item
DatasetField = 'PAGINA_WEB'
TableField = 'PAGINA_WEB'
end
item
DatasetField = 'REGISTRO_MERCANTIL'
TableField = 'REGISTRO_MERCANTIL'
end
item
DatasetField = 'LOGOTIPO'
TableField = 'LOGOTIPO'
end
item
DatasetField = 'OTROS_GASTOS'
TableField = 'OTROS_GASTOS'
end
item
DatasetField = 'IMPORTE_TOTAL'
TableField = 'IMPORTE_TOTAL'
end
item
DatasetField = 'FECHA_EMISION'
TableField = 'FECHA_EMISION'
end>
end>
Name = 'Informe_Cabecera'
Fields = <
item
Name = 'ID'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'SITUACION'
DataType = datString
Size = 9
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ID_FACTURA'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ID_REMESA'
DataType = datInteger
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'REFERENCIA_REMESA'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'FECHA_EMISION'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'FECHA_VENCIMIENTO'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'DESCRIPCION'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'OBSERVACIONES'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'IMPORTE'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'OTROS_GASTOS'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'IMPORTE_TOTAL'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'FECHA_FACTURA'
DataType = datDateTime
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'FORMA_PAGO_FACTURA'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'IMPORTE_FACTURA'
DataType = datFloat
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'NOMBRE_CLIENTE'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'NIF_CIF_CLIENTE'
DataType = datString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'ENTIDAD_CLIENTE'
DataType = datString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'SUCURSAL_CLIENTE'
DataType = datString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'DC_CLIENTE'
DataType = datString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CUENTA_CLIENTE'
DataType = datString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'NIF_CIF_EMPRESA'
DataType = datString
Size = 15
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'RAZON_SOCIAL'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CALLE_EMPRESA'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'POBLACION_EMPRESA'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PROVINCIA_EMPRESA'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'CODIGO_POSTAL_EMPRESA'
DataType = datString
Size = 10
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'TELEFONO_1'
DataType = datString
Size = 25
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'FAX'
DataType = datString
Size = 25
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'MOVIL_1'
DataType = datString
Size = 25
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'EMAIL_1'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'PAGINA_WEB'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'REGISTRO_MERCANTIL'
DataType = datString
Size = 255
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end
item
Name = 'LOGOTIPO'
DataType = datBlob
BlobType = dabtUnknown
DisplayWidth = 0
Alignment = taLeftJustify
InPrimaryKey = False
Calculated = False
Lookup = False
LookupCache = False
end>
BusinessRulesClient.ScriptLanguage = rslPascalScript
BusinessRulesServer.ScriptLanguage = rslPascalScript
end>
Commands = <>
RelationShips = <>
UpdateRules = <>
Left = 48
Top = 16
end
object DataDictionary: TDADataDictionary
Fields = <>
Left = 46
Top = 158
end
object frxReport: TfrxReport
Version = '3.23.7'
DotMatrixReport = False
EngineOptions.DoublePass = True
IniFile = '\Software\Fast Reports'
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
PreviewOptions.OutlineWidth = 180
PreviewOptions.Zoom = 1.000000000000000000
PrintOptions.Printer = 'Default'
ReportOptions.CreateDate = 37871.995398692100000000
ReportOptions.Description.Strings = (
'Demonstrates how to create simple list report.')
ReportOptions.LastChange = 39169.739683333330000000
ReportOptions.VersionBuild = '1'
ReportOptions.VersionMajor = '12'
ReportOptions.VersionMinor = '13'
ReportOptions.VersionRelease = '1'
ScriptLanguage = 'PascalScript'
ScriptText.Strings = (
'procedure DatosEmpresaOnBeforePrint(Sender: TfrxComponent);'
'var'
' Cadena: String;'
'begin'
' DatosEmpresa.Lines.Clear;'
' DatosEmpresa.Lines.Add(<frxDBCabecera."RAZON_SOCIAL">);'
' DatosEmpresa.Lines.Add(<frxDBCabecera."CALLE_EMPRESA">);'
''
' Cadena := '#39#39';'
' if (<frxDBCabecera."TELEFONO_1"> <> '#39#39') then'
' Cadena := '#39'TLF: '#39' + <frxDBCabecera."TELEFONO_1">;'
' if (<frxDBCabecera."FAX"> <> '#39#39') then'
' Cadena := Cadena + '#39' FAX: '#39' + <frxDBCabecera."FAX">;'
' DatosEmpresa.Lines.Add(Cadena);'
''
' Cadena := '#39#39';'
' if (<frxDBCabecera."CODIGO_POSTAL_EMPRESA"> <> '#39#39') then'
' Cadena := <frxDBCabecera."CODIGO_POSTAL_EMPRESA">;'
' if (<frxDBCabecera."POBLACION_EMPRESA"> <> '#39#39') then'
' Cadena := Cadena + '#39' '#39' + <frxDBCabecera."POBLACION_EMPRES' +
'A">;'
' if (<frxDBCabecera."PROVINCIA_EMPRESA"> <> '#39#39') then'
' Cadena := Cadena + '#39' - '#39' + <frxDBCabecera."PROVINCIA_EMPR' +
'ESA">;'
' DatosEmpresa.Lines.Add(Cadena);'
'end;'
''
'begin'
''
'end.')
ShowProgress = False
StoreInDFM = False
Left = 169
Top = 16
Datasets = <
item
DataSet = frxDBCabecera
DataSetName = 'frxDBCabecera'
end>
Variables = <>
Style = <>
end
object frxDBCabecera: TfrxDBDataset
UserName = 'frxDBCabecera'
CloseDataSource = False
DataSource = DADataCabecera
Left = 264
Top = 16
end
end

View File

@ -1,82 +0,0 @@
unit uRptRecibosCliente_Server;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
uDAInterfaces;
type
TRptRecibosCliente = class(TDataModule)
DADataCabecera: TDADataSource;
tbl_Cabecera: TDACDSDataTable;
DABINAdapter: TDABINAdapter;
frxRichObject1: TfrxRichObject;
frxBarCodeObject1: TfrxBarCodeObject;
frxOLEObject1: TfrxOLEObject;
frxCrossObject1: TfrxCrossObject;
frxCheckBoxObject1: TfrxCheckBoxObject;
frxGradientObject1: TfrxGradientObject;
frxChartObject1: TfrxChartObject;
frxDBCabecera: TfrxDBDataset;
schReport: TDASchema;
DataDictionary: TDADataDictionary;
frxReport: TfrxReport;
procedure DataModuleCreate(Sender: TObject);
private
FConnection: IDAConnection;
public
function GenerarRecibo(const ID : Integer): Binary;
end;
implementation
{$R *.dfm}
uses
uDataModuleServer;
const
rptInforme = 'InfReciboCliente.fr3';
{ Dataset names for schReport }
ds_InformeCabecera = 'Informe_Cabecera';
{ TRptReciboCliente }
procedure TRptRecibosCliente.DataModuleCreate(Sender: TObject);
begin
schReport.ConnectionManager := dmServer.ConnectionManager;
FConnection := dmServer.DarNuevaConexion;
frxReport.EngineOptions.NewSilentMode := simReThrow;
end;
function TRptRecibosCliente.GenerarRecibo(const ID: Integer): Binary;
var
dsMaster: IDADataset;
AStream: TMemoryStream;
begin
AStream := TMemoryStream.Create;
Result := Binary.Create;
FConnection.BeginTransaction;
try
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [ID]);
AStream.Clear;
DABINAdapter.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1);
DABINAdapter.ReadDataset(AStream, tbl_Cabecera, TRUE, '', TRUE, TRUE);
frxReport.LoadFromFile(DarRutaInformes + rptInforme, True);
frxReport.PrepareReport;
frxReport.PreviewPages.SaveToStream(Result);
finally
AStream.Free;
FConnection.RollbackTransaction;
end;
end;
end.

View File

@ -5,14 +5,14 @@ interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
uDADataTable, uDAMemDataTable, DB, uDAClasses, frxChart, frxGradient,
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
uDAInterfaces, uDADataStreamer;
uDAInterfaces, uDADataStreamer, FactuGES_Intf;
type
TRptRecibosCliente = class(TDataModule)
TRptRecibosProveedor = class(TDataModule)
DADataCabecera: TDADataSource;
tbl_Cabecera: TDACDSDataTable;
tbl_Cabecera: TDAMemDataTable;
DABINAdapter: TDABINAdapter;
frxRichObject1: TfrxRichObject;
frxBarCodeObject1: TfrxBarCodeObject;
@ -22,14 +22,22 @@ type
frxGradientObject1: TfrxGradientObject;
frxChartObject1: TfrxChartObject;
frxDBCabecera: TfrxDBDataset;
DADataCompensados: TDADataSource;
frxDBCompensados: TfrxDBDataset;
tbl_Compensados: TDAMemDataTable;
frxReport: TfrxReport;
tbl_InformeListadoRecibos: TDAMemDataTable;
DADSInformeListadoRecibos: TDADataSource;
frxDBInformeListadoRecibos: TfrxDBDataset;
schReport: TDASchema;
DataDictionary: TDADataDictionary;
frxReport: TfrxReport;
procedure DataModuleCreate(Sender: TObject);
private
FConnection: IDAConnection;
function _GenerarInforme(const TipoInforme: String; const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedors: TIntegerArray; const ImporteMinimo: Currency): Binary;
public
function GenerarRecibo(const ID : Integer): Binary;
function GenerarInformeListadoRecibos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedors: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedors: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
end;
implementation
@ -37,45 +45,169 @@ implementation
{$R *.dfm}
uses
uDataModuleServer;
uDataModuleServer, schRecibosProveedorClient_Intf;
const
rptInforme = 'InfReciboCliente.fr3';
rptInforme = 'InfReciboProveedor.fr3';
rptInformeListadoRecibosProveedorDesglosado = 'InformeListadoRecibosProveedorDesglosado.fr3';
rptInformeListadoRecibosProveedor = 'InformeListadoRecibosProveedor.fr3';
rptInformeListadoRecibosCliPendientes = 'InformeListadoRecibosCliPendientes.fr3';
rptInformeListadoRecibosCliPendientesDesglosado = 'InformeListadoRecibosCliPendientesDesglosado.fr3';
{ Dataset names for schReport }
ds_InformeCabecera = 'Informe_Cabecera';
ds_InformeCompensados = 'Informe_Compensados';
{ TRptReciboCliente }
{ TRptReciboProveedor }
procedure TRptRecibosCliente.DataModuleCreate(Sender: TObject);
procedure TRptRecibosProveedor.DataModuleCreate(Sender: TObject);
begin
schReport.ConnectionManager := dmServer.ConnectionManager;
FConnection := dmServer.DarNuevaConexion;
frxReport.EngineOptions.NewSilentMode := simReThrow;
frxReport.EngineOptions.NewSilentMode := simReThrow;
frxDBCabecera.DataSource := DADataCabecera;
frxDBCompensados.DataSource := DADataCompensados;
end;
function TRptRecibosCliente.GenerarRecibo(const ID: Integer): Binary;
function TRptRecibosProveedor.GenerarInformeListadoRecibos(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDProveedors: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
var
dsMaster: IDADataset;
AStream: TMemoryStream;
ATipoInforme: String;
begin
//DESGLOSADO POR CLIENTE EN ESTE INFORME NO SE DESGLOSARÁ POR CLIENTE
if Desglosado then
ATipoInforme := rptInformeListadoRecibosProveedorDesglosado
else
ATipoInforme := rptInformeListadoRecibosProveedor;
Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, ListaIDProveedors, ImporteMinimo);
end;
function TRptRecibosProveedor.GenerarInformeListadoRecibosPendientes(
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDProveedors: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
var
Condicion: TDAWhereExpression;
ATipoInforme: String;
begin
if tbl_InformeListadoRecibos.Active then
tbl_InformeListadoRecibos.Active := False;
// Filtrar el informe por situacion
with tbl_InformeListadoRecibos.DynamicWhere do
begin
// (ID_EMPRESA >= ID)
Condicion := NewBinaryExpression(NewField('', fld_RecibosProveedorSITUACION), NewConstant('PAGADO', datString), dboNotEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
//DESGLOSADO POR CLIENTE EN ESTE INFORME NO SE DESGLOSARÁ POR CLIENTE
if Desglosado then
ATipoInforme := rptInformeListadoRecibosCliPendientesDesglosado
else
ATipoInforme := rptInformeListadoRecibosCliPendientes;
Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, ListaIDProveedors, ImporteMinimo);
end;
function TRptRecibosProveedor._GenerarInforme(const TipoInforme: String;
const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime;
const ListaIDProveedors: TIntegerArray; const ImporteMinimo: Currency): Binary;
var
Condicion: TDAWhereExpression;
i: Integer;
begin
AStream := TMemoryStream.Create;
Result := Binary.Create;
FConnection.BeginTransaction;
//FConnection.BeginTransaction; <--- Creo que no va a hacer falta.
try
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [ID]);
AStream.Clear;
DABINAdapter.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1);
DABINAdapter.ReadDataset(AStream, tbl_Cabecera, TRUE, '', TRUE, TRUE);
if tbl_InformeListadoRecibos.Active then
tbl_InformeListadoRecibos.Active := False;
frxReport.LoadFromFile(DarRutaInformes + rptInforme, True);
frxReport.PrepareReport;
// Filtrar el informe por empresa
with tbl_InformeListadoRecibos.DynamicWhere do
begin
// (ID_EMPRESA >= ID)
Condicion := NewBinaryExpression(NewField('', fld_RecibosProveedorID_EMPRESA), NewConstant(IdEmpresa, datInteger), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
// Filtrar el informe por fechas
if not VarIsNull(FechaInicio)
and not VarIsNull(FechaFin) then
begin
with tbl_InformeListadoRecibos.DynamicWhere do
begin
// (FECHA_INICIO between FECHA_FIN)
Condicion := NewBinaryExpression(NewField('', fld_RecibosProveedorFECHA_VENCIMIENTO), NewConstant(FechaInicio, datDateTime), dboGreaterOrEqual);
Condicion := NewBinaryExpression(NewBinaryExpression(NewField('', fld_RecibosProveedorFECHA_VENCIMIENTO), NewConstant(FechaFin, datDateTime), dboLessOrEqual), Condicion, dboAnd);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
// Filtrar el informe por cliente
if Assigned(ListaIDProveedors) then
begin
with tbl_InformeListadoRecibos.DynamicWhere do
begin
for i := 0 to ListaIDProveedors.Count - 1 do
begin
// (ID_CLIENTE = ID)
Condicion := NewBinaryExpression(NewField('', fld_RecibosProveedorID_PROVEEDOR), NewConstant(ListaIDProveedors.Items[i], datInteger), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
end;
// Filtrar el informe por importe minimo
if (ImporteMinimo > 0) then
begin
with tbl_InformeListadoRecibos.DynamicWhere do
begin
// (IMPORTE_TOTAL > ImporteMinimo)
Condicion := NewBinaryExpression(NewField('', fld_RecibosProveedorIMPORTE_TOTAL), NewConstant(ImporteMinimo, datCurrency), dboGreaterOrEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
tbl_InformeListadoRecibos.Active := True;
frxReport.LoadFromFile(DarRutaInformes + TipoInforme, True);
frxReport.Variables.Variables['FechaInicio'] := FechaInicio;
frxReport.Variables.Variables['FechaFin'] := FechaFin;
frxReport.PrepareReport(False);
frxReport.PreviewPages.SaveToStream(Result);
finally
AStream.Free;
FConnection.RollbackTransaction;
//FConnection.RollbackTransaction; <--- Creo que no va a hacer falta.
end;
end;

View File

@ -541,7 +541,7 @@
<Interfaces>
<Interface Name="Default" UID="{9ACA4D42-EA9A-4D2C-B233-19CD299EAE91}">
<Operations>
<Operation Name="GetInformeIVAClientes" UID="{C0FE751C-5EA0-4C2A-96B8-1EF9F71DF61C}">
<Operation Name="GenerarInformeIVAClientes" UID="{C0FE751C-5EA0-4C2A-96B8-1EF9F71DF61C}">
<Parameters>
<Parameter Name="Result" DataType="Binary" Flag="Result">
</Parameter>
@ -559,7 +559,25 @@
</Parameter>
</Parameters>
</Operation>
<Operation Name="GetInformeListadoFacturas" UID="{5A8F292D-DEA3-44C8-8FB1-8A84871C34D2}">
<Operation Name="GenerarInformeIVAProveedores" UID="{96DC181E-FAE4-4511-B5C4-FEC8FE40EAE8}">
<Parameters>
<Parameter Name="Result" DataType="Binary" Flag="Result">
</Parameter>
<Parameter Name="IdEmpresa" DataType="Integer" Flag="In" >
</Parameter>
<Parameter Name="FechaInicio" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="FechaFin" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="ListaIDProveedores" DataType="TIntegerArray" Flag="In" >
</Parameter>
<Parameter Name="Desglosado" DataType="Boolean" Flag="In" >
</Parameter>
<Parameter Name="ImporteMinimo" DataType="Currency" Flag="In" >
</Parameter>
</Parameters>
</Operation>
<Operation Name="GenerarInformeListadoFacturasCli" UID="{5A8F292D-DEA3-44C8-8FB1-8A84871C34D2}">
<Parameters>
<Parameter Name="Result" DataType="Binary" Flag="Result">
</Parameter>
@ -577,7 +595,25 @@
</Parameter>
</Parameters>
</Operation>
<Operation Name="GetInformeListadoFacturasPendientes" UID="{09AD0E02-7104-4B03-A605-97897915E849}">
<Operation Name="GenerarInformeListadoFacturasProv" UID="{65AC9CE1-960E-4427-A70F-BE55AA4A8F96}">
<Parameters>
<Parameter Name="Result" DataType="Binary" Flag="Result">
</Parameter>
<Parameter Name="IdEmpresa" DataType="Integer" Flag="In" >
</Parameter>
<Parameter Name="FechaInicio" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="FechaFin" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="ListaIDProveedores" DataType="TIntegerArray" Flag="In" >
</Parameter>
<Parameter Name="Desglosado" DataType="Boolean" Flag="In" >
</Parameter>
<Parameter Name="ImporteMinimo" DataType="Currency" Flag="In" >
</Parameter>
</Parameters>
</Operation>
<Operation Name="GenerarInformeListadoFacturasCliPendientes" UID="{09AD0E02-7104-4B03-A605-97897915E849}">
<Parameters>
<Parameter Name="Result" DataType="Binary" Flag="Result">
</Parameter>
@ -595,7 +631,25 @@
</Parameter>
</Parameters>
</Operation>
<Operation Name="GetInformeListadoRecibosCliente" UID="{2C415A45-B162-408C-B09D-FA19366C9F77}">
<Operation Name="GenerarInformeListadoFacturasProvPendientes" UID="{37A36D5F-33F1-424B-B845-2450CDD0FFBF}">
<Parameters>
<Parameter Name="Result" DataType="Binary" Flag="Result">
</Parameter>
<Parameter Name="IdEmpresa" DataType="Integer" Flag="In" >
</Parameter>
<Parameter Name="FechaInicio" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="FechaFin" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="ListaIDProveedores" DataType="TIntegerArray" Flag="In" >
</Parameter>
<Parameter Name="Desglosado" DataType="Boolean" Flag="In" >
</Parameter>
<Parameter Name="ImporteMinimo" DataType="Currency" Flag="In" >
</Parameter>
</Parameters>
</Operation>
<Operation Name="GenerarInformeListadoRecibosCliente" UID="{2C415A45-B162-408C-B09D-FA19366C9F77}">
<Parameters>
<Parameter Name="Result" DataType="Binary" Flag="Result">
</Parameter>
@ -613,7 +667,25 @@
</Parameter>
</Parameters>
</Operation>
<Operation Name="GetInformeListadoRecibosCliPendientes" UID="{2E044903-D322-43A6-9946-DFF72C955CAB}">
<Operation Name="GenerarInformeListadoRecibosProveedor" UID="{3C6BFB02-176F-4E89-854E-41BBEAC452D9}">
<Parameters>
<Parameter Name="Result" DataType="Binary" Flag="Result">
</Parameter>
<Parameter Name="IdEmpresa" DataType="Integer" Flag="In" >
</Parameter>
<Parameter Name="FechaInicio" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="FechaFin" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="ListaIDProveedores" DataType="TIntegerArray" Flag="In" >
</Parameter>
<Parameter Name="Desglosado" DataType="Boolean" Flag="In" >
</Parameter>
<Parameter Name="ImporteMinimo" DataType="Currency" Flag="In" >
</Parameter>
</Parameters>
</Operation>
<Operation Name="GenerarInformeListadoRecibosCliPendientes" UID="{2E044903-D322-43A6-9946-DFF72C955CAB}">
<Parameters>
<Parameter Name="Result" DataType="Binary" Flag="Result">
</Parameter>
@ -631,6 +703,60 @@
</Parameter>
</Parameters>
</Operation>
<Operation Name="GenerarInformeListadoRecibosProvPendientes" UID="{5C5DDC07-DC3B-4C8B-9DC4-6962A8C01073}">
<Parameters>
<Parameter Name="Result" DataType="Binary" Flag="Result">
</Parameter>
<Parameter Name="IdEmpresa" DataType="Integer" Flag="In" >
</Parameter>
<Parameter Name="FechaInicio" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="FechaFin" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="ListaIDProveedores" DataType="TIntegerArray" Flag="In" >
</Parameter>
<Parameter Name="Desglosado" DataType="Boolean" Flag="In" >
</Parameter>
<Parameter Name="ImporteMinimo" DataType="Currency" Flag="In" >
</Parameter>
</Parameters>
</Operation>
<Operation Name="GenerarInformeListadoPresupuestos" UID="{B2C35CC6-928E-4696-B354-74F8C5CB2334}">
<Parameters>
<Parameter Name="Result" DataType="Binary" Flag="Result">
</Parameter>
<Parameter Name="IdEmpresa" DataType="Integer" Flag="In" >
</Parameter>
<Parameter Name="FechaInicio" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="FechaFin" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="ListaIDClientes" DataType="TIntegerArray" Flag="In" >
</Parameter>
<Parameter Name="Desglosado" DataType="Boolean" Flag="In" >
</Parameter>
<Parameter Name="ImporteMinimo" DataType="Currency" Flag="In" >
</Parameter>
</Parameters>
</Operation>
<Operation Name="GenerarInformeListadoPedidos" UID="{19D151FD-3BB8-46C5-8A0A-0EA1B08181B5}">
<Parameters>
<Parameter Name="Result" DataType="Binary" Flag="Result">
</Parameter>
<Parameter Name="IdEmpresa" DataType="Integer" Flag="In" >
</Parameter>
<Parameter Name="FechaInicio" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="FechaFin" DataType="DateTime" Flag="In" >
</Parameter>
<Parameter Name="ListaIDProveedores" DataType="TIntegerArray" Flag="In" >
</Parameter>
<Parameter Name="Desglosado" DataType="Boolean" Flag="In" >
</Parameter>
<Parameter Name="ImporteMinimo" DataType="Currency" Flag="In" >
</Parameter>
</Parameters>
</Operation>
</Operations>
</Interface>
</Interfaces>

View File

@ -747,16 +747,30 @@ type
{ IsrvGestorInformes }
IsrvGestorInformes = interface(IDataAbstractService)
['{9ACA4D42-EA9A-4D2C-B233-19CD299EAE91}']
function GetInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListadoIDClientes: TIntegerArray;
function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
function GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListadoIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
function GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoPedidos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
end;
{ CosrvGestorInformes }
@ -769,16 +783,30 @@ type
protected
function __GetInterfaceName:string; override;
function GetInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListadoIDClientes: TIntegerArray;
function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
function GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListadoIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GetInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
function GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoPedidos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
end;
implementation
@ -2128,12 +2156,12 @@ begin
result := 'srvGestorInformes';
end;
function TsrvGestorInformes_Proxy.GetInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function TsrvGestorInformes_Proxy.GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
result := nil;
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GetInformeIVAClientes');
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeIVAClientes');
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
@ -2151,12 +2179,35 @@ begin
end
end;
function TsrvGestorInformes_Proxy.GetInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListadoIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function TsrvGestorInformes_Proxy.GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
result := nil;
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GetInformeListadoFacturas');
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeIVAProveedores');
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Write('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []);
__Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
__Message.Finalize;
__TransportChannel.Dispatch(__Message);
__Message.Read('Result', TypeInfo(Binary), result, []);
finally
__Message.UnsetAttributes(__TransportChannel);
__Message.FreeStream;
end
end;
function TsrvGestorInformes_Proxy.GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListadoIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
result := nil;
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoFacturasCli');
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
@ -2174,12 +2225,81 @@ begin
end
end;
function TsrvGestorInformes_Proxy.GetInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
function TsrvGestorInformes_Proxy.GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
result := nil;
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoFacturasProv');
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Write('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []);
__Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
__Message.Finalize;
__TransportChannel.Dispatch(__Message);
__Message.Read('Result', TypeInfo(Binary), result, []);
finally
__Message.UnsetAttributes(__TransportChannel);
__Message.FreeStream;
end
end;
function TsrvGestorInformes_Proxy.GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
result := nil;
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoFacturasCliPendientes');
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Write('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []);
__Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
__Message.Finalize;
__TransportChannel.Dispatch(__Message);
__Message.Read('Result', TypeInfo(Binary), result, []);
finally
__Message.UnsetAttributes(__TransportChannel);
__Message.FreeStream;
end
end;
function TsrvGestorInformes_Proxy.GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
result := nil;
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoFacturasProvPendientes');
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Write('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []);
__Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
__Message.Finalize;
__TransportChannel.Dispatch(__Message);
__Message.Read('Result', TypeInfo(Binary), result, []);
finally
__Message.UnsetAttributes(__TransportChannel);
__Message.FreeStream;
end
end;
function TsrvGestorInformes_Proxy.GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
result := nil;
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GetInformeListadoFacturasPendientes');
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoRecibosCliente');
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
@ -2197,35 +2317,35 @@ begin
end
end;
function TsrvGestorInformes_Proxy.GetInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
result := nil;
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GetInformeListadoRecibosCliente');
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Write('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []);
__Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
__Message.Finalize;
__TransportChannel.Dispatch(__Message);
__Message.Read('Result', TypeInfo(Binary), result, []);
finally
__Message.UnsetAttributes(__TransportChannel);
__Message.FreeStream;
end
end;
function TsrvGestorInformes_Proxy.GetInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
function TsrvGestorInformes_Proxy.GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
result := nil;
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GetInformeListadoRecibosCliPendientes');
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoRecibosProveedor');
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Write('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []);
__Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
__Message.Finalize;
__TransportChannel.Dispatch(__Message);
__Message.Read('Result', TypeInfo(Binary), result, []);
finally
__Message.UnsetAttributes(__TransportChannel);
__Message.FreeStream;
end
end;
function TsrvGestorInformes_Proxy.GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
result := nil;
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoRecibosCliPendientes');
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
@ -2243,6 +2363,75 @@ begin
end
end;
function TsrvGestorInformes_Proxy.GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
result := nil;
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoRecibosProvPendientes');
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Write('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []);
__Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
__Message.Finalize;
__TransportChannel.Dispatch(__Message);
__Message.Read('Result', TypeInfo(Binary), result, []);
finally
__Message.UnsetAttributes(__TransportChannel);
__Message.FreeStream;
end
end;
function TsrvGestorInformes_Proxy.GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
result := nil;
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoPresupuestos');
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Write('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []);
__Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
__Message.Finalize;
__TransportChannel.Dispatch(__Message);
__Message.Read('Result', TypeInfo(Binary), result, []);
finally
__Message.UnsetAttributes(__TransportChannel);
__Message.FreeStream;
end
end;
function TsrvGestorInformes_Proxy.GenerarInformeListadoPedidos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
begin
try
result := nil;
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoPedidos');
__Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Write('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []);
__Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
__Message.Finalize;
__TransportChannel.Dispatch(__Message);
__Message.Read('Result', TypeInfo(Binary), result, []);
finally
__Message.UnsetAttributes(__TransportChannel);
__Message.FreeStream;
end
end;
initialization
RegisterROClass(TRdxLoginInfo);
RegisterROClass(TRdxEmpresasArray);

View File

@ -225,11 +225,18 @@ type
private
protected
published
procedure Invoke_GetInformeIVAClientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GetInformeListadoFacturas(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GetInformeListadoFacturasPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GetInformeListadoRecibosCliente(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GetInformeListadoRecibosCliPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GenerarInformeIVAClientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GenerarInformeIVAProveedores(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GenerarInformeListadoFacturasCli(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GenerarInformeListadoFacturasProv(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GenerarInformeListadoFacturasCliPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GenerarInformeListadoFacturasProvPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GenerarInformeListadoRecibosCliente(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GenerarInformeListadoRecibosProveedor(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GenerarInformeListadoRecibosCliPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GenerarInformeListadoRecibosProvPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GenerarInformeListadoPresupuestos(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GenerarInformeListadoPedidos(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
end;
implementation
@ -1164,9 +1171,9 @@ end;
{ TsrvGestorInformes_Invoker }
procedure TsrvGestorInformes_Invoker.Invoke_GetInformeIVAClientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeIVAClientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
var
IdEmpresa: Integer;
FechaInicio: DateTime;
@ -1187,9 +1194,9 @@ begin
__Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
lResult := (__Instance as IsrvGestorInformes).GetInformeIVAClientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
lResult := (__Instance as IsrvGestorInformes).GenerarInformeIVAClientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GetInformeIVAClientesResponse');
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeIVAClientesResponse');
__Message.Write('Result', TypeInfo(Binary), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
@ -1205,9 +1212,50 @@ begin
end;
end;
procedure TsrvGestorInformes_Invoker.Invoke_GetInformeListadoFacturas(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListadoIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeIVAProveedores(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
var
IdEmpresa: Integer;
FechaInicio: DateTime;
FechaFin: DateTime;
ListaIDProveedores: FactuGES_Intf.TIntegerArray;
Desglosado: Boolean;
ImporteMinimo: Currency;
lResult: Binary;
__lObjectDisposer: TROObjectDisposer;
begin
ListaIDProveedores := nil;
lResult := nil;
try
__Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Read('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []);
__Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
lResult := (__Instance as IsrvGestorInformes).GenerarInformeIVAProveedores(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeIVAProveedoresResponse');
__Message.Write('Result', TypeInfo(Binary), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
finally
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
try
__lObjectDisposer.Add(ListaIDProveedores);
__lObjectDisposer.Add(lResult);
finally
__lObjectDisposer.Free();
end;
end;
end;
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoFacturasCli(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListadoIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
var
IdEmpresa: Integer;
FechaInicio: DateTime;
@ -1228,9 +1276,9 @@ begin
__Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
lResult := (__Instance as IsrvGestorInformes).GetInformeListadoFacturas(IdEmpresa, FechaInicio, FechaFin, ListadoIDClientes, Desglosado, ImporteMinimo);
lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoFacturasCli(IdEmpresa, FechaInicio, FechaFin, ListadoIDClientes, Desglosado, ImporteMinimo);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GetInformeListadoFacturasResponse');
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoFacturasCliResponse');
__Message.Write('Result', TypeInfo(Binary), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
@ -1246,8 +1294,131 @@ begin
end;
end;
procedure TsrvGestorInformes_Invoker.Invoke_GetInformeListadoFacturasPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoFacturasProv(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
var
IdEmpresa: Integer;
FechaInicio: DateTime;
FechaFin: DateTime;
ListaIDProveedores: FactuGES_Intf.TIntegerArray;
Desglosado: Boolean;
ImporteMinimo: Currency;
lResult: Binary;
__lObjectDisposer: TROObjectDisposer;
begin
ListaIDProveedores := nil;
lResult := nil;
try
__Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Read('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []);
__Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoFacturasProv(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoFacturasProvResponse');
__Message.Write('Result', TypeInfo(Binary), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
finally
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
try
__lObjectDisposer.Add(ListaIDProveedores);
__lObjectDisposer.Add(lResult);
finally
__lObjectDisposer.Free();
end;
end;
end;
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoFacturasCliPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
var
IdEmpresa: Integer;
FechaInicio: DateTime;
FechaFin: DateTime;
ListaIDClientes: FactuGES_Intf.TIntegerArray;
Desglosado: Boolean;
ImporteMinimo: Currency;
lResult: Binary;
__lObjectDisposer: TROObjectDisposer;
begin
ListaIDClientes := nil;
lResult := nil;
try
__Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Read('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []);
__Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoFacturasCliPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoFacturasCliPendientesResponse');
__Message.Write('Result', TypeInfo(Binary), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
finally
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
try
__lObjectDisposer.Add(ListaIDClientes);
__lObjectDisposer.Add(lResult);
finally
__lObjectDisposer.Free();
end;
end;
end;
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoFacturasProvPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
var
IdEmpresa: Integer;
FechaInicio: DateTime;
FechaFin: DateTime;
ListaIDProveedores: FactuGES_Intf.TIntegerArray;
Desglosado: Boolean;
ImporteMinimo: Currency;
lResult: Binary;
__lObjectDisposer: TROObjectDisposer;
begin
ListaIDProveedores := nil;
lResult := nil;
try
__Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Read('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []);
__Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoFacturasProvPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoFacturasProvPendientesResponse');
__Message.Write('Result', TypeInfo(Binary), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
finally
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
try
__lObjectDisposer.Add(ListaIDProveedores);
__lObjectDisposer.Add(lResult);
finally
__lObjectDisposer.Free();
end;
end;
end;
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoRecibosCliente(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
var
IdEmpresa: Integer;
@ -1269,9 +1440,9 @@ begin
__Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
lResult := (__Instance as IsrvGestorInformes).GetInformeListadoFacturasPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoRecibosCliente(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GetInformeListadoFacturasPendientesResponse');
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoRecibosClienteResponse');
__Message.Write('Result', TypeInfo(Binary), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
@ -1287,50 +1458,50 @@ begin
end;
end;
procedure TsrvGestorInformes_Invoker.Invoke_GetInformeListadoRecibosCliente(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
var
IdEmpresa: Integer;
FechaInicio: DateTime;
FechaFin: DateTime;
ListaIDClientes: FactuGES_Intf.TIntegerArray;
Desglosado: Boolean;
ImporteMinimo: Currency;
lResult: Binary;
__lObjectDisposer: TROObjectDisposer;
begin
ListaIDClientes := nil;
lResult := nil;
try
__Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Read('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []);
__Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
lResult := (__Instance as IsrvGestorInformes).GetInformeListadoRecibosCliente(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GetInformeListadoRecibosClienteResponse');
__Message.Write('Result', TypeInfo(Binary), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
finally
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
try
__lObjectDisposer.Add(ListaIDClientes);
__lObjectDisposer.Add(lResult);
finally
__lObjectDisposer.Free();
end;
end;
end;
procedure TsrvGestorInformes_Invoker.Invoke_GetInformeListadoRecibosCliPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoRecibosProveedor(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
var
IdEmpresa: Integer;
FechaInicio: DateTime;
FechaFin: DateTime;
ListaIDProveedores: FactuGES_Intf.TIntegerArray;
Desglosado: Boolean;
ImporteMinimo: Currency;
lResult: Binary;
__lObjectDisposer: TROObjectDisposer;
begin
ListaIDProveedores := nil;
lResult := nil;
try
__Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Read('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []);
__Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoRecibosProveedor(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoRecibosProveedorResponse');
__Message.Write('Result', TypeInfo(Binary), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
finally
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
try
__lObjectDisposer.Add(ListaIDProveedores);
__lObjectDisposer.Add(lResult);
finally
__lObjectDisposer.Free();
end;
end;
end;
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoRecibosCliPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
var
IdEmpresa: Integer;
FechaInicio: DateTime;
@ -1351,9 +1522,9 @@ begin
__Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
lResult := (__Instance as IsrvGestorInformes).GetInformeListadoRecibosCliPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoRecibosCliPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GetInformeListadoRecibosCliPendientesResponse');
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoRecibosCliPendientesResponse');
__Message.Write('Result', TypeInfo(Binary), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
@ -1369,5 +1540,128 @@ begin
end;
end;
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoRecibosProvPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
var
IdEmpresa: Integer;
FechaInicio: DateTime;
FechaFin: DateTime;
ListaIDProveedores: FactuGES_Intf.TIntegerArray;
Desglosado: Boolean;
ImporteMinimo: Currency;
lResult: Binary;
__lObjectDisposer: TROObjectDisposer;
begin
ListaIDProveedores := nil;
lResult := nil;
try
__Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Read('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []);
__Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoRecibosProvPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoRecibosProvPendientesResponse');
__Message.Write('Result', TypeInfo(Binary), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
finally
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
try
__lObjectDisposer.Add(ListaIDProveedores);
__lObjectDisposer.Add(lResult);
finally
__lObjectDisposer.Free();
end;
end;
end;
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoPresupuestos(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
var
IdEmpresa: Integer;
FechaInicio: DateTime;
FechaFin: DateTime;
ListaIDClientes: FactuGES_Intf.TIntegerArray;
Desglosado: Boolean;
ImporteMinimo: Currency;
lResult: Binary;
__lObjectDisposer: TROObjectDisposer;
begin
ListaIDClientes := nil;
lResult := nil;
try
__Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Read('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []);
__Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoPresupuestos(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoPresupuestosResponse');
__Message.Write('Result', TypeInfo(Binary), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
finally
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
try
__lObjectDisposer.Add(ListaIDClientes);
__lObjectDisposer.Add(lResult);
finally
__lObjectDisposer.Free();
end;
end;
end;
procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoPedidos(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GenerarInformeListadoPedidos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray;
const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; }
var
IdEmpresa: Integer;
FechaInicio: DateTime;
FechaFin: DateTime;
ListaIDProveedores: FactuGES_Intf.TIntegerArray;
Desglosado: Boolean;
ImporteMinimo: Currency;
lResult: Binary;
__lObjectDisposer: TROObjectDisposer;
begin
ListaIDProveedores := nil;
lResult := nil;
try
__Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []);
__Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]);
__Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]);
__Message.Read('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []);
__Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []);
__Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []);
lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoPedidos(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoPedidosResponse');
__Message.Write('Result', TypeInfo(Binary), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
finally
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
try
__lObjectDisposer.Add(ListaIDProveedores);
__lObjectDisposer.Add(lResult);
finally
__lObjectDisposer.Free();
end;
end;
end;
initialization
end.

Binary file not shown.

Binary file not shown.

View File

@ -130,7 +130,9 @@ uses
schRecibosClienteClient_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteClient_Intf.pas',
schRecibosClienteServer_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteServer_Intf.pas',
schRecibosProveedorClient_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorClient_Intf.pas',
schRecibosProveedorServer_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorServer_Intf.pas';
schRecibosProveedorServer_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorServer_Intf.pas',
uRptFacturasProveedor_Server in '..\Modulos\Facturas de proveedor\Reports\uRptFacturasProveedor_Server.pas' {RptFacturasProveedor: TDataModule},
uRptRecibosProveedor_Server in '..\Modulos\Recibos de proveedor\Reports\uRptRecibosProveedor_Server.pas' {RptRecibosProveedor: TDataModule};
{$R *.res}
{$R ..\Servicios\RODLFile.res}

View File

@ -35,7 +35,7 @@
<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">1</VersionInfo><VersionInfo Name="MinorVer">3</VersionInfo><VersionInfo Name="Release">7</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.3.7.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.3.7.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">miércoles, 01 de octubre de 2008 11:10</VersionInfoKeys></VersionInfoKeys><Excluded_Packages/><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></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">1</VersionInfo><VersionInfo Name="MinorVer">4</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.4.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.4.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">lunes, 20 de octubre de 2008 20:06</VersionInfoKeys></VersionInfoKeys><Excluded_Packages/><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets"/>
<ItemGroup>
@ -133,6 +133,10 @@
<DCCReference Include="..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas"/>
<DCCReference Include="..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas"/>
<DCCReference Include="..\Modulos\Facturas de proveedor\Model\uBizFacturasProveedorServer.pas"/>
<DCCReference Include="..\Modulos\Facturas de proveedor\Reports\uRptFacturasProveedor_Server.pas">
<Form>RptFacturasProveedor</Form>
<DesignClass>TDataModule</DesignClass>
</DCCReference>
<DCCReference Include="..\Modulos\Facturas de proveedor\Servidor\srvFacturasProveedor_Impl.pas">
<Form>srvFacturasProveedor</Form>
<DesignClass>TDataAbstractService</DesignClass>
@ -213,6 +217,10 @@
</DCCReference>
<DCCReference Include="..\Modulos\Recibos de proveedor\Model\schRecibosProveedorClient_Intf.pas"/>
<DCCReference Include="..\Modulos\Recibos de proveedor\Model\schRecibosProveedorServer_Intf.pas"/>
<DCCReference Include="..\Modulos\Recibos de proveedor\Reports\uRptRecibosProveedor_Server.pas">
<Form>RptRecibosProveedor</Form>
<DesignClass>TDataModule</DesignClass>
</DCCReference>
<DCCReference Include="..\Modulos\Recibos de proveedor\Servidor\srvRecibosProveedor_Impl.pas">
<Form>srvRecibosProveedor</Form>
<DesignClass>TDataAbstractService</DesignClass>

View File

@ -1,7 +1,7 @@
MAINICON ICON "C:\Codigo Tecsitel\Resources\Iconos\Servidor.ico"
1 VERSIONINFO
FILEVERSION 1,3,7,0
PRODUCTVERSION 1,3,7,0
FILEVERSION 1,4,0,0
PRODUCTVERSION 1,4,0,0
FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L
FILEOS 0x40004L
@ -12,9 +12,9 @@ BEGIN
BEGIN
BLOCK "0C0A04E4"
BEGIN
VALUE "FileVersion", "1.3.7.0\0"
VALUE "ProductVersion", "1.3.7.0\0"
VALUE "CompileDate", "lunes, 20 de octubre de 2008 20:06\0"
VALUE "FileVersion", "1.4.0.0\0"
VALUE "ProductVersion", "1.4.0.0\0"
VALUE "CompileDate", "martes, 21 de octubre de 2008 19:50\0"
END
END
BLOCK "VarFileInfo"