git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES/trunk@4 3f40d355-893c-4141-8e64-b1d9be72e7e7
72 lines
1.7 KiB
ObjectPascal
72 lines
1.7 KiB
ObjectPascal
unit InformeFacturaProforma;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, InformeBase, FR_IBXDB, FR_Shape, FR_DSet, FR_DBSet, FR_Class,
|
|
DB, IBCustomDataSet, IBQuery, RdxEmpresaActiva;
|
|
|
|
type
|
|
TdmInformeFacturaProforma = class(TdmInformeBase)
|
|
TablaCab: TfrDBDataSet;
|
|
TablaDet: TfrDBDataSet;
|
|
TablaFacturasProforma: TIBQuery;
|
|
TablaDetallesFacturas: TIBQuery;
|
|
private
|
|
FCodigoFactura : Variant;
|
|
protected
|
|
procedure PrepararConsultas; override;
|
|
public
|
|
constructor Create(AOwner: TComponent); override;
|
|
published
|
|
property CodigoFactura : variant read FCodigoFactura write FCodigoFactura;
|
|
end;
|
|
|
|
var
|
|
dmInformeFacturaProforma: TdmInformeFacturaProforma;
|
|
|
|
implementation
|
|
|
|
{$R *.dfm}
|
|
|
|
{ TdmInformeFacturaProforma }
|
|
|
|
constructor TdmInformeFacturaProforma.Create(AOwner: TComponent);
|
|
begin
|
|
inherited;
|
|
FNombreInforme := 'InformeFacturaProforma.frf';
|
|
end;
|
|
|
|
procedure TdmInformeFacturaProforma.PrepararConsultas;
|
|
begin
|
|
inherited;
|
|
|
|
with TablaFacturasProforma do
|
|
begin
|
|
Database := FBaseDatos;
|
|
Transaction := FTransaccion;
|
|
SQL.Clear;
|
|
SQL.Add('select * from FACTURASPROFORMA ');
|
|
SQL.Add('where CODIGO = :CODIGO');
|
|
ParamByName('CODIGO').AsString := FCodigoFactura;
|
|
Prepare;
|
|
end;
|
|
|
|
with TablaDetallesFacturas do
|
|
begin
|
|
Database := FBaseDatos;
|
|
Transaction := FTransaccion;
|
|
SQL.Clear;
|
|
SQL.Add('select * from DETALLESFACTURASPROFORMAART ');
|
|
SQL.Add('where CODIGOFACTURA = :CODIGOFACTURA');
|
|
ParamByName('CODIGOFACTURA').AsString := FCodigoFactura;
|
|
Prepare;
|
|
end;
|
|
|
|
TablaCab.Open;
|
|
TablaDet.Open;
|
|
end;
|
|
|
|
end.
|