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