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

46 lines
1.4 KiB
C++

//---------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "TpvVntCltQR.h"
#include "TpvVntGeneral.h"
//---------------------------------------------------------------------
#pragma resource "*.dfm"
TVntCltQR *VntCltQR;
//---------------------------------------------------------------------
__fastcall TVntCltQR::TVntCltQR(TComponent* AOwner)
: TForm(AOwner)
{
My_AOwner = AOwner;
}
//---------------------------------------------------------------------
void __fastcall TVntCltQR::DetailBand1BeforePrint(TQRCustomBand *Sender,
bool &PrintBand)
{
TotalSin = 0;
TotalIVA = 0;
}
//---------------------------------------------------------------------------
void __fastcall TVntCltQR::GroupFooterBand1BeforePrint(
TQRCustomBand *Sender, bool &PrintBand)
{
QRTotalSin->Caption = FormatCurr("###,###,###.#0", TotalSin );
QRTotalIva->Caption = FormatCurr("###,###,###.#0", TotalIVA );
QRTotal->Caption = FormatCurr("###,###,###.#0", TotalSin + TotalIVA );
}
//---------------------------------------------------------------------------
void __fastcall TVntCltQR::QRSubDetail1AfterPrint(TQRCustomBand *Sender,
bool BandPrinted)
{
if ( BandPrinted )
{
TotalSin += QRSubDetail1->DataSet->FieldByName("TotalSin")->AsCurrency;
TotalIVA += QRSubDetail1->DataSet->FieldByName("TotalIva")->AsCurrency;
}
}
//---------------------------------------------------------------------------