This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
FactuGES/Informes/InformeFacturaProforma.pas
2007-06-26 08:08:27 +00:00

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.