//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "TpvVntClt.h"
#include "TpvVntCltQR.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "ElastFrm"
#pragma link "TpvVntGeneral"
#pragma resource "*.dfm"
TVntClt *VntClt;
//---------------------------------------------------------------------------
__fastcall TVntClt::TVntClt(TComponent* Owner)
        : TVntGeneral(Owner)
{
  ImpagFact->Visible = false;
  TodasFact->Visible = false;
  TabSheet2->Visible = false;

  CodCliente = "Cliente";
  TableFactName="Ventas";

  TbVentasC->IndexName = "CodCliente (idx)";
  TbVentasC -> TableName = TableFactName+" (cabecera).db";
  TbVentasD -> TableName = TableFactName+" (cuerpo).db";

  DBMemo1->Enabled = true;
  DBMemo1->Visible = true;
  Label3->Visible = true;

#ifndef DEM001
  TbVentasD -> Active = true;
#endif
  TbVentasC -> Active = true;
  TbVentasF -> Active = true;
}
//---------------------------------------------------------------------------

void __fastcall TVntClt::SpeedButton7Click(TObject *Sender)
{
  TVntCltQR *QR;
  QR = new TVntCltQR(this);
  QR->QuickRep1->DataSet = TbClientes;
  QR->QRSubDetail1->DataSet = TbVentasC;
  QR->QuickRep1->Preview();
  delete QR;        
}
//---------------------------------------------------------------------------