1996-10-04 17:04:00 +00:00
|
|
|
#ifndef _77STBA_H
|
|
|
|
#define _77STBA_H
|
|
|
|
|
|
|
|
#include "77stq.h"
|
|
|
|
|
|
|
|
HIDDEN const int BASE_FORMLEN = 73;
|
|
|
|
HIDDEN const int BASE_PAGINE = 4;
|
|
|
|
const int _RIGHE_N = 6;
|
|
|
|
const int _RIGHE_R = 2;
|
|
|
|
const int _RIGHE_P = 4;
|
|
|
|
const int _RIGHE_Q = 4;
|
|
|
|
const int _RIGHE_S = 4;
|
|
|
|
const int _RIGHE_T = 4;
|
|
|
|
|
|
|
|
class TBase1 : public TDicForm
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
long _codditta;
|
|
|
|
TRelation* r; // usate per contare i soci
|
|
|
|
TCursor* c;
|
|
|
|
bool _bAllegSoci;
|
|
|
|
long iContaSoci();
|
|
|
|
protected:
|
|
|
|
void stampa_corpo(TPrinter& pr);
|
|
|
|
void stampa_soci(TPrinter& pr);
|
|
|
|
bool bAllegSoci() const { return _bAllegSoci; }
|
|
|
|
virtual int dic_form_len() const;
|
|
|
|
virtual void next_page(TPrinter& pr) { fill_page(pr, -1); }
|
|
|
|
virtual void stampa_totali(TPrinter& pr) {}
|
|
|
|
virtual void aggiorna_totali(const char tipo) {}
|
|
|
|
virtual void set_body(TPrinter& pr, const char tipo) {}
|
|
|
|
virtual int prima_riga(PaginaQuadro p) const;
|
|
|
|
public:
|
|
|
|
virtual bool print(const long codditta, const long NumFis, const long NumNoFis);
|
|
|
|
TBase1(const char* sNomeForm, const char* quadro);
|
|
|
|
virtual ~TBase1();
|
|
|
|
};
|
|
|
|
|
|
|
|
class TBase2 : public TDicForm
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
long _codditta;
|
|
|
|
protected:
|
|
|
|
void stampa_corpo(TPrinter& pr);
|
|
|
|
virtual int dic_form_len() const { return BASE_FORMLEN; }
|
|
|
|
virtual void next_page(TPrinter& pr) { fill_page(pr, -1); }
|
|
|
|
virtual void set_body(TPrinter& pr, const char tipo) {}
|
|
|
|
virtual int prima_riga(PaginaQuadro p) const { return 4;}
|
|
|
|
public:
|
|
|
|
virtual bool print(const long codditta, const long NumFis, const long NumNoFis);
|
|
|
|
TBase2(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {}
|
|
|
|
virtual ~TBase2() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
class TBase3 : public TDicForm
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
bool _bAggiuntivoL; // se necessario stampare aggiuntivo L
|
|
|
|
protected:
|
|
|
|
void stampa_testata(TPrinter& pr);
|
|
|
|
void stampa_totali_L(TPrinter& pr);
|
|
|
|
bool aggiuntivoL() const { return _bAggiuntivoL; }
|
|
|
|
int stampa_L(TPrinter& pr,const int iChiaveL);
|
|
|
|
virtual int dic_form_len() const { return BASE_FORMLEN; }
|
|
|
|
virtual void next_page(TPrinter& pr) { fill_page(pr, -1); }
|
|
|
|
virtual void set_body(TPrinter& pr, const char tipo) {}
|
|
|
|
virtual int prima_riga(PaginaQuadro p) const { return 4;}
|
|
|
|
virtual long filtra(const long codditta);
|
|
|
|
public:
|
|
|
|
virtual bool print(const long codditta, const long NumFis, const long NumNoFis);
|
|
|
|
TBase3(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {}
|
|
|
|
virtual ~TBase3() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
const int _RIGA_TOTALI_L = 65;
|
|
|
|
|
|
|
|
class TRigaN : public TSortable
|
|
|
|
{
|
|
|
|
TRecnotype _pos;
|
|
|
|
int _MeseRif,_AnnoRif; // periodo di riferimento
|
|
|
|
real _ImpRimb,_CompAss; // importi
|
|
|
|
|
|
|
|
public:
|
|
|
|
virtual int compare(const TSortable& s) const;
|
|
|
|
TRecnotype pos() const { return _pos; }
|
|
|
|
|
|
|
|
const char* sMeseRif() const;
|
|
|
|
const char* sAnnoRif() const;
|
|
|
|
const int iMeseRif() const { return _MeseRif; }
|
|
|
|
const int iAnnoRif() const { return _AnnoRif; }
|
|
|
|
const char* ImpRimb(const char* pic) const { return _ImpRimb.string(pic); }
|
|
|
|
const char* CompAss(const char* pic) const { return _CompAss.string(pic); }
|
|
|
|
TRigaN(const TLocalisamfile& qn);
|
|
|
|
virtual ~TRigaN() { }
|
|
|
|
};
|
|
|
|
|
|
|
|
class TRigheNR : public TObject
|
|
|
|
{
|
|
|
|
TArray _data;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
const TRigaN& rigaN(int i) const { return (const TRigaN&)_data[i]; }
|
|
|
|
|
|
|
|
public:
|
|
|
|
const TRigaN& operator[](int i) const { return rigaN(i); }
|
|
|
|
|
|
|
|
int fill(const long codditta,TLocalisamfile& qnr);
|
|
|
|
int items() const { return _data.items(); }
|
|
|
|
void destroy() { _data.destroy(); }
|
|
|
|
TRigheNR() { }
|
|
|
|
virtual ~TRigheNR() { }
|
|
|
|
};
|
|
|
|
|
|
|
|
class TRigaQT : public TSortable
|
|
|
|
{
|
|
|
|
int _MesePag,_AnnoPag; // periodo di riferimento
|
|
|
|
real _ContVers,_ContRimb,_Interessi; // importi
|
|
|
|
TString _sCodReg;
|
|
|
|
TRecnotype _pos;
|
|
|
|
public:
|
|
|
|
virtual int compare(const TSortable& s) const;
|
|
|
|
TRecnotype pos() const { return _pos; }
|
|
|
|
const char* sMesePag() const;
|
|
|
|
const char* sAnnoPag() const;
|
|
|
|
const int iMesePag() const { return _MesePag; }
|
|
|
|
const int iAnnoPag() const { return _AnnoPag; }
|
|
|
|
const char* ContVers(const char* pic) const { return _ContVers.string(pic); }
|
|
|
|
const char* ContRimb(const char* pic) const { return _ContRimb.string(pic); }
|
|
|
|
const char* Interessi(const char* pic) const { return _Interessi.string(pic); }
|
|
|
|
const char* CodReg() const { return (const char*)_sCodReg; }
|
|
|
|
TRigaQT(const TLocalisamfile& qt);
|
|
|
|
virtual ~TRigaQT() { }
|
|
|
|
};
|
|
|
|
|
|
|
|
class TRigheQT : public TObject
|
|
|
|
{
|
|
|
|
TArray _data;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
const TRigaQT& rigaQT(int i) const { return (const TRigaQT&)_data[i]; }
|
|
|
|
|
|
|
|
public:
|
|
|
|
const TRigaQT& operator[](int i) const { return rigaQT(i); }
|
|
|
|
void destroy() { _data.destroy(); }
|
|
|
|
int fill(const long codditta,TLocalisamfile& qt);
|
|
|
|
int items() const { return _data.items(); }
|
|
|
|
|
|
|
|
TRigheQT() {}
|
|
|
|
virtual ~TRigheQT() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
class TRigaPS : public TSortable
|
|
|
|
{
|
|
|
|
TDate _dDv; // data vers.
|
|
|
|
real _rImp,_rIntDip,_rIntDat; // importi
|
|
|
|
TString _sTipoV,_sCodTrib,_sSerie,_sNumero;
|
|
|
|
TRecnotype _pos;
|
|
|
|
public:
|
|
|
|
virtual int compare(const TSortable& s) const;
|
|
|
|
TRecnotype pos() const { return _pos; }
|
|
|
|
TDate dDataVers() const { return _dDv; }
|
|
|
|
const char* sDataVers() const { return _dDv.string(); }
|
|
|
|
const char* sImposta() const;
|
|
|
|
const char* sIntDip() const;
|
|
|
|
const char* sIntDat() const;
|
|
|
|
const char* sImposta(const char* pic) const { return _rImp.string(pic); }
|
|
|
|
const char* sIntDip(const char* pic) const { return _rIntDip.string(pic); }
|
|
|
|
const char* sIntDat(const char* pic) const { return _rIntDat.string(pic); }
|
|
|
|
const char* sTipoVers() const { return (const char*)_sTipoV; }
|
|
|
|
const char* sCodTrib() const { return (const char*)_sCodTrib; }
|
|
|
|
const char* sSerie() const { return (const char*)_sSerie; }
|
|
|
|
const char* sNumero() const { return (const char*)_sNumero; }
|
|
|
|
TRigaPS(const TLocalisamfile& qt);
|
|
|
|
virtual ~TRigaPS() { }
|
|
|
|
};
|
|
|
|
|
|
|
|
class TRighePS : public TObject
|
|
|
|
{
|
|
|
|
TArray _data;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
const TRigaPS& rigaPS(int i) const { return (const TRigaPS&)_data[i]; }
|
|
|
|
|
|
|
|
public:
|
|
|
|
const TRigaPS& operator[](int i) const { return rigaPS(i); }
|
|
|
|
int fill(const long codditta,TLocalisamfile& ps);
|
|
|
|
void destroy() { _data.destroy(); }
|
|
|
|
int items() const { return _data.items(); }
|
|
|
|
TRighePS() {}
|
|
|
|
virtual ~TRighePS() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
class TBase4 : public TDicForm
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
long _codditta;
|
|
|
|
TRigheNR _righeNR; // array dei record N e R
|
|
|
|
TRigheQT _righeQT;
|
|
|
|
TRighePS _righePS;
|
|
|
|
bool _bAggN,_bAggP,_bAggR,_bAggQ,_bAggS,_bAggT;
|
|
|
|
protected:
|
|
|
|
void stampa_righe_vuote(TPrinter& pr,const int righe);
|
|
|
|
void fill_riga_QT(TPrint_section& sec,const int num);
|
|
|
|
void fill_riga_PS(TPrint_section& sec,const int num);
|
|
|
|
void fill_riga_NR(TPrint_section& sec,const int num, const int side);
|
|
|
|
void stampa_testata(TPrinter& pr);
|
|
|
|
void stampa_fine(TPrinter& pr);
|
|
|
|
void stampa_N(TPrinter& pr);
|
|
|
|
void stampa_P(TPrinter& pr);
|
|
|
|
void stampa_Q(TPrinter& pr);
|
|
|
|
void stampa_R(TPrinter& pr);
|
|
|
|
void stampa_S(TPrinter& pr);
|
|
|
|
void stampa_T(TPrinter& pr);
|
|
|
|
virtual int dic_form_len() const { return BASE_FORMLEN; }
|
|
|
|
virtual void next_page(TPrinter& pr) { fill_page(pr, -1); }
|
|
|
|
virtual void set_body(TPrinter& pr, const char tipo) {}
|
|
|
|
virtual int prima_riga(PaginaQuadro p) const { return 4;}
|
1996-10-07 17:02:34 +00:00
|
|
|
int calcola_firma();
|
1996-10-04 17:04:00 +00:00
|
|
|
public:
|
|
|
|
virtual bool print(const long codditta, const long NumFis, const long NumNoFis);
|
|
|
|
TBase4(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {}
|
|
|
|
virtual ~TBase4() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
const int _FIELD_L = 740;
|
|
|
|
|
|
|
|
class TStampaBase : public TStampaQuadro
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
TBase1* _fBase1;
|
|
|
|
TBase2* _fBase2;
|
|
|
|
TBase3* _fBase3;
|
|
|
|
TBase4* _fBase4;
|
|
|
|
TRelation* _rel;
|
|
|
|
protected:
|
|
|
|
virtual bool user_create();
|
|
|
|
virtual bool user_destroy();
|
|
|
|
virtual bool conta_tipi_per() const { return FALSE; }
|
|
|
|
virtual TDicForm* get_form() const { return _fBase1; }
|
1996-10-07 17:02:34 +00:00
|
|
|
virtual TCursor* get_cursor() const { return NULL; }
|
1996-10-04 17:04:00 +00:00
|
|
|
virtual bool print_quadro(const int OffsetDitta, const bool modulaser);
|
|
|
|
public:
|
|
|
|
TStampaBase(char livel) : TStampaQuadro("Base", livel) { }
|
|
|
|
};
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Quadro L aggiuntivo
|
|
|
|
//
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
class TQuadroL : public TDicForm
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
long _codditta;
|
|
|
|
real _rRitEff, _rRitVer;
|
|
|
|
protected:
|
|
|
|
void stampa_testata(TPrinter& pr);
|
|
|
|
void stampa_totali_L(TPrinter& pr);
|
|
|
|
bool stampa_L(TPrinter& pr,const long lStartRec,const int iRecL);
|
|
|
|
virtual void next_page(TPrinter& pr) { fill_page(pr, -1); }
|
|
|
|
virtual void set_body(TPrinter& pr, const char tipo) {}
|
|
|
|
virtual int prima_riga(PaginaQuadro p) const;
|
|
|
|
virtual long filtra(const long codditta);
|
|
|
|
void CalcolaTotalePrecedenti(TCursor* cur, const int _START_AGG_L);
|
|
|
|
public:
|
|
|
|
virtual bool print(const long codditta, const long NumFis, const long NumNoFis);
|
|
|
|
TQuadroL(const char* sNomeForm, const char* quadro) : _rRitEff(ZERO),_rRitVer(ZERO),TDicForm(sNomeForm, quadro) {}
|
|
|
|
virtual ~TQuadroL() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
class TStampaQuadroAggL : public TStampaQuadro
|
|
|
|
{
|
1996-10-07 17:02:34 +00:00
|
|
|
TQuadroL* _form;
|
|
|
|
TCursor* _cur;
|
1996-10-04 17:04:00 +00:00
|
|
|
protected:
|
|
|
|
virtual bool user_create();
|
|
|
|
virtual bool user_destroy();
|
|
|
|
virtual TDicForm* get_form() const { return _form; }
|
|
|
|
virtual TCursor* get_cursor() const { return _cur; }
|
|
|
|
virtual bool conta_tipi_per() const { return FALSE; }
|
|
|
|
public:
|
|
|
|
TStampaQuadroAggL(const char* quadro, char liv):TStampaQuadro(quadro, liv) {}
|
|
|
|
virtual ~TStampaQuadroAggL() { }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|