.
git-svn-id: https://192.168.0.254/svn/Proyectos.AlonsoYSal_FactuGES2/trunk@36 40301925-124e-1c4e-b97d-170ad7a8785b
This commit is contained in:
parent
1550493819
commit
7b6b52009e
@ -52,6 +52,7 @@ type
|
||||
FImporteMinimo: Currency;
|
||||
FDesglosado : Boolean;
|
||||
FVerDatosCliente : Boolean;
|
||||
FEmpresaAcota : Boolean;
|
||||
|
||||
//Genera cada uno de los albaranes a imprimir
|
||||
procedure _GenerarFactura(const ID: integer); overload;
|
||||
@ -63,8 +64,8 @@ type
|
||||
procedure RecuperarNombresClientes;
|
||||
|
||||
public
|
||||
function GenerarFactura(const ListaID : TIntegerArray; const VerDatosCliente: Boolean): Binary; overload;
|
||||
function GenerarFacturaEnPDF(const ListaID : TIntegerArray; const VerDatosCliente: Boolean): Binary;
|
||||
function GenerarFactura(const ListaID : TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean = true): Binary; overload;
|
||||
function GenerarFacturaEnPDF(const ListaID : TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean = true): Binary;
|
||||
function GenerarInformeIVA(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
||||
function GenerarInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
||||
function GenerarInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
||||
@ -80,6 +81,7 @@ uses
|
||||
|
||||
const
|
||||
rptFacturaCliente = 'InfFacturaCliente.fr3';
|
||||
rptFacturaClienteAlonsoySal = 'InfFacturaCliente-alonsoysal.fr3';
|
||||
|
||||
rptInformeIVA = 'InformeIVAClientes.fr3';
|
||||
rptInformeIVADesglosado = 'InformeIVAClientesDesglosado.fr3';
|
||||
@ -107,13 +109,14 @@ begin
|
||||
FreeANDNIL(FListaNombresClientes);
|
||||
end;
|
||||
|
||||
function TRptFacturasCliente.GenerarFactura(const ListaID: TIntegerArray; const VerDatosCliente: Boolean): Binary;
|
||||
function TRptFacturasCliente.GenerarFactura(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean = true): Binary;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
Result := Binary.Create;
|
||||
try
|
||||
FVerDatosCliente := VerDatosCliente;
|
||||
FEmpresaAcota := EmpresaAcota;
|
||||
|
||||
//Vamos generando todos y cada una de las facturas recibidas
|
||||
for i := 0 to ListaID.Count - 1 do
|
||||
@ -124,14 +127,15 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TRptFacturasCliente.GenerarFacturaEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean): Binary;
|
||||
function TRptFacturasCliente.GenerarFacturaEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean = true): Binary;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
Result := Binary.Create;
|
||||
try
|
||||
FVerDatosCliente := VerDatosCliente;
|
||||
|
||||
FEmpresaAcota := EmpresaAcota;
|
||||
|
||||
//Vamos generando todos y cada uno de los presupuestos recibidos
|
||||
for i := 0 to ListaID.Count - 1 do
|
||||
_GenerarFactura(ListaID.Items[i]);
|
||||
@ -634,12 +638,16 @@ begin
|
||||
tbl_Detalles.Active := True;
|
||||
tbl_Vencimientos.Active := True;
|
||||
|
||||
AInforme := DarRutaFichero(DarRutaInformes, rptFacturaCliente, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').AsString);
|
||||
if FEmpresaAcota then
|
||||
AInforme := DarRutaFichero(DarRutaInformes, rptFacturaCliente, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').AsString)
|
||||
else
|
||||
AInforme := DarRutaFichero(DarRutaInformes, rptFacturaClienteAlonsoySal, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').AsString);
|
||||
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: _GenerarFactura, no encuentra informe ' + rptFacturaCliente));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
frxReport.Variables.Variables['VerDatosCliente'] := FVerDatosCliente;
|
||||
frxReport.Variables.Variables['VerDatosCliente'] := FVerDatosCliente;
|
||||
frxReport.ReportOptions.Name := 'Factura ' + tbl_Cabecera.FieldByName('REFERENCIA').AsString;
|
||||
frxReport.PrepareReport(False);
|
||||
finally
|
||||
|
||||
Loading…
Reference in New Issue
Block a user