Corrette stampe dei quadri B e H
git-svn-id: svn://10.65.10.50/trunk@3759 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1ec5595d26
commit
00b955bd64
@ -356,6 +356,7 @@ BEGIN
|
||||
PROMPT 22 7 ""
|
||||
PICTURE "###.###.###^^^"
|
||||
FIELD ABBATT
|
||||
MESSAGE ADD,FL->23
|
||||
END
|
||||
|
||||
NUMERO 24
|
||||
@ -424,7 +425,7 @@ END
|
||||
NUMERO 31
|
||||
BEGIN
|
||||
KEY "ALIQUOTA"
|
||||
PROMPT 28 9 ""
|
||||
PROMPT 27 9 ""
|
||||
PICTURE "##@,@@"
|
||||
FIELD ALIQUOTA
|
||||
END
|
||||
@ -449,7 +450,7 @@ NUMERO 34
|
||||
BEGIN
|
||||
KEY "IMPONIBILE T.F.R."
|
||||
PROMPT 57 9 ""
|
||||
PICTURE "#.###.###.###^^^"
|
||||
PICTURE "###.###.###^^^"
|
||||
FIELD IMPTFR
|
||||
MESSAGE ADD,FL->34
|
||||
END
|
||||
@ -561,6 +562,13 @@ BEGIN
|
||||
PICTURE "#.###.###.###^^^"
|
||||
END
|
||||
|
||||
NUMERO 23
|
||||
BEGIN
|
||||
KEY "ABBATTIMENTO"
|
||||
PROMPT 22 3 ""
|
||||
PICTURE "###.###.###^^^"
|
||||
END
|
||||
|
||||
NUMERO 24
|
||||
BEGIN
|
||||
KEY "AMMONTARE NETTO"
|
||||
|
492
m770/77stba.cpp
492
m770/77stba.cpp
@ -111,15 +111,15 @@ void TBase1::stampa_soci(TPrinter& pr)
|
||||
sComuneNa.cut(28);
|
||||
sProvNa=c->file(LF_COMUNI).get("PROVCOM");
|
||||
// fut.field(0).set(sRagsoc);
|
||||
sRagsoc:=fut.field(0).get();
|
||||
sRagsoc=fut.field(0).get();
|
||||
if (sRagsoc.len() > 30 && sRagsoc[30] != ' ')
|
||||
{
|
||||
sCognome=sRagsoc.left(30);
|
||||
sCognome.trim();
|
||||
sNome=sRagsoc.mid(30,0);
|
||||
sNome.trim();
|
||||
sRagsoc = sCognome;
|
||||
sRagsoc << " " << sNome;
|
||||
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);
|
||||
@ -246,23 +246,23 @@ int TBase3::stampa_L(TPrinter& pr,const int iChiaveL)
|
||||
while (!finito)
|
||||
{
|
||||
body.update();
|
||||
const int body_righe = body.height();
|
||||
for (int i = 0; i < body_righe; i++)
|
||||
{
|
||||
TPrintrow& rr=body.row(i);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
_RigaCorr++;
|
||||
}
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
righe++;
|
||||
++cur;
|
||||
codit=cur.file().get_long("CODDITTA");
|
||||
bool buono=codit==_codditta;
|
||||
const int body_righe = body.height();
|
||||
for (int i = 0; i < body_righe; i++)
|
||||
{
|
||||
TPrintrow& rr=body.row(i);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
_RigaCorr++;
|
||||
}
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
righe++;
|
||||
++cur;
|
||||
codit=cur.file().get_long("CODDITTA");
|
||||
bool buono=codit==_codditta;
|
||||
// Guarda se e' necessario stampare l'aggiuntivo
|
||||
_bAggiuntivoL = buono && righe>14;
|
||||
finito=righe>14 || codit!=_codditta;
|
||||
_bAggiuntivoL = buono && righe>14;
|
||||
finito=righe>14 || codit!=_codditta;
|
||||
}
|
||||
return righe;
|
||||
}
|
||||
@ -471,10 +471,10 @@ TRigaPS::TRigaPS(const TLocalisamfile& qt)
|
||||
_rImp = rec.get_real("IMPOSTA");
|
||||
_rIntDip = rec.get_real("INTERDIP");
|
||||
_rIntDat = rec.get_real("INTERDAT");
|
||||
_sTipoV = rec.get("TIPOVERS");
|
||||
_sCodTrib= rec.get("CODTRIB");
|
||||
_sSerie = rec.get("SERIE");
|
||||
_sNumero = rec.get("NUMERO");
|
||||
_sTipoV = rec.get("TIPOVERS");
|
||||
_sCodTrib= rec.get("CODTRIB");
|
||||
_sSerie = rec.get("SERIE");
|
||||
_sNumero = rec.get("NUMERO");
|
||||
}
|
||||
|
||||
int TRighePS::fill(const long codditta,TLocalisamfile& ps)
|
||||
@ -550,24 +550,24 @@ void TBase4::fill_riga_QT(TPrint_section& sec,const int num)
|
||||
if (num < _righeQT.items())
|
||||
{
|
||||
const TRigaQT& rN = _righeQT[num];
|
||||
if (i==start)
|
||||
sVal=rN.sMesePag();
|
||||
else if (i==start+1)
|
||||
sVal=rN.sAnnoPag();
|
||||
else if (i==start+2)
|
||||
sVal=rN.ContVers(fi.picture());
|
||||
else if (i==start+3)
|
||||
sVal=rN.ContRimb(fi.picture());
|
||||
else if (i==start+4)
|
||||
sVal=rN.Interessi(fi.picture());
|
||||
else if (i==start+5)
|
||||
sVal=rN.CodReg();
|
||||
}
|
||||
else
|
||||
sVal="";
|
||||
fi.set(sVal);
|
||||
TPrintrow& row=sec.row(0);
|
||||
row.put(sVal,fi.x()-1);
|
||||
if (i==start)
|
||||
sVal=rN.sMesePag();
|
||||
else if (i==start+1)
|
||||
sVal=rN.sAnnoPag();
|
||||
else if (i==start+2)
|
||||
sVal=rN.ContVers(fi.picture());
|
||||
else if (i==start+3)
|
||||
sVal=rN.ContRimb(fi.picture());
|
||||
else if (i==start+4)
|
||||
sVal=rN.Interessi(fi.picture());
|
||||
else if (i==start+5)
|
||||
sVal=rN.CodReg();
|
||||
}
|
||||
else
|
||||
sVal="";
|
||||
fi.set(sVal);
|
||||
TPrintrow& row=sec.row(0);
|
||||
row.put(sVal,fi.x()-1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -586,11 +586,11 @@ void TBase4::stampa_Q(TPrinter& pr)
|
||||
{
|
||||
// Stampa la parte sinistra (primi 4 campi)
|
||||
fill_riga_QT(body,riga);
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
FinitaSezione=riga>_RIGHE_Q-1;
|
||||
@ -614,11 +614,11 @@ void TBase4::stampa_T(TPrinter& pr)
|
||||
{
|
||||
// Stampa la parte sinistra (primi 4 campi)
|
||||
fill_riga_QT(body,riga);
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
FinitaSezione=riga>_RIGHE_T-1;
|
||||
@ -635,31 +635,31 @@ void TBase4::fill_riga_PS(TPrint_section& sec,const int num)
|
||||
if (num < _righePS.items())
|
||||
{
|
||||
const TRigaPS& rN = _righePS[num];
|
||||
if (i==start)
|
||||
sVal=rN.sImposta(fi.picture());
|
||||
else if (i==start+1)
|
||||
sVal=rN.sIntDip(fi.picture());
|
||||
else if (i==start+2)
|
||||
sVal=rN.sIntDat(fi.picture());
|
||||
else if (i==start+3)
|
||||
sVal=rN.sTipoVers();
|
||||
else if (i==start+4)
|
||||
sVal=rN.sCodTrib();
|
||||
else if (i==start+5)
|
||||
if (i==start)
|
||||
sVal=rN.sImposta(fi.picture());
|
||||
else if (i==start+1)
|
||||
sVal=rN.sIntDip(fi.picture());
|
||||
else if (i==start+2)
|
||||
sVal=rN.sIntDat(fi.picture());
|
||||
else if (i==start+3)
|
||||
sVal=rN.sTipoVers();
|
||||
else if (i==start+4)
|
||||
sVal=rN.sCodTrib();
|
||||
else if (i==start+5)
|
||||
{
|
||||
sDep=rN.sDataVers();
|
||||
sVal.picture(fi.picture(),sDep);
|
||||
}
|
||||
else if (i==start+6)
|
||||
sVal=rN.sSerie();
|
||||
else if (i==start+7)
|
||||
sVal=rN.sNumero();
|
||||
}
|
||||
else
|
||||
sVal="";
|
||||
fi.set(sVal);
|
||||
TPrintrow& row=sec.row(0);
|
||||
row.put(sVal,fi.x()-1);
|
||||
sDep=rN.sDataVers();
|
||||
sVal.picture(fi.picture(),sDep);
|
||||
}
|
||||
else if (i==start+6)
|
||||
sVal=rN.sSerie();
|
||||
else if (i==start+7)
|
||||
sVal=rN.sNumero();
|
||||
}
|
||||
else
|
||||
sVal="";
|
||||
fi.set(sVal);
|
||||
TPrintrow& row=sec.row(0);
|
||||
row.put(sVal,fi.x()-1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -679,11 +679,11 @@ void TBase4::stampa_P(TPrinter& pr)
|
||||
{
|
||||
// Stampa la parte sinistra (primi 4 campi)
|
||||
fill_riga_PS(body,riga);
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
FinitaSezione=riga>_RIGHE_P-1;
|
||||
@ -707,11 +707,11 @@ void TBase4::stampa_S(TPrinter& pr)
|
||||
{
|
||||
// Stampa la parte sinistra (primi 4 campi)
|
||||
fill_riga_PS(body,riga);
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
FinitaSezione=riga>_RIGHE_S-1;
|
||||
@ -734,8 +734,8 @@ void TBase4::stampa_R(TPrinter& pr)
|
||||
fill_riga_NR(body,1,1);
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
_RigaCorr++;
|
||||
rr.reset();
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
// Salta due righe alla fine
|
||||
@ -762,31 +762,31 @@ void TBase4::fill_riga_NR(TPrint_section& sec,const int num, const int side)
|
||||
if (num < _righeNR.items())
|
||||
{
|
||||
const TRigaN& rN = _righeNR[num];
|
||||
if (i==start)
|
||||
sVal=rN.sMeseRif();
|
||||
else if (i==start+1)
|
||||
sVal=rN.sAnnoRif();
|
||||
else if (i==start+2)
|
||||
sVal=rN.ImpRimb(fi.picture());
|
||||
else if (i==start+3)
|
||||
sVal=rN.CompAss(fi.picture());
|
||||
}
|
||||
else
|
||||
sVal="";
|
||||
fi.set(sVal);
|
||||
TPrintrow& row=sec.row(0);
|
||||
row.put(sVal,fi.x()-1);
|
||||
if (i==start)
|
||||
sVal=rN.sMeseRif();
|
||||
else if (i==start+1)
|
||||
sVal=rN.sAnnoRif();
|
||||
else if (i==start+2)
|
||||
sVal=rN.ImpRimb(fi.picture());
|
||||
else if (i==start+3)
|
||||
sVal=rN.CompAss(fi.picture());
|
||||
}
|
||||
else
|
||||
sVal="";
|
||||
fi.set(sVal);
|
||||
TPrintrow& row=sec.row(0);
|
||||
row.put(sVal,fi.x()-1);
|
||||
}
|
||||
}
|
||||
|
||||
void TBase4::stampa_righe_vuote(TPrinter& pr,const int righe)
|
||||
{
|
||||
TPrintrow rr;
|
||||
TPrintrow rr;
|
||||
for (int i=0; i<righe; i++)
|
||||
{
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
_RigaCorr++;
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
}
|
||||
@ -811,11 +811,11 @@ void TBase4::stampa_N(TPrinter& pr)
|
||||
fill_riga_NR(body,num,0);
|
||||
num+=3;
|
||||
fill_riga_NR(body,num,1);
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
num-=2;
|
||||
@ -1023,20 +1023,20 @@ bool TQuadroL::stampa_L(TPrinter& pr,const long lStartRec,const int iRecL)
|
||||
while (!finito)
|
||||
{
|
||||
body.update();
|
||||
const int body_righe = body.height();
|
||||
for (int i = 0; i < body_righe; i++)
|
||||
{
|
||||
TPrintrow& rr=body.row(i);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
_RigaCorr++;
|
||||
}
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
righe++;
|
||||
++cur;
|
||||
eof=cur.pos()==cur.items()-1;
|
||||
finito = (righe==iRecL-1) || eof;
|
||||
const int body_righe = body.height();
|
||||
for (int i = 0; i < body_righe; i++)
|
||||
{
|
||||
TPrintrow& rr=body.row(i);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
_RigaCorr++;
|
||||
}
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
righe++;
|
||||
++cur;
|
||||
eof=cur.pos()==cur.items()-1;
|
||||
finito = (righe==iRecL-1) || eof;
|
||||
}
|
||||
return eof;
|
||||
}
|
||||
@ -1085,21 +1085,21 @@ bool TQuadroL::print(const long codditta, const long NumFis, const long NumNoFis
|
||||
bool finito=FALSE;
|
||||
while (!finito)
|
||||
{
|
||||
jump_to_line(pr, prima_riga(PRIMA));
|
||||
stampa_testata(pr);
|
||||
finito=stampa_L(pr,lOffsetL,_REC_PRIMA_AGG_L);
|
||||
jump_to_line(pr, prima_riga(PRIMA));
|
||||
stampa_testata(pr);
|
||||
finito=stampa_L(pr,lOffsetL,_REC_PRIMA_AGG_L);
|
||||
next_page(pr);
|
||||
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)
|
||||
{
|
||||
jump_to_line(pr,_RIGA_TOTALI_AGG_L);
|
||||
stampa_totali_L(pr);
|
||||
}
|
||||
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)
|
||||
{
|
||||
jump_to_line(pr,_RIGA_TOTALI_AGG_L);
|
||||
stampa_totali_L(pr);
|
||||
}
|
||||
next_page(pr);
|
||||
}
|
||||
close_print();
|
||||
@ -1176,24 +1176,24 @@ int TQuadroN::prima_riga(PaginaQuadro p) const
|
||||
if (num < _righeQT.items())
|
||||
{
|
||||
const TRigaQT& rN = _righeQT[num];
|
||||
if (i==start)
|
||||
sVal=rN.sMesePag();
|
||||
else if (i==start+1)
|
||||
sVal=rN.sAnnoPag();
|
||||
else if (i==start+2)
|
||||
sVal=rN.ContVers(fi.picture());
|
||||
else if (i==start+3)
|
||||
sVal=rN.ContRimb(fi.picture());
|
||||
else if (i==start+4)
|
||||
sVal=rN.Interessi(fi.picture());
|
||||
else if (i==start+5)
|
||||
sVal=rN.CodReg();
|
||||
}
|
||||
else
|
||||
sVal="";
|
||||
fi.set(sVal);
|
||||
TPrintrow& row=sec.row(0);
|
||||
row.put(sVal,fi.x()-1);
|
||||
if (i==start)
|
||||
sVal=rN.sMesePag();
|
||||
else if (i==start+1)
|
||||
sVal=rN.sAnnoPag();
|
||||
else if (i==start+2)
|
||||
sVal=rN.ContVers(fi.picture());
|
||||
else if (i==start+3)
|
||||
sVal=rN.ContRimb(fi.picture());
|
||||
else if (i==start+4)
|
||||
sVal=rN.Interessi(fi.picture());
|
||||
else if (i==start+5)
|
||||
sVal=rN.CodReg();
|
||||
}
|
||||
else
|
||||
sVal="";
|
||||
fi.set(sVal);
|
||||
TPrintrow& row=sec.row(0);
|
||||
row.put(sVal,fi.x()-1);
|
||||
}
|
||||
} */
|
||||
|
||||
@ -1208,28 +1208,28 @@ void TBase4::fill_riga_PS(TPrint_section& sec,const int num)
|
||||
if (num < _righePS.items())
|
||||
{
|
||||
const TRigaPS& rN = _righePS[num];
|
||||
if (i==start)
|
||||
sVal=rN.sImposta(fi.picture());
|
||||
else if (i==start+1)
|
||||
sVal=rN.sIntDip(fi.picture());
|
||||
else if (i==start+2)
|
||||
sVal=rN.sIntDat(fi.picture());
|
||||
else if (i==start+3)
|
||||
sVal=rN.sTipoVers();
|
||||
else if (i==start+4)
|
||||
sVal=rN.sCodTrib();
|
||||
else if (i==start+5)
|
||||
sVal=rN.sDataVers();
|
||||
else if (i==start+6)
|
||||
sVal=rN.sSerie();
|
||||
else if (i==start+7)
|
||||
sVal=rN.sNumero();
|
||||
}
|
||||
else
|
||||
sVal="";
|
||||
fi.set(sVal);
|
||||
TPrintrow& row=sec.row(0);
|
||||
row.put(sVal,fi.x()-1);
|
||||
if (i==start)
|
||||
sVal=rN.sImposta(fi.picture());
|
||||
else if (i==start+1)
|
||||
sVal=rN.sIntDip(fi.picture());
|
||||
else if (i==start+2)
|
||||
sVal=rN.sIntDat(fi.picture());
|
||||
else if (i==start+3)
|
||||
sVal=rN.sTipoVers();
|
||||
else if (i==start+4)
|
||||
sVal=rN.sCodTrib();
|
||||
else if (i==start+5)
|
||||
sVal=rN.sDataVers();
|
||||
else if (i==start+6)
|
||||
sVal=rN.sSerie();
|
||||
else if (i==start+7)
|
||||
sVal=rN.sNumero();
|
||||
}
|
||||
else
|
||||
sVal="";
|
||||
fi.set(sVal);
|
||||
TPrintrow& row=sec.row(0);
|
||||
row.put(sVal,fi.x()-1);
|
||||
}
|
||||
} */
|
||||
|
||||
@ -1249,11 +1249,11 @@ void TQuadroN::stampa_N(TPrinter& pr)
|
||||
fill_riga_NR(body,num,0);
|
||||
num+=3;
|
||||
fill_riga_NR(body,num,1);
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
num-=2;
|
||||
@ -1275,11 +1275,11 @@ void TQuadroN::stampa_P(TPrinter& pr)
|
||||
{
|
||||
// Stampa la parte sinistra (primi 4 campi)
|
||||
fill_riga_PS(body,riga);
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
FinitaSezione=riga>_RIGHE_PA-1;
|
||||
@ -1299,11 +1299,11 @@ void TQuadroN::stampa_Q(TPrinter& pr)
|
||||
{
|
||||
// Stampa la parte sinistra (primi 4 campi)
|
||||
fill_riga_QT(body,riga);
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
FinitaSezione=riga>_RIGHE_QA-1;
|
||||
@ -1324,17 +1324,17 @@ void TQuadroN::stampa_R(TPrinter& pr)
|
||||
bool FinitaSezione=FALSE;
|
||||
while (!FinitaSezione)
|
||||
{
|
||||
fill_riga_NR(body,RecNum,0);
|
||||
RecNum+=3;
|
||||
fill_riga_NR(body,RecNum,1);
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
RigheStampate++;
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
RecNum-=2;
|
||||
fill_riga_NR(body,RecNum,0);
|
||||
RecNum+=3;
|
||||
fill_riga_NR(body,RecNum,1);
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
RigheStampate++;
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
RecNum-=2;
|
||||
FinitaSezione=RigheStampate>_RIGHE_RA-1;
|
||||
}
|
||||
}
|
||||
@ -1352,11 +1352,11 @@ void TQuadroN::stampa_S(TPrinter& pr)
|
||||
{
|
||||
// Stampa la parte sinistra (primi 4 campi)
|
||||
fill_riga_PS(body,riga);
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
FinitaSezione=riga>_RIGHE_SA-1;
|
||||
@ -1375,11 +1375,11 @@ void TQuadroN::stampa_T(TPrinter& pr)
|
||||
{
|
||||
// Stampa la parte sinistra (primi 4 campi)
|
||||
fill_riga_QT(body,riga);
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
FinitaSezione=riga>_RIGHE_TA-1;
|
||||
@ -1407,20 +1407,20 @@ void TBase4::fill_riga_NR(TPrint_section& sec,const int num, const int side)
|
||||
if (num < _righeNR.items())
|
||||
{
|
||||
const TRigaN& rN = _righeNR[num];
|
||||
if (i==start)
|
||||
sVal=rN.sMeseRif();
|
||||
else if (i==start+1)
|
||||
sVal=rN.sAnnoRif();
|
||||
else if (i==start+2)
|
||||
sVal=rN.ImpRimb(fi.picture());
|
||||
else if (i==start+3)
|
||||
sVal=rN.CompAss(fi.picture());
|
||||
}
|
||||
else
|
||||
sVal="";
|
||||
fi.set(sVal);
|
||||
TPrintrow& row=sec.row(0);
|
||||
row.put(sVal,fi.x()-1);
|
||||
if (i==start)
|
||||
sVal=rN.sMeseRif();
|
||||
else if (i==start+1)
|
||||
sVal=rN.sAnnoRif();
|
||||
else if (i==start+2)
|
||||
sVal=rN.ImpRimb(fi.picture());
|
||||
else if (i==start+3)
|
||||
sVal=rN.CompAss(fi.picture());
|
||||
}
|
||||
else
|
||||
sVal="";
|
||||
fi.set(sVal);
|
||||
TPrintrow& row=sec.row(0);
|
||||
row.put(sVal,fi.x()-1);
|
||||
}
|
||||
} */
|
||||
|
||||
@ -1462,28 +1462,28 @@ bool TQuadroN::print(const long codditta, const long NumFis, const long NumNoFis
|
||||
bool done=FALSE;
|
||||
while (!done)
|
||||
{
|
||||
jump_to_line(pr, prima_riga(PRIMA));
|
||||
int skip=HEADER_PRIMA_NOPOS;
|
||||
stampa_testata(pr);
|
||||
jump_to_line(pr, prima_riga(PRIMA));
|
||||
int skip=HEADER_PRIMA_NOPOS;
|
||||
stampa_testata(pr);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 20-skip : 20);
|
||||
stampa_N(pr);
|
||||
stampa_N(pr);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 26-skip : 26);
|
||||
stampa_P(pr);
|
||||
stampa_P(pr);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 38-skip : 38);
|
||||
stampa_Q(pr);
|
||||
stampa_Q(pr);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 44-skip : 44);
|
||||
stampa_R(pr);
|
||||
stampa_R(pr);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 48-skip : 48);
|
||||
stampa_S(pr);
|
||||
stampa_S(pr);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 56-skip : 56);
|
||||
stampa_T(pr);
|
||||
stampa_T(pr);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 63-skip : 63);
|
||||
stampa_fine(pr);
|
||||
_PaginaPosizionamento=FALSE;
|
||||
next_page(pr);
|
||||
stampa_fine(pr);
|
||||
_PaginaPosizionamento=FALSE;
|
||||
next_page(pr);
|
||||
pr.formlen(TDicForm::dic_form_len());
|
||||
++(*cur);
|
||||
done = cur->pos() >= cur->items()-1;
|
||||
++(*cur);
|
||||
done = cur->pos() >= cur->items()-1;
|
||||
}
|
||||
close_print();
|
||||
return TRUE;
|
||||
|
@ -733,7 +733,7 @@ class TQuadroG : public TDicForm
|
||||
void stampa_prospetti3_4(TPrinter& pr);
|
||||
|
||||
protected:
|
||||
virtual bool ultima_pagina() const { return _PaginaCorrente==SECONDA; }
|
||||
virtual bool ultima_pagina() const { return _PaginaCorrente==SECONDA; }
|
||||
virtual void inc_curr_page();
|
||||
virtual void next_page(TPrinter& pr);
|
||||
virtual void stampa_totali(TPrinter& pr) {}
|
||||
@ -915,13 +915,13 @@ void TQuadroG::stampa_prospetti3_4(TPrinter& pr)
|
||||
if (!bAggiuntivo)
|
||||
{
|
||||
if (i == 18)
|
||||
{
|
||||
TForm_item& t7 = sez.find_field(k+54);
|
||||
t2.set(tot_tot2.string());
|
||||
t7.set(tot_tot7.string());
|
||||
}
|
||||
}
|
||||
else t2.set("VEDI ALLEGATO");
|
||||
{
|
||||
TForm_item& t7 = sez.find_field(k+54);
|
||||
t2.set(tot_tot2.string());
|
||||
t7.set(tot_tot7.string());
|
||||
}
|
||||
}
|
||||
else t2.set("VEDI ALLEGATO");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1027,8 +1027,8 @@ bool TQuadroG::print(const long codditta, const long NumFis, const long NumNoFis
|
||||
|
||||
if (_PaginaCorrente == PRIMA)
|
||||
{
|
||||
if (!_PaginaPosizionamento)
|
||||
fill_page(pr,HEADER_PRIMA_NOPOS);
|
||||
if (!_PaginaPosizionamento)
|
||||
fill_page(pr,HEADER_PRIMA_NOPOS);
|
||||
|
||||
if (_modulaser) ClearFlagModulaser();
|
||||
|
||||
@ -1751,8 +1751,6 @@ void TStampaQuadro::print(const bool modulaser)
|
||||
|
||||
class TQuadroD : public TDicForm
|
||||
{
|
||||
enum { QD_FORMLEN = 72 };
|
||||
|
||||
real _totale, _somme, _imponibile, _importo, _netto;
|
||||
bool _devo_sommare;
|
||||
|
||||
@ -2242,8 +2240,6 @@ bool TStampaQuadroD::user_destroy()
|
||||
|
||||
class TQuadroD1 : public TDicForm
|
||||
{
|
||||
enum { QD_FORMLEN = 72 };
|
||||
|
||||
real _totale, _quotapro, _speseant, _imponibile, _importo, _netto;
|
||||
bool _devo_sommare;
|
||||
|
||||
@ -2745,18 +2741,18 @@ bool TStampaQuadroD1::user_destroy()
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
class TStampaQuadroG : public TStampaQuadro
|
||||
{
|
||||
private:
|
||||
TQuadroG* _form_g;
|
||||
TDistintaG* _form_gd;
|
||||
TCursor* _cur_g, * _cur_gd;
|
||||
protected:
|
||||
virtual bool user_create();
|
||||
virtual bool user_destroy();
|
||||
virtual TDicForm* get_form() const { return _form_g; }
|
||||
virtual TCursor* get_cursor() const { return _cur_g; }
|
||||
virtual bool print_quadro(const int OffsetDitta, const bool modulaser);
|
||||
public:
|
||||
TStampaQuadroG(char livel) : TStampaQuadro("G", livel) { }
|
||||
private:
|
||||
TQuadroG* _form_g;
|
||||
TDistintaG* _form_gd;
|
||||
TCursor* _cur_g, * _cur_gd;
|
||||
protected:
|
||||
virtual bool user_create();
|
||||
virtual bool user_destroy();
|
||||
virtual TDicForm* get_form() const { return _form_g; }
|
||||
virtual TCursor* get_cursor() const { return _cur_g; }
|
||||
virtual bool print_quadro(const int OffsetDitta, const bool modulaser);
|
||||
public:
|
||||
TStampaQuadroG(char livel) : TStampaQuadro("G", livel) { }
|
||||
};
|
||||
|
||||
bool TStampaQuadroG::user_create()
|
||||
@ -3235,7 +3231,7 @@ class TQuadroF : public TDicForm
|
||||
void azzera_contatori();
|
||||
void aggiorna_totali(char tipoprosp, TRectype& r);
|
||||
void stampa_totali(char tipoprosp, TPrinter& pr);
|
||||
virtual bool ultima_pagina() const { return _PaginaCorrente==SECONDA; }
|
||||
virtual bool ultima_pagina() const { return _PaginaCorrente==SECONDA; }
|
||||
|
||||
public:
|
||||
virtual bool print(const long codditta, const long numfis=0L, const long numnofis=0L);
|
||||
@ -3801,9 +3797,9 @@ bool get_alleg_730(const long codditta)
|
||||
base.put("CODDITTA",(long)codditta);
|
||||
if (base.read()==NOERR)
|
||||
{
|
||||
const long allegA=base.get_long("N730ALLA");
|
||||
const long allegA2=base.get_long("N730ALLA2");
|
||||
return allegA || allegA2;
|
||||
const long allegA=base.get_long("N730ALLA");
|
||||
const long allegA2=base.get_long("N730ALLA2");
|
||||
return allegA || allegA2;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
@ -3832,27 +3828,27 @@ bool TBusta::print(const long codditta, const long, const long)
|
||||
all730.set(bAlleg730 ? "X" : "");
|
||||
|
||||
TPrinter& pr=printer();
|
||||
TPrint_section& body = section('B', odd_page);
|
||||
const int body_righe = body.height();
|
||||
TPrint_section& body = section('B', odd_page);
|
||||
const int body_righe = body.height();
|
||||
TCursor* cur=cursor();
|
||||
bool finito=FALSE;
|
||||
(*cur)=0L;
|
||||
pr.formlen(BUSTA_CON_POSIZ);
|
||||
if (!_PaginaPosizionamento)
|
||||
jump_to_line(pr,prima_riga(PRIMA));
|
||||
while (!finito)
|
||||
{
|
||||
body.reset();
|
||||
body.update();
|
||||
for (int i=0; i < body_righe; i++)
|
||||
{
|
||||
pr.print(body.row(i));
|
||||
_RigaCorr++;
|
||||
}
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
++(*cur);
|
||||
finito= cur->pos() >= cur->items()-1;
|
||||
while (!finito)
|
||||
{
|
||||
body.reset();
|
||||
body.update();
|
||||
for (int i=0; i < body_righe; i++)
|
||||
{
|
||||
pr.print(body.row(i));
|
||||
_RigaCorr++;
|
||||
}
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
++(*cur);
|
||||
finito= cur->pos() >= cur->items()-1;
|
||||
pr.formlen(BUSTA_SENZA_POSIZ);
|
||||
_PaginaPosizionamento=FALSE;
|
||||
}
|
||||
|
45
m770/77stq.h
45
m770/77stq.h
@ -44,9 +44,9 @@ typedef enum { STARTDOC, STARTDITTA, STARTPAGE, ENDDOC } ModulaserKey;
|
||||
// Campi form
|
||||
#define TOT_TOTALE 1
|
||||
#define TOT_SNSRIT 2
|
||||
#define TOT_IMPON 3
|
||||
#define TOT_IMPOR 4
|
||||
#define TOT_NETTO 5
|
||||
#define TOT_IMPON 3
|
||||
#define TOT_IMPOR 4
|
||||
#define TOT_NETTO 5
|
||||
|
||||
#define D_TOTALE 16
|
||||
#define D_SNSRIT 17
|
||||
@ -73,25 +73,27 @@ typedef enum { STARTDOC, STARTDITTA, STARTPAGE, ENDDOC } ModulaserKey;
|
||||
#define QD_STATO_ESTERO 12
|
||||
|
||||
// Quadro D
|
||||
HIDDEN const int QD_FORMLEN = 72;
|
||||
HIDDEN const int POS_DITTA = 120; // Colonna del codice ditta a pie' di modulo
|
||||
HIDDEN const int QD_PAGINE = 4;
|
||||
HIDDEN const int QD_RIGHE_PRIMA = 4;
|
||||
HIDDEN const int QD_RIGHE_SECONDA = 7;
|
||||
HIDDEN const int QD_RIGHE_TERZA = 7;
|
||||
HIDDEN const int QD_RIGHE_QUARTA = 7;
|
||||
HIDDEN const int QD1_RIGHE_PRIMA = 6;
|
||||
HIDDEN const int QD1_RIGHE_SECONDA = 9;
|
||||
HIDDEN const int QD1_RIGHE_TERZA = 9;
|
||||
HIDDEN const int QD1_RIGHE_QUARTA = 8;
|
||||
#define QD_FORMLEN 72
|
||||
#define POS_DITTA 120
|
||||
#define QD_PAGINE 4
|
||||
#define QD_RIGHE_PRIMA 4
|
||||
#define QD_RIGHE_SECONDA 7
|
||||
#define QD_RIGHE_TERZA 7
|
||||
#define QD_RIGHE_QUARTA 7
|
||||
#define QD1_RIGHE_PRIMA 6
|
||||
#define QD1_RIGHE_SECONDA 9
|
||||
#define QD1_RIGHE_TERZA 9
|
||||
#define QD1_RIGHE_QUARTA 8
|
||||
|
||||
HIDDEN const int HEADER_SECONDA = 8;
|
||||
HIDDEN const int HEADER_TERZA = 8; // Sarebbero 9 col righello...
|
||||
HIDDEN const int HEADER_QUARTA = 13; // 15 col righello...
|
||||
#define HEADER_SECONDA 8
|
||||
#define HEADER_TERZA 8
|
||||
#define HEADER_QUARTA 13
|
||||
|
||||
HIDDEN const int HEADER_D1_SECONDA = 8;
|
||||
HIDDEN const int HEADER_D1_TERZA = 8;
|
||||
HIDDEN const int HEADER_D1_QUARTA = 14;
|
||||
#define HEADER_D1_SECONDA 8
|
||||
#define HEADER_D1_TERZA 8
|
||||
#define HEADER_D1_QUARTA 14
|
||||
|
||||
#define FIRMADIC 2
|
||||
|
||||
typedef enum { PRIMA=1, SECONDA, TERZA, QUARTA } PaginaQuadro;
|
||||
typedef enum { fisiche, nofisiche } TipoPagina;
|
||||
@ -115,7 +117,7 @@ class TDicForm : public TForm
|
||||
virtual void inc_curr_page();
|
||||
virtual void next_page(TPrinter& pr);
|
||||
bool _modulaser; // se stampa per modulaser
|
||||
bool _posiziona;
|
||||
bool _posiziona;
|
||||
TipoDitta _tipo_ditta; // tipo ditta: normale, estinto, dichiarante
|
||||
int _num_foglio; // numero foglio
|
||||
TString _cofi_dic; // cod.fis. dichiarante
|
||||
@ -172,6 +174,7 @@ class TDicForm : public TForm
|
||||
virtual void azzera_totali();
|
||||
PaginaQuadro curr_page() const { return _PaginaCorrente; }
|
||||
// TCursor& cur();
|
||||
void firma_dichiarante();
|
||||
|
||||
void set_progind(TProgind* prog) { _prog = prog; }
|
||||
TProgind* progind() { return _prog; }
|
||||
|
@ -93,10 +93,12 @@ int TDipendenti::fill(TCursor& cur)
|
||||
const long coddec = dip(d).codice_deceduto();
|
||||
if (coddec > 0) // E' un erede!
|
||||
{
|
||||
const int posdec = find(coddec);
|
||||
int posdec = find(coddec);
|
||||
if (posdec >= 0 && posdec != d-1) // Il deceduto esiste
|
||||
{
|
||||
TDipendente* dipen = (TDipendente*)_data.remove(d, TRUE);
|
||||
if (d < posdec) // Se l'erede precede il defunto ...
|
||||
posdec--; // ... il defunto avanza di un posto!
|
||||
dipen->reset_deceduto(); // Non e' piu' un erede
|
||||
_data.insert(dipen, posdec+1); // Attaccalo dietro al deceduto
|
||||
}
|
||||
@ -559,6 +561,18 @@ bool TStampaQuadroB::user_create()
|
||||
// QUADRO H
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
long TQuadroH::filtra(const long codditta)
|
||||
{
|
||||
TString filtr(32);
|
||||
filtr.format("(CODDITTA=%ld)&&(H1ANNO=1995)", codditta);
|
||||
|
||||
cursor()->setfilter(filtr, TRUE);
|
||||
const long items = cursor()->items();
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
|
||||
void TQuadroH::inc_curr_page()
|
||||
{
|
||||
if (_PaginaCorrente == PRIMA)
|
||||
@ -681,7 +695,8 @@ bool TStampaQuadroH::user_create()
|
||||
_form = new TQuadroH("77QH", quadro());
|
||||
|
||||
TString sortkey(80);
|
||||
sortkey.format("CODDITTA|H1ANNO|H1ENTE");
|
||||
// sortkey.format("CODDITTA|H1ANNO|H1ENTE");
|
||||
sortkey.format("CODDITTA|H1ENTE"); // Considera solo in 1995
|
||||
_cur = new TSorted_cursor(_form->TForm::relation(), sortkey);
|
||||
|
||||
return TRUE;
|
||||
|
@ -223,6 +223,7 @@ protected:
|
||||
virtual int prima_riga(PaginaQuadro p) const;
|
||||
virtual bool print(const long codditta, const long NumFis, const long NumNoFis);
|
||||
virtual void inc_curr_page();
|
||||
virtual long filtra(const long codditta);
|
||||
|
||||
public:
|
||||
TQuadroH(const char* form, const char* quadro) : TQuadroA(form, quadro) { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user