Correzioni varie
git-svn-id: svn://10.65.10.50/trunk@3722 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4211510000
commit
db601f14b9
@ -88,6 +88,7 @@ void TBase1::stampa_soci(TPrinter& pr)
|
|||||||
TString sRagsoc,sSesso,sComuneNa,sProvNa,sDataNa,sCodFis,sCodQua;
|
TString sRagsoc,sSesso,sComuneNa,sProvNa,sDataNa,sCodFis,sCodQua;
|
||||||
for ((*c)=0L; c->pos() < c->items(); ++(*c))
|
for ((*c)=0L; c->pos() < c->items(); ++(*c))
|
||||||
{
|
{
|
||||||
|
TString sNome,sCognome;
|
||||||
TPrintrow& rg=fut.row(i++);
|
TPrintrow& rg=fut.row(i++);
|
||||||
sCodQua=c->file().get("RICQUAL");
|
sCodQua=c->file().get("RICQUAL");
|
||||||
sRagsoc=c->file(LF_ANAG).get("RAGSOC");
|
sRagsoc=c->file(LF_ANAG).get("RAGSOC");
|
||||||
@ -95,8 +96,15 @@ void TBase1::stampa_soci(TPrinter& pr)
|
|||||||
sDataNa=c->file(LF_ANAGFIS).get("DATANASC");
|
sDataNa=c->file(LF_ANAGFIS).get("DATANASC");
|
||||||
sSesso=c->file(LF_ANAGFIS).get("SESSO");
|
sSesso=c->file(LF_ANAGFIS).get("SESSO");
|
||||||
sComuneNa=c->file(LF_COMUNI).get("DENCOM");
|
sComuneNa=c->file(LF_COMUNI).get("DENCOM");
|
||||||
|
sComuneNa.cut(28);
|
||||||
sProvNa=c->file(LF_COMUNI).get("PROVCOM");
|
sProvNa=c->file(LF_COMUNI).get("PROVCOM");
|
||||||
fut.field(0).set(sRagsoc);
|
fut.field(0).set(sRagsoc);
|
||||||
|
sCognome=sRagsoc.left(30);
|
||||||
|
sCognome.trim();
|
||||||
|
sNome=sRagsoc.mid(30,0);
|
||||||
|
sNome.trim();
|
||||||
|
sRagsoc = sCognome;
|
||||||
|
sRagsoc << " " << sNome;
|
||||||
rg.put(sRagsoc,fut.field(0).x()-1);
|
rg.put(sRagsoc,fut.field(0).x()-1);
|
||||||
fut.field(1).set(sSesso);
|
fut.field(1).set(sSesso);
|
||||||
rg.put(sSesso,fut.field(1).x()-1);
|
rg.put(sSesso,fut.field(1).x()-1);
|
||||||
@ -215,7 +223,7 @@ int TBase3::stampa_L(TPrinter& pr,const int iChiaveL)
|
|||||||
else
|
else
|
||||||
cur.setkey(2);
|
cur.setkey(2);
|
||||||
|
|
||||||
filtra(_codditta);
|
// filtra(_codditta);
|
||||||
|
|
||||||
bool finito=FALSE;
|
bool finito=FALSE;
|
||||||
int righe=0;
|
int righe=0;
|
||||||
@ -481,6 +489,26 @@ int TRighePS::fill(const long codditta,TLocalisamfile& ps)
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int TBase4::calcola_firma()
|
||||||
|
{
|
||||||
|
TPrint_section& totali = section('F', first_page);
|
||||||
|
TForm_item& signature = totali.find_field(829);
|
||||||
|
const int y = signature.y();
|
||||||
|
|
||||||
|
TString cognome = signature.get();
|
||||||
|
if (cognome.len() > 30 && cognome[29] == ' ')
|
||||||
|
{
|
||||||
|
TString nome = cognome.mid(30, -1);
|
||||||
|
cognome.cut(30); cognome.trim();
|
||||||
|
cognome << ' ' << nome;
|
||||||
|
signature.set(cognome);
|
||||||
|
|
||||||
|
totali.row(y-1).reset();
|
||||||
|
totali.row(y-1).put(cognome, signature.x()-1);
|
||||||
|
}
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
|
||||||
void TBase4::stampa_testata(TPrinter& pr)
|
void TBase4::stampa_testata(TPrinter& pr)
|
||||||
{
|
{
|
||||||
TPrint_section& hh = section('H', first_page);
|
TPrint_section& hh = section('H', first_page);
|
||||||
@ -499,10 +527,10 @@ void TBase4::stampa_testata(TPrinter& pr)
|
|||||||
void TBase4::fill_riga_QT(TPrint_section& sec,const int num)
|
void TBase4::fill_riga_QT(TPrint_section& sec,const int num)
|
||||||
{
|
{
|
||||||
TString sVal;
|
TString sVal;
|
||||||
int start=0,end=5;
|
int start=1,end=6;
|
||||||
for (int i = start; i < end; i++)
|
for (int i = start; i <= end; i++)
|
||||||
{
|
{
|
||||||
TForm_item& fi = sec.field(i);
|
TForm_item& fi = sec.find_field(i);
|
||||||
if (num < _righeQT.items())
|
if (num < _righeQT.items())
|
||||||
{
|
{
|
||||||
const TRigaQT& rN = _righeQT[num];
|
const TRigaQT& rN = _righeQT[num];
|
||||||
@ -582,10 +610,10 @@ void TBase4::stampa_T(TPrinter& pr)
|
|||||||
void TBase4::fill_riga_PS(TPrint_section& sec,const int num)
|
void TBase4::fill_riga_PS(TPrint_section& sec,const int num)
|
||||||
{
|
{
|
||||||
TString sVal;
|
TString sVal;
|
||||||
int start=0,end=7;
|
int start=1,end=8;
|
||||||
for (int i = start; i < end; i++)
|
for (int i = start; i <= end; i++)
|
||||||
{
|
{
|
||||||
TForm_item& fi = sec.field(i);
|
TForm_item& fi = sec.find_field(i);
|
||||||
if (num < _righePS.items())
|
if (num < _righePS.items())
|
||||||
{
|
{
|
||||||
const TRigaPS& rN = _righePS[num];
|
const TRigaPS& rN = _righePS[num];
|
||||||
@ -775,7 +803,7 @@ void TBase4::stampa_N(TPrinter& pr)
|
|||||||
void TBase4::stampa_fine(TPrinter& pr)
|
void TBase4::stampa_fine(TPrinter& pr)
|
||||||
{
|
{
|
||||||
TPrint_section& sec = section('F', first_page);
|
TPrint_section& sec = section('F', first_page);
|
||||||
|
const int lasty = calcola_firma();
|
||||||
sec.reset();
|
sec.reset();
|
||||||
sec.update();
|
sec.update();
|
||||||
const int hhr = sec.height();
|
const int hhr = sec.height();
|
||||||
@ -821,14 +849,10 @@ bool TStampaBase::user_create()
|
|||||||
// Adesso bisogna chiamare set_cursor per impostare il cursore dentro
|
// Adesso bisogna chiamare set_cursor per impostare il cursore dentro
|
||||||
// al form. Sarebbe meglio fare in modo che il form usi sempre il cursore
|
// al form. Sarebbe meglio fare in modo che il form usi sempre il cursore
|
||||||
// letto dal .frm, senza bisogno di passarglielo dall'applicazione
|
// letto dal .frm, senza bisogno di passarglielo dall'applicazione
|
||||||
_cur = _fBase1->TForm::cursor();
|
_fBase1->set_cursor(_fBase1->TForm::cursor());
|
||||||
_fBase1->set_cursor(_cur);
|
_fBase2->set_cursor(_fBase2->TForm::cursor());
|
||||||
_cur2 = _fBase2->TForm::cursor();
|
_fBase3->set_cursor(_fBase3->TForm::cursor());
|
||||||
_fBase2->set_cursor(_cur2);
|
_fBase4->set_cursor(_fBase4->TForm::cursor());
|
||||||
_cur3 = _fBase3->TForm::cursor();
|
|
||||||
_fBase3->set_cursor(_cur3);
|
|
||||||
_cur4 = _fBase4->TForm::cursor();
|
|
||||||
_fBase4->set_cursor(_cur4);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -914,10 +938,15 @@ bool TStampaBase::print_quadro(const int OffsetDitta, const bool modulaser)
|
|||||||
|
|
||||||
int TQuadroL::prima_riga(PaginaQuadro p) const
|
int TQuadroL::prima_riga(PaginaQuadro p) const
|
||||||
{
|
{
|
||||||
if (p==PRIMA && _PaginaPosizionamento)
|
if (p==PRIMA)
|
||||||
|
{
|
||||||
|
if (_PaginaPosizionamento)
|
||||||
return 8;
|
return 8;
|
||||||
else
|
else
|
||||||
return 8+HEADER_PRIMA_NOPOS;
|
return 8+HEADER_PRIMA_NOPOS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -954,6 +983,9 @@ bool TQuadroL::stampa_L(TPrinter& pr,const long lStartRec,const int iRecL)
|
|||||||
TPrint_section& body = section('B', odd_page);
|
TPrint_section& body = section('B', odd_page);
|
||||||
body.reset();
|
body.reset();
|
||||||
TCursor& cur = *cursor();
|
TCursor& cur = *cursor();
|
||||||
|
if (lStartRec > cur.items())
|
||||||
|
return TRUE;
|
||||||
|
else
|
||||||
cur=lStartRec;
|
cur=lStartRec;
|
||||||
bool finito=FALSE;
|
bool finito=FALSE;
|
||||||
int righe=0;
|
int righe=0;
|
||||||
@ -1026,6 +1058,7 @@ bool TQuadroL::print(const long codditta, const long NumFis, const long NumNoFis
|
|||||||
if (!finito)
|
if (!finito)
|
||||||
{
|
{
|
||||||
lOffsetL+=_REC_PRIMA_AGG_L;
|
lOffsetL+=_REC_PRIMA_AGG_L;
|
||||||
|
jump_to_line(pr, prima_riga(SECONDA));
|
||||||
finito=stampa_L(pr,lOffsetL,_REC_SECONDA_AGG_L);
|
finito=stampa_L(pr,lOffsetL,_REC_SECONDA_AGG_L);
|
||||||
}
|
}
|
||||||
if (finito)
|
if (finito)
|
||||||
@ -1043,6 +1076,8 @@ bool TStampaQuadroAggL::user_create()
|
|||||||
{
|
{
|
||||||
_form = new TQuadroL("77QL", quadro());
|
_form = new TQuadroL("77QL", quadro());
|
||||||
_form->set_cursor(_form->TForm::cursor());
|
_form->set_cursor(_form->TForm::cursor());
|
||||||
|
// init anche di _cur nell'applicazione
|
||||||
|
_cur = _form->cursor();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,6 +215,7 @@ class TBase4 : public TDicForm
|
|||||||
virtual void next_page(TPrinter& pr) { fill_page(pr, -1); }
|
virtual void next_page(TPrinter& pr) { fill_page(pr, -1); }
|
||||||
virtual void set_body(TPrinter& pr, const char tipo) {}
|
virtual void set_body(TPrinter& pr, const char tipo) {}
|
||||||
virtual int prima_riga(PaginaQuadro p) const { return 4;}
|
virtual int prima_riga(PaginaQuadro p) const { return 4;}
|
||||||
|
int calcola_firma();
|
||||||
public:
|
public:
|
||||||
virtual bool print(const long codditta, const long NumFis, const long NumNoFis);
|
virtual bool print(const long codditta, const long NumFis, const long NumNoFis);
|
||||||
TBase4(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {}
|
TBase4(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {}
|
||||||
@ -231,16 +232,13 @@ class TStampaBase : public TStampaQuadro
|
|||||||
TBase3* _fBase3;
|
TBase3* _fBase3;
|
||||||
TBase4* _fBase4;
|
TBase4* _fBase4;
|
||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
TCursor* _cur, *_cur2, *_cur3, *_cur4;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool user_create();
|
virtual bool user_create();
|
||||||
virtual bool user_destroy();
|
virtual bool user_destroy();
|
||||||
virtual bool conta_tipi_per() const { return FALSE; }
|
virtual bool conta_tipi_per() const { return FALSE; }
|
||||||
virtual TDicForm* get_form() const { return _fBase1; }
|
virtual TDicForm* get_form() const { return _fBase1; }
|
||||||
virtual TCursor* get_cursor() const { return _cur; }
|
virtual TCursor* get_cursor() const { return NULL; }
|
||||||
virtual bool print_quadro(const int OffsetDitta, const bool modulaser);
|
virtual bool print_quadro(const int OffsetDitta, const bool modulaser);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TStampaBase(char livel) : TStampaQuadro("Base", livel) { }
|
TStampaBase(char livel) : TStampaQuadro("Base", livel) { }
|
||||||
};
|
};
|
||||||
|
@ -50,10 +50,10 @@ void TDicForm::set_cofi_dic(const char* cofi)
|
|||||||
_codditta_dic = sogg_estinto(_codditta);
|
_codditta_dic = sogg_estinto(_codditta);
|
||||||
}
|
}
|
||||||
|
|
||||||
TCursor& TDicForm::cur()
|
/*TCursor& TDicForm::cur()
|
||||||
{
|
{
|
||||||
return *_cur;
|
return *_cur;
|
||||||
}
|
} */
|
||||||
|
|
||||||
void TDicForm::set_cursor(TCursor* cur)
|
void TDicForm::set_cursor(TCursor* cur)
|
||||||
{
|
{
|
||||||
|
@ -171,7 +171,7 @@ class TDicForm : public TForm
|
|||||||
int num_foglio() const { return _num_foglio; }
|
int num_foglio() const { return _num_foglio; }
|
||||||
virtual void azzera_totali();
|
virtual void azzera_totali();
|
||||||
PaginaQuadro curr_page() const { return _PaginaCorrente; }
|
PaginaQuadro curr_page() const { return _PaginaCorrente; }
|
||||||
TCursor& cur();
|
// TCursor& cur();
|
||||||
|
|
||||||
void set_progind(TProgind* prog) { _prog = prog; }
|
void set_progind(TProgind* prog) { _prog = prog; }
|
||||||
TProgind* progind() { return _prog; }
|
TProgind* progind() { return _prog; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user