Corretta percentuale in D e D1
git-svn-id: svn://10.65.10.50/trunk@3806 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
010bb88d20
commit
61f5aee724
@ -94,21 +94,18 @@ NUMERO 1
|
||||
BEGIN
|
||||
KEY "MeseRif"
|
||||
PROMPT 25 1 ""
|
||||
FIELD 72->MESERIF
|
||||
END
|
||||
|
||||
NUMERO 2
|
||||
BEGIN
|
||||
KEY "AnnoRif"
|
||||
PROMPT 28 1 ""
|
||||
FIELD 72->ANNORIF
|
||||
END
|
||||
|
||||
NUMERO 3
|
||||
BEGIN
|
||||
KEY "imp. rimb"
|
||||
PROMPT 37 1 ""
|
||||
FIELD 72->IMPOSTA
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -116,7 +113,6 @@ NUMERO 4
|
||||
BEGIN
|
||||
KEY "Compensi"
|
||||
PROMPT 58 1 ""
|
||||
FIELD 72->COMPENSI
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -124,21 +120,18 @@ NUMERO 5
|
||||
BEGIN
|
||||
KEY "MeseRif"
|
||||
PROMPT 83 1 ""
|
||||
FIELD 72->MESERIF
|
||||
END
|
||||
|
||||
NUMERO 6
|
||||
BEGIN
|
||||
KEY "AnnoRif"
|
||||
PROMPT 86 1 ""
|
||||
FIELD 72->ANNORIF
|
||||
END
|
||||
|
||||
NUMERO 7
|
||||
BEGIN
|
||||
KEY "imp. rimb"
|
||||
PROMPT 96 1 ""
|
||||
FIELD 72->IMPOSTA
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -146,7 +139,6 @@ NUMERO 8
|
||||
BEGIN
|
||||
KEY "Compensi"
|
||||
PROMPT 116 1 ""
|
||||
FIELD 72->COMPENSI
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -158,21 +150,21 @@ NUMERO 1
|
||||
BEGIN
|
||||
KEY "R - MeseRif"
|
||||
PROMPT 25 1 ""
|
||||
FIELD 75->MESERIF
|
||||
// FIELD 75->MESERIF
|
||||
END
|
||||
|
||||
NUMERO 2
|
||||
BEGIN
|
||||
KEY "R - AnnoRif"
|
||||
PROMPT 28 1 ""
|
||||
FIELD 75->ANNORIF
|
||||
// FIELD 75->ANNORIF
|
||||
END
|
||||
|
||||
NUMERO 3
|
||||
BEGIN
|
||||
KEY "R - imp. rimb"
|
||||
PROMPT 37 1 ""
|
||||
FIELD 75->IMPRIMB
|
||||
// FIELD 75->IMPRIMB
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -180,7 +172,7 @@ NUMERO 4
|
||||
BEGIN
|
||||
KEY "R - Compensi"
|
||||
PROMPT 58 1 ""
|
||||
FIELD 75->COMPENSI
|
||||
// FIELD 75->COMPENSI
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -188,21 +180,21 @@ NUMERO 5
|
||||
BEGIN
|
||||
KEY "R - MeseRif"
|
||||
PROMPT 83 1 ""
|
||||
FIELD 75->MESERIF
|
||||
// FIELD 75->MESERIF
|
||||
END
|
||||
|
||||
NUMERO 6
|
||||
BEGIN
|
||||
KEY "R - AnnoRif"
|
||||
PROMPT 86 1 ""
|
||||
FIELD 75->ANNORIF
|
||||
// FIELD 75->ANNORIF
|
||||
END
|
||||
|
||||
NUMERO 7
|
||||
BEGIN
|
||||
KEY "R - imp. rimb"
|
||||
PROMPT 96 1 ""
|
||||
FIELD 75->IMPRIMB
|
||||
// FIELD 75->IMPRIMB
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -210,7 +202,7 @@ NUMERO 8
|
||||
BEGIN
|
||||
KEY "R - Compensi"
|
||||
PROMPT 116 1 ""
|
||||
FIELD 75->COMPENSI
|
||||
// FIELD 75->COMPENSI
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -278,21 +270,21 @@ NUMERO 1
|
||||
BEGIN
|
||||
KEY "Q Mese paga"
|
||||
PROMPT 25 1 ""
|
||||
FIELD 74->MESEPAG
|
||||
// FIELD 74->MESEPAG
|
||||
END
|
||||
|
||||
NUMERO 2
|
||||
BEGIN
|
||||
KEY "Q Anno paga"
|
||||
PROMPT 28 1 ""
|
||||
FIELD 74->ANNOPAG
|
||||
// FIELD 74->ANNOPAG
|
||||
END
|
||||
|
||||
NUMERO 3
|
||||
BEGIN
|
||||
KEY "Q Contr.versato"
|
||||
PROMPT 46 1 ""
|
||||
FIELD 74->CONTVERS
|
||||
// FIELD 74->CONTVERS
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -300,7 +292,7 @@ NUMERO 4
|
||||
BEGIN
|
||||
KEY "Q Contr.rimborsati"
|
||||
PROMPT 75 1 ""
|
||||
FIELD 74->CONTRIMB
|
||||
// FIELD 74->CONTRIMB
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -308,7 +300,7 @@ NUMERO 5
|
||||
BEGIN
|
||||
KEY "Q Interes.e/o soprattasse"
|
||||
PROMPT 104 1 ""
|
||||
FIELD 74->INTERESSI
|
||||
// FIELD 74->INTERESSI
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -316,7 +308,7 @@ STRINGA 6
|
||||
BEGIN
|
||||
KEY "Q Cod.Reg"
|
||||
PROMPT 126 1 ""
|
||||
FIELD 74->CODREG
|
||||
// FIELD 74->CODREG
|
||||
END
|
||||
|
||||
END
|
||||
@ -327,21 +319,21 @@ NUMERO 1
|
||||
BEGIN
|
||||
KEY "T Mese paga"
|
||||
PROMPT 25 1 ""
|
||||
FIELD 77->MESEPAG
|
||||
// FIELD 77->MESEPAG
|
||||
END
|
||||
|
||||
NUMERO 2
|
||||
BEGIN
|
||||
KEY "T Anno paga"
|
||||
PROMPT 28 1 ""
|
||||
FIELD 77->ANNOPAG
|
||||
// FIELD 77->ANNOPAG
|
||||
END
|
||||
|
||||
NUMERO 3
|
||||
BEGIN
|
||||
KEY "T Contr.versato"
|
||||
PROMPT 46 1 ""
|
||||
FIELD 77->CONTVERS
|
||||
// FIELD 77->CONTVERS
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -349,7 +341,7 @@ NUMERO 4
|
||||
BEGIN
|
||||
KEY "T Contr.rimborsati"
|
||||
PROMPT 75 1 ""
|
||||
FIELD 77->CONTRIMB
|
||||
// FIELD 77->CONTRIMB
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -357,7 +349,7 @@ NUMERO 5
|
||||
BEGIN
|
||||
KEY "T Interes.e/o soprattasse"
|
||||
PROMPT 104 1 ""
|
||||
FIELD 77->INTERESSI
|
||||
// FIELD 77->INTERESSI
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
@ -365,7 +357,7 @@ STRINGA 6
|
||||
BEGIN
|
||||
KEY "T Cod.Reg"
|
||||
PROMPT 126 1 ""
|
||||
FIELD 77->CODREG
|
||||
// FIELD 77->CODREG
|
||||
END
|
||||
|
||||
END
|
||||
|
@ -260,7 +260,7 @@ END
|
||||
STRING 106
|
||||
BEGIN
|
||||
KEY "PROV. RF/RES GIURIDICHE"
|
||||
PROMPT 61 3 ""
|
||||
PROMPT 63 3 ""
|
||||
FIELD 513@->PROVCOM
|
||||
GROUP 2
|
||||
END
|
||||
@ -268,7 +268,7 @@ END
|
||||
STRING 108
|
||||
BEGIN
|
||||
KEY "VIA RES. FISICHE"
|
||||
FIELD 216@->INDRES[1,18]
|
||||
FIELD 216@->INDRES[1,30]
|
||||
FLAGS "H"
|
||||
MESSAGE COPY,10
|
||||
GROUP 1
|
||||
@ -293,8 +293,8 @@ END
|
||||
STRING 110
|
||||
BEGIN
|
||||
KEY "VIA RF/RES. GIURIDICHE"
|
||||
FIELD 216@->INDRF[1,18]
|
||||
FIELD 216@->INDRES[1,18]
|
||||
FIELD 216@->INDRF[1,50]
|
||||
FIELD 216@->INDRES[1,50]
|
||||
FLAGS "H"
|
||||
MESSAGE COPY,107
|
||||
GROUP 2
|
||||
@ -313,7 +313,7 @@ END
|
||||
STRING 107
|
||||
BEGIN
|
||||
KEY "VIA RES GIURIDICHE"
|
||||
PROMPT 69 3 ""
|
||||
PROMPT 71 3 ""
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
@ -341,7 +341,7 @@ END
|
||||
STRING 14
|
||||
BEGIN
|
||||
KEY "CODICE FISCALE ESTERO"
|
||||
PROMPT 89 5 ""
|
||||
PROMPT 91 5 ""
|
||||
FIELD 216@->COFIEST
|
||||
END
|
||||
|
||||
@ -383,8 +383,8 @@ STRING 19
|
||||
BEGIN
|
||||
KEY "ALIQUOTA"
|
||||
PROMPT 84 7 ""
|
||||
FIELD 62->PERC
|
||||
PICTURE "###@@"
|
||||
// FIELD 62->PERC
|
||||
// PICTURE "##@,@@"
|
||||
END
|
||||
|
||||
NUMBER 20
|
||||
@ -447,7 +447,7 @@ END
|
||||
STRINGA 2
|
||||
BEGIN
|
||||
KEY "FIRMA"
|
||||
PROMPT 83 5 ""
|
||||
PROMPT 83 6 ""
|
||||
FIELD 116@->RAGSOC
|
||||
GROUP 2
|
||||
END
|
||||
|
@ -173,13 +173,13 @@ END
|
||||
STRINGA 21
|
||||
BEGIN
|
||||
KEY "Ritenuta d'acconto"
|
||||
PROMPT 110 10 ""
|
||||
PROMPT 105 10 ""
|
||||
END
|
||||
|
||||
STRINGA 22
|
||||
BEGIN
|
||||
KEY "Ritenuta d'imposta"
|
||||
PROMPT 110 11 ""
|
||||
PROMPT 105 11 ""
|
||||
END
|
||||
|
||||
END
|
||||
@ -284,7 +284,7 @@ END
|
||||
STRING 103
|
||||
BEGIN
|
||||
KEY "PROVINCIA RF/RES. GIURIDICHE"
|
||||
PROMPT 51 3 ""
|
||||
PROMPT 71 3 ""
|
||||
FIELD 513@->PROVCOM
|
||||
GROUP 2
|
||||
END
|
||||
@ -388,8 +388,8 @@ STRING 16
|
||||
BEGIN
|
||||
KEY "ALIQUOTA"
|
||||
PROMPT 90 5 ""
|
||||
FIELD 63->PERC
|
||||
PICTURE "###@@"
|
||||
// FIELD 63->PERC
|
||||
// PICTURE "##@,@@"
|
||||
END
|
||||
|
||||
NUMBER 17
|
||||
|
@ -223,14 +223,14 @@ END
|
||||
STRINGA 7
|
||||
BEGIN
|
||||
KEY "Luogo Vers."
|
||||
PROMPT 28 3 ""
|
||||
PROMPT 26 3 ""
|
||||
FIELD 42->QLLV
|
||||
END
|
||||
|
||||
LISTA 8
|
||||
BEGIN
|
||||
KEY "Tipo Vers."
|
||||
PROMPT 36 3 ""
|
||||
PROMPT 34 3 ""
|
||||
ITEM " | "
|
||||
ITEM "B|B" MESSAGE SHOW,13|HIDE,14
|
||||
ITEM "C|C" MESSAGE SHOW,14|HIDE,13
|
||||
@ -257,7 +257,7 @@ BEGIN
|
||||
KEY "DATA VERS."
|
||||
PROMPT 63 3 ""
|
||||
FIELD 42->QLDV
|
||||
PICTURE "## ^ ## ^####"
|
||||
PICTURE " ## ^ ## ^####"
|
||||
END
|
||||
|
||||
STRINGA 12
|
||||
@ -289,28 +289,28 @@ SECTION FOOTER LAST 6
|
||||
NUMERO 1
|
||||
BEGIN
|
||||
KEY "Tot.rit.eff"
|
||||
PROMPT 51 1 ""
|
||||
PROMPT 66 1 ""
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
NUMERO 2
|
||||
BEGIN
|
||||
KEY "Tot.rit.ver"
|
||||
PROMPT 102 1 ""
|
||||
PROMPT 117 1 ""
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
DATE 3
|
||||
BEGIN
|
||||
KEY "DATA"
|
||||
PROMPT 50 5 ""
|
||||
PROMPT 30 5 ""
|
||||
FLAGS "A"
|
||||
END
|
||||
|
||||
STRINGA 4
|
||||
BEGIN
|
||||
KEY "FIRMA"
|
||||
PROMPT 120 5 ""
|
||||
PROMPT 90 5 ""
|
||||
FIELD 106@->RAGSOC
|
||||
END
|
||||
|
||||
|
@ -40,7 +40,7 @@ BEGIN
|
||||
FI 131
|
||||
END
|
||||
|
||||
SECTION HEADER FIRST 7
|
||||
SECTION HEADER FIRST 8
|
||||
|
||||
NUMERO 12
|
||||
BEGIN
|
||||
@ -397,7 +397,7 @@ END
|
||||
|
||||
END
|
||||
|
||||
SECTION FOOTER FIRST 4
|
||||
SECTION FOOTER FIRST 2
|
||||
|
||||
DATA 1
|
||||
BEGIN
|
||||
|
107
m770/77stba.cpp
107
m770/77stba.cpp
@ -331,13 +331,9 @@ bool TBase3::print(const long codditta, const long NumFis, const long NumNoFis)
|
||||
TCursor* cur = cursor();
|
||||
TPrinter& pr = printer();
|
||||
_codditta=codditta;
|
||||
// filtra(codditta);
|
||||
reset_totali_L();
|
||||
_RigaCorr=0;
|
||||
|
||||
jump_to_line(pr, prima_riga(PRIMA));
|
||||
// Stampa i codici concessione e tesoreria
|
||||
stampa_testata(pr);
|
||||
// Legge dai par.studio l'ordinamento da usare per L
|
||||
TConfig conf(CONFIG_STUDIO);
|
||||
const int iChiaveL = (int)conf.get_long("FlStQl", "77");
|
||||
@ -347,9 +343,14 @@ bool TBase3::print(const long codditta, const long NumFis, const long NumNoFis)
|
||||
else
|
||||
cur->setkey(2);
|
||||
|
||||
// ! posizionare il cursore prima di stampa_testata() !
|
||||
filtra(_codditta);
|
||||
(*cur)=0L;
|
||||
|
||||
jump_to_line(pr, prima_riga(PRIMA));
|
||||
// Stampa i codici concessione e tesoreria
|
||||
stampa_testata(pr);
|
||||
|
||||
const int righe_stampate=stampa_L(pr);
|
||||
// Se la stampa prosegue i totali vanno sull'aggiuntivo NON qui
|
||||
if (!_bAggiuntivoL)
|
||||
@ -422,10 +423,7 @@ int TRigheNR::fill(const long codditta,TLocalisamfile& qnr)
|
||||
if (ditta!=codditta) break;
|
||||
|
||||
TRigaN* n = new TRigaN(qnr);
|
||||
if (n->pos() >= 0)
|
||||
_data.add(n);
|
||||
else
|
||||
delete n;
|
||||
_data.add(n);
|
||||
}
|
||||
_data.sort();
|
||||
const int i = _data.items();
|
||||
@ -488,10 +486,7 @@ int TRigheQT::fill(const long codditta,TLocalisamfile& qt)
|
||||
if (ditta!=codditta) break;
|
||||
|
||||
TRigaQT* n = new TRigaQT(qt);
|
||||
if (n->pos() >= 0)
|
||||
_data.add(n);
|
||||
else
|
||||
delete n;
|
||||
_data.add(n);
|
||||
}
|
||||
_data.sort();
|
||||
const int i = _data.items();
|
||||
@ -538,10 +533,7 @@ int TRighePS::fill(const long codditta,TLocalisamfile& ps)
|
||||
if (ditta!=codditta) break;
|
||||
|
||||
TRigaPS* n = new TRigaPS(ps);
|
||||
if (n->pos() >= 0)
|
||||
_data.add(n);
|
||||
else
|
||||
delete n;
|
||||
_data.add(n);
|
||||
}
|
||||
_data.sort();
|
||||
const int i = _data.items();
|
||||
@ -619,8 +611,8 @@ void TBase4::stampa_Q(TPrinter& pr)
|
||||
{
|
||||
TPrint_section& body = section('F', even_page);
|
||||
body.reset();
|
||||
TLocalisamfile qp(LF_QUAQ);
|
||||
_righeQ.fill(_codditta,qp);
|
||||
TLocalisamfile qq(LF_QUAQ);
|
||||
_righeQ.fill(_codditta,qq);
|
||||
if (_righeQ.items()==0) return;
|
||||
_bAggQ = _righeQ.items() > _RIGHE_Q;
|
||||
|
||||
@ -628,9 +620,9 @@ void TBase4::stampa_Q(TPrinter& pr)
|
||||
bool FinitaSezione=FALSE;
|
||||
while (!FinitaSezione)
|
||||
{
|
||||
// Stampa la parte sinistra (primi 4 campi)
|
||||
fill_riga_QT(body,riga,'Q');
|
||||
TPrintrow& rr=body.row(0);
|
||||
rr.reset();
|
||||
fill_riga_QT(body,riga,'Q');
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
@ -654,9 +646,9 @@ void TBase4::stampa_T(TPrinter& pr)
|
||||
bool FinitaSezione=FALSE;
|
||||
while (!FinitaSezione)
|
||||
{
|
||||
// Stampa la parte sinistra (primi 4 campi)
|
||||
fill_riga_QT(body,riga,'T');
|
||||
TPrintrow& rr=body.row(0);
|
||||
rr.reset();
|
||||
fill_riga_QT(body,riga,'T');
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
@ -721,8 +713,9 @@ void TBase4::stampa_P(TPrinter& pr)
|
||||
while (!FinitaSezione)
|
||||
{
|
||||
// Stampa la parte sinistra (primi 4 campi)
|
||||
fill_riga_PS(body,riga,'P');
|
||||
TPrintrow& rr=body.row(0);
|
||||
rr.reset();
|
||||
fill_riga_PS(body,riga,'P');
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
@ -747,18 +740,17 @@ void TBase4::stampa_S(TPrinter& pr)
|
||||
while (!FinitaSezione)
|
||||
{
|
||||
// Stampa la parte sinistra (primi 4 campi)
|
||||
fill_riga_PS(body,riga,'S');
|
||||
TPrintrow& rr=body.row(0);
|
||||
rr.reset();
|
||||
fill_riga_PS(body,riga,'S');
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
riga++;
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
FinitaSezione=riga>_RIGHE_S-1;
|
||||
FinitaSezione = riga > _RIGHE_S -1 ;
|
||||
}
|
||||
// Salta due righe alla fine
|
||||
stampa_righe_vuote(pr,2);
|
||||
}
|
||||
|
||||
void TBase4::stampa_R(TPrinter& pr)
|
||||
@ -771,9 +763,10 @@ void TBase4::stampa_R(TPrinter& pr)
|
||||
const int items=_righeR.items();
|
||||
// se iRigheNR > 2 => bisogna stampare anche l'allegato
|
||||
_bAggR = items > _RIGHE_R;
|
||||
TPrintrow& rr=body.row(0);
|
||||
rr.reset();
|
||||
fill_riga_NR(body,0,0,'R');
|
||||
fill_riga_NR(body,1,1,'R');
|
||||
TPrintrow& rr=body.row(0);
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
_RigaCorr++;
|
||||
@ -819,19 +812,6 @@ void TBase4::fill_riga_NR(TPrint_section& sec,const int num, const int side,cons
|
||||
}
|
||||
}
|
||||
|
||||
void TBase4::stampa_righe_vuote(TPrinter& pr,const int righe)
|
||||
{
|
||||
TPrintrow rr;
|
||||
for (int i=0; i<righe; i++)
|
||||
{
|
||||
pr.print(rr);
|
||||
rr.reset();
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
}
|
||||
}
|
||||
|
||||
void TBase4::stampa_N(TPrinter& pr)
|
||||
{
|
||||
TPrint_section& body = section('B', odd_page);
|
||||
@ -1151,7 +1131,7 @@ void TQuadroL::calcola_totali_precedenti()
|
||||
{
|
||||
TCursor* cur = cursor();
|
||||
_rTotEff = _rTotVer = ZERO;
|
||||
for ((*cur)=0L; cur->pos() < _START_AGG_L; ++(*cur) )
|
||||
for ((*cur)=0L; cur->pos() < _START_AGG_L-1; ++(*cur) )
|
||||
{
|
||||
_rTotEff += cur->curr().get_real("QLRITEFF");
|
||||
_rTotVer += cur->curr().get_real("QLRITVER");
|
||||
@ -1188,7 +1168,6 @@ bool TQuadroL::print(const long codditta, const long NumFis, const long NumNoFis
|
||||
|
||||
pr.formlen(dic_form_len());
|
||||
int lOffsetL=_START_AGG_L-1;
|
||||
// int lOffsetL=15;
|
||||
(*cur)=lOffsetL;
|
||||
bool finito=FALSE;
|
||||
while (!finito)
|
||||
@ -1357,7 +1336,7 @@ int TQuadroN::stampa_N(TPrinter& pr,const int ptrN)
|
||||
{
|
||||
// Stampa la parte sinistra (primi 4 campi)
|
||||
fill_riga_NR(body,num,0,'N');
|
||||
num+=3;
|
||||
num+=4;
|
||||
LastUsed=num;
|
||||
fill_riga_NR(body,num,1,'N');
|
||||
TPrintrow& rr=body.row(0);
|
||||
@ -1367,7 +1346,7 @@ int TQuadroN::stampa_N(TPrinter& pr,const int ptrN)
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
num-=2;
|
||||
num-=3;
|
||||
FinitaSezione=riga>3;
|
||||
}
|
||||
return LastUsed;
|
||||
@ -1435,7 +1414,7 @@ int TQuadroN::stampa_R(TPrinter& pr,const int ptrR)
|
||||
while (!FinitaSezione)
|
||||
{
|
||||
fill_riga_NR(body,RecNum,0,'R');
|
||||
RecNum+=3;
|
||||
RecNum+=2;
|
||||
LastUsed=RecNum;
|
||||
fill_riga_NR(body,RecNum,1,'R');
|
||||
TPrintrow& rr=body.row(0);
|
||||
@ -1445,7 +1424,7 @@ int TQuadroN::stampa_R(TPrinter& pr,const int ptrR)
|
||||
_RigaCorr++;
|
||||
if (usa_progind())
|
||||
progind()->addstatus(1);
|
||||
RecNum-=2;
|
||||
RecNum-=1;
|
||||
FinitaSezione=RigheStampate>1;
|
||||
}
|
||||
return LastUsed;
|
||||
@ -1535,6 +1514,14 @@ void TBase4::fill_riga_NR(TPrint_section& sec,const int num, const int side)
|
||||
}
|
||||
} */
|
||||
|
||||
int TQuadroN::dic_form_len() const
|
||||
{
|
||||
if (_PaginaPosizionamento)
|
||||
return 72-HEADER_PRIMA_NOPOS;
|
||||
else
|
||||
return 72;
|
||||
}
|
||||
|
||||
bool TQuadroN::print(const long codditta, const long NumFis, const long NumNoFis)
|
||||
{
|
||||
TCursor* cur = cursor();
|
||||
@ -1572,29 +1559,37 @@ bool TQuadroN::print(const long codditta, const long NumFis, const long NumNoFis
|
||||
pr.formlen(TDicForm::dic_form_len());
|
||||
_RigaCorr=0;
|
||||
(*cur)=0L;
|
||||
|
||||
//_PaginaPosizionamento=TRUE;
|
||||
_PaginaPosizionamento=pr.getcurrentpage()==1;
|
||||
bool done=FALSE;
|
||||
while (!done)
|
||||
{
|
||||
jump_to_line(pr, prima_riga(PRIMA));
|
||||
int skip=HEADER_PRIMA_NOPOS;
|
||||
stampa_testata(pr);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 20-skip : 20);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 20-skip : 20);
|
||||
// jump_to_line(pr, 18);
|
||||
ptrN=stampa_N(pr,ptrN);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 26-skip : 26);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 26-skip : 26);
|
||||
// jump_to_line(pr, 23);
|
||||
ptrP=stampa_P(pr,ptrP);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 38-skip : 38);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 38-skip : 38);
|
||||
// if (_RigaCorr < 35) jump_to_line(pr, 35);
|
||||
ptrQ=stampa_Q(pr,ptrQ);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 44-skip : 44);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 44-skip : 44);
|
||||
// if (_RigaCorr < 41) jump_to_line(pr, 41);
|
||||
ptrR=stampa_R(pr,ptrR);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 48-skip : 48);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 48-skip : 48);
|
||||
// if (_RigaCorr < 45) jump_to_line(pr, 45);
|
||||
ptrS=stampa_S(pr,ptrS);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 56-skip : 56);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 56-skip : 56);
|
||||
// if (_RigaCorr < 53) jump_to_line(pr, 53);
|
||||
ptrT=stampa_T(pr,ptrT);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 63-skip : 63);
|
||||
jump_to_line(pr, _PaginaPosizionamento ? 63-skip : 63);
|
||||
// if (_RigaCorr < 60) jump_to_line(pr, 60);
|
||||
stampa_fine(pr);
|
||||
_PaginaPosizionamento=FALSE;
|
||||
next_page(pr);
|
||||
_PaginaPosizionamento=FALSE;
|
||||
pr.formlen(TDicForm::dic_form_len());
|
||||
bool FinitoN = ptrN >= _righeN.items();
|
||||
bool FinitoP = ptrP >= _righeP.items();
|
||||
|
@ -293,6 +293,7 @@ class TQuadroN : public TBase4
|
||||
long _codditta;
|
||||
int _num_foglio;
|
||||
public:
|
||||
virtual int dic_form_len() const;
|
||||
void stampa_fine(TPrinter& pr);
|
||||
int stampa_N(TPrinter& pr,const int ptr);
|
||||
int stampa_P(TPrinter& pr,const int ptr);
|
||||
|
@ -1862,9 +1862,7 @@ bool TQuadroD::controlla_percentuale(TCursor* cur, const real& perc_p)
|
||||
long ditta_p = rec.get_long(QUD_CODDITTA);
|
||||
char tipo_p = rec.get_char(QUD_TIPOA);
|
||||
long codana_p = rec.get_long(QUD_CODANAGR);
|
||||
TString codcaus_p = rec.get (QUD_CODCAUS);
|
||||
if (quadro()[0] == 'D')
|
||||
codcaus_p = cur->curr(-14).get(quadro() == "D" ? "S2" : "S3");
|
||||
TString codcaus_p = cur->curr(-14).get("S2");
|
||||
|
||||
++(*cur);
|
||||
long ditta = rec.get_long(QUD_CODDITTA);
|
||||
@ -1872,14 +1870,13 @@ bool TQuadroD::controlla_percentuale(TCursor* cur, const real& perc_p)
|
||||
long codana = rec.get_long(QUD_CODANAGR);
|
||||
real perc = rec.get_real(QUD_PERC);
|
||||
|
||||
TString codcaus = rec.get (QUD_CODCAUS);
|
||||
if (quadro()[0] == 'D')
|
||||
codcaus = cur->curr(-14).get(quadro() == "D" ? "S2" : "S3");
|
||||
TString codcaus = cur->curr(-14).get("S2");
|
||||
|
||||
if (ditta == ditta_p && tipo == tipo_p &&
|
||||
codana == codana_p && codcaus == codcaus_p)
|
||||
{
|
||||
if (perc == perc_p || (perc_p == ZERO && perc != ZERO))
|
||||
// if (perc == perc_p || (perc_p == ZERO && perc != ZERO))
|
||||
if (perc == perc_p)
|
||||
{
|
||||
stampa = FALSE;
|
||||
_devo_sommare = TRUE;
|
||||
@ -1910,6 +1907,8 @@ void TQuadroD::setta_importi(TPrint_section& body)
|
||||
real imponibile = cur->curr().get_real(QUD_IMPONIBILE);
|
||||
real importo = cur->curr().get_real(QUD_IMPORTO);
|
||||
real netto = cur->curr().get_real(QUD_NETTO);
|
||||
// Setta l'aliquota da programma perche' nel frm non si vede la virgola in "0.00"
|
||||
real perc = cur->curr().get_real("PERC");
|
||||
|
||||
if (_devo_sommare)
|
||||
{
|
||||
@ -1926,7 +1925,8 @@ void TQuadroD::setta_importi(TPrint_section& body)
|
||||
TForm_item& fimponibile = body.find_field(D_IMPONIBILE);
|
||||
TForm_item& fimporto = body.find_field(D_IMPORTO);
|
||||
TForm_item& fnetto = body.find_field(D_NETTO);
|
||||
|
||||
TForm_item& fperc = body.find_field(19);
|
||||
|
||||
TString stotale (totale.string());
|
||||
TString ssomme (somme.string());
|
||||
TString simponibile(imponibile.string());
|
||||
@ -1938,6 +1938,7 @@ void TQuadroD::setta_importi(TPrint_section& body)
|
||||
fimponibile.set(simponibile);
|
||||
fimporto.set(simporto);
|
||||
fnetto.set(snetto);
|
||||
fperc.set(perc == ZERO ? " 0,00" : perc.string("##@,@@"));
|
||||
}
|
||||
|
||||
void TQuadroD::set_body(TPrinter& pr, const char tipo)
|
||||
@ -2302,7 +2303,7 @@ bool TStampaQuadroD::user_create()
|
||||
_form = new TQuadroD("77QD", quadro());
|
||||
|
||||
TString sortkey(80);
|
||||
sortkey.format("CODDITTA|TIPOA|216@->RAGSOC|CODANAGR|CODCAUS|PERC", LF_QUAD, LF_QUAD);
|
||||
sortkey.format("CODDITTA|TIPOA|216@->RAGSOC|CODANAGR|14@->S2|PERC", LF_QUAD, LF_QUAD);
|
||||
_cur = new TSorted_cursor(_form->TForm::relation(), sortkey);
|
||||
|
||||
return TRUE;
|
||||
@ -2396,7 +2397,9 @@ void TQuadroD1::setta_importi(TPrint_section& body)
|
||||
real imponibile = rec.get_real(QD1_IMPONIBILE);
|
||||
real importo = rec.get_real(QD1_IMPORTO);
|
||||
real netto = rec.get_real(QD1_NETTO);
|
||||
|
||||
// Setta l'aliquota da programma perche' nel frm non si vede la virgola in "0.00"
|
||||
real perc = rec.get_real("PERC");
|
||||
|
||||
if (_devo_sommare)
|
||||
{
|
||||
totale += _totale;
|
||||
@ -2414,13 +2417,15 @@ void TQuadroD1::setta_importi(TPrint_section& body)
|
||||
TForm_item& fimponibile = body.find_field(D1_IMPONIBILE);
|
||||
TForm_item& fimporto = body.find_field(D1_IMPORTO);
|
||||
TForm_item& fnetto = body.find_field(D1_NETTO);
|
||||
|
||||
TForm_item& fperc = body.find_field(16);
|
||||
|
||||
TString stotale (totale.string());
|
||||
TString squotapro (quotapro.string());
|
||||
TString sspeseant (speseant.string());
|
||||
TString simponibile(imponibile.string());
|
||||
TString simporto (importo.string());
|
||||
TString snetto (netto.string());
|
||||
|
||||
// Setta i campi
|
||||
ftotale.set(stotale);
|
||||
fquotapro.set(squotapro);
|
||||
@ -2428,6 +2433,7 @@ void TQuadroD1::setta_importi(TPrint_section& body)
|
||||
fimponibile.set(simponibile);
|
||||
fimporto.set(simporto);
|
||||
fnetto.set(snetto);
|
||||
fperc.set(perc == ZERO ? " 0,00" : perc.string("##@,@@"));
|
||||
}
|
||||
|
||||
void TQuadroD1::set_body(TPrinter& pr, const char tipo)
|
||||
@ -2545,6 +2551,7 @@ bool TQuadroD1::print(const long codditta, const long NumFis, const long NumNoFi
|
||||
head.find_field(22).set("");
|
||||
_finite_fis = TRUE;
|
||||
}
|
||||
fill_page(pr,9);
|
||||
stampa_testata(pr);
|
||||
|
||||
for (int righe = 0; righe < QD1_RIGHE_PRIMA && !_finite_fis; righe++)
|
||||
|
@ -79,13 +79,12 @@ TEXT T_ALLSOC
|
||||
BEGIN
|
||||
PROMPT COL1 ROW4 "Allegato Soci "
|
||||
GROUP 1
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BUTTON B_ALLSOC 1 1
|
||||
BEGIN
|
||||
PROMPT 1 ROW4 ""
|
||||
// MESSAGE RUN,771MOD,-7,3
|
||||
MESSAGE RUN,772MOD,-4,S,S
|
||||
PICTURE 123
|
||||
GROUP 1
|
||||
END
|
||||
|
@ -76,7 +76,7 @@ END
|
||||
BUTTON B_ALLSOC 1 1
|
||||
BEGIN
|
||||
PROMPT 1 ROW4 ""
|
||||
// MESSAGE RUN,771MOD,-7,3|K_TAB,RILEGGI_QUADRI
|
||||
MESSAGE RUN,772MOD,-4,S,D
|
||||
PICTURE 123
|
||||
FLAGS MYFLAGS
|
||||
GROUP GRUPPO
|
||||
|
Loading…
x
Reference in New Issue
Block a user