TPVwin/TpvVntEmpl.cpp
2021-09-12 22:19:30 +02:00

53 lines
1.4 KiB
C++

//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "TpvVntEmpl.h"
#include "TpvVntCltQR.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "ElastFrm"
#pragma link "TpvVntGeneral"
#pragma resource "*.dfm"
TVntEmpl *VntEmpl;
//---------------------------------------------------------------------------
__fastcall TVntEmpl::TVntEmpl(TComponent* Owner)
: TVntGeneral(Owner)
{
ImpagFact->Visible = false;
TodasFact->Visible = false;
TabSheet2->Visible = false;
CodCliente = "Empleado";
TableFactName="Ventas";
TbVentasC->IndexName = "CodEmpleado (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 TVntEmpl::SpeedButton7Click(TObject *Sender)
{
TVntCltQR *QR;
QR = new TVntCltQR(this);
QR->QuickRep1->ReportTitle = "Venta por empleado";
QR->QuickRep1->DataSet = TbClientes;
QR->QRSubDetail1->DataSet = TbVentasC;
QR->QuickRep1->Preview();
delete QR;
}
//---------------------------------------------------------------------------