2o merge R97.02
git-svn-id: svn://10.65.10.50/trunk@4759 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2f0ccd9475
commit
1724135242
702
m770/774200.cpp
702
m770/774200.cpp
@ -57,6 +57,7 @@ HIDDEN TRiporti* this_riporti = NULL;
|
||||
HIDDEN TString80 __tmp;
|
||||
|
||||
// Costanti usate per il calcolo dei fogli compilati
|
||||
const int QB_PERCIPIENTI_PER_FOGLIO = 16;
|
||||
const int QC_PERCIPIENTI_PER_FOGLIO = 27;
|
||||
const int QD_PERCIPIENTI_PER_FOGLIO = 22;
|
||||
const int QDB_PERCIPIENTI_PER_FOGLIO = 22;
|
||||
@ -64,8 +65,9 @@ const int QD1_PERCIPIENTI_PER_FOGLIO = 27;
|
||||
const int QE_PERCIPIENTI_PER_FOGLIO = 27;
|
||||
const int QE1_PERCIPIENTI_PER_FOGLIO = 25;
|
||||
const int QE2_PERCIPIENTI_PER_FOGLIO = 13;
|
||||
const int QGD_FISICHE_PER_FOGLIO = 5;
|
||||
const int QGD_NOFISICHE_PER_FOGLIO = 6;
|
||||
const int QF1_PERCIPIENTI_PER_FOGLIO = 13;
|
||||
const int QF2_PERCIPIENTI_PER_FOGLIO = 13;
|
||||
const int QGD_PERCIPIENTI_PER_FOGLIO = 13;
|
||||
|
||||
HIDDEN long fogli_compilati(const long fisiche, const long nofisiche, const int fisiche_x_foglio, const int nofisiche_x_foglio);
|
||||
HIDDEN const char* build_fill_string(TString& qcomp);
|
||||
@ -167,7 +169,7 @@ class TConta_persone
|
||||
TRelation _rel;
|
||||
TLocalisamfile _base, _basebis;
|
||||
long _firm;
|
||||
TRectype _totale, _totale_f, _totale_g;
|
||||
TRectype _totale;
|
||||
long _righe, _fisici, _giuridici;
|
||||
long _fisici_distinti, _giuridici_distinti;
|
||||
|
||||
@ -175,7 +177,7 @@ public:
|
||||
void sum(TRectype& dst, const TRectype& src) const;
|
||||
|
||||
int read_base(const long dich);
|
||||
long compute();
|
||||
long compute(const char* filter = NULL);
|
||||
TLocalisamfile& base() { return _base; }
|
||||
int read_basebis(const long dich);
|
||||
TLocalisamfile& basebis() { return _basebis; }
|
||||
@ -187,9 +189,6 @@ public:
|
||||
long persone_fisiche_distinte() const { return _fisici_distinti; }
|
||||
long persone_giuridiche_distinte() const { return _giuridici_distinti; }
|
||||
long persone_distinte() const { return _fisici_distinti + _giuridici_distinti; }
|
||||
|
||||
const TRectype& totale_fisiche() const { return _totale_f; }
|
||||
const TRectype& totale_giuridiche() const { return _totale_f; }
|
||||
const TRectype& totale() const { return _totale; }
|
||||
|
||||
int fogli_compilati(int fis, int giu = 0) const;
|
||||
@ -199,8 +198,7 @@ public:
|
||||
|
||||
TConta_persone::TConta_persone(int logicnum, long firm)
|
||||
: _rel(logicnum), _firm(firm),
|
||||
_totale(logicnum), _totale_f(logicnum), _totale_g(logicnum),
|
||||
_base(LF_BASE), _basebis(LF_BASEBIS)
|
||||
_totale(logicnum), _base(LF_BASE), _basebis(LF_BASEBIS)
|
||||
{
|
||||
}
|
||||
|
||||
@ -256,52 +254,62 @@ int TConta_persone::read_basebis(const long dich)
|
||||
return err;
|
||||
}
|
||||
|
||||
long TConta_persone::compute()
|
||||
long TConta_persone::compute(const char* filter)
|
||||
{
|
||||
TWait_cursor hourglass;
|
||||
TString80 str;
|
||||
TString str(80);
|
||||
|
||||
str.format("CODDITTA=%ld", _firm);
|
||||
TCursor cur(&_rel, str);
|
||||
TRectype rec(_rel.lfile().num());
|
||||
rec.put("CODDITTA", _firm);
|
||||
|
||||
TCursor cur(&_rel, filter, 1, &rec, &rec);
|
||||
_righe = cur.items();
|
||||
|
||||
str.cut(0);
|
||||
str << "Calcolo riporti del " << _rel.lfile().description()
|
||||
<< "della ditta " << _firm;
|
||||
|
||||
TProgind pi(_righe, str, FALSE, TRUE, 60);
|
||||
|
||||
TAssoc_array fisici, giuridici;
|
||||
_totale.zero();
|
||||
|
||||
_totale_f.zero();
|
||||
_totale_g.zero();
|
||||
|
||||
TRectype& curr = cur.curr();
|
||||
long i;
|
||||
for (i = 0, cur = 0; i < _righe; i++, ++cur)
|
||||
if (_righe > 0)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
char tipoa = curr.get_char("TIPOA");
|
||||
const TString& cod = curr.get("CODANAGR");
|
||||
if (tipoa == 'F')
|
||||
{
|
||||
_fisici++;
|
||||
fisici.add(cod);
|
||||
sum(_totale_f, curr);
|
||||
}
|
||||
else
|
||||
{
|
||||
_giuridici++;
|
||||
giuridici.add(cod);
|
||||
sum(_totale_g, curr);
|
||||
}
|
||||
str.cut(0);
|
||||
str << "Calcolo riporti " << _rel.lfile().description()
|
||||
<< " della ditta " << _firm;
|
||||
|
||||
TProgind pi(_righe, str, FALSE, TRUE, 60);
|
||||
|
||||
TAssoc_array fisici, giuridici;
|
||||
|
||||
TRectype& curr = cur.curr();
|
||||
long i;
|
||||
for (i = 0, cur = 0; i < _righe; i++, ++cur)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
|
||||
if (curr.exist("TIPOA"))
|
||||
{
|
||||
char tipoa = curr.get_char("TIPOA");
|
||||
const TString& cod = curr.get("CODANAGR");
|
||||
if (tipoa == 'F')
|
||||
{
|
||||
_fisici++;
|
||||
fisici.add(cod);
|
||||
}
|
||||
else
|
||||
{
|
||||
_giuridici++;
|
||||
giuridici.add(cod);
|
||||
}
|
||||
}
|
||||
|
||||
sum(_totale, curr);
|
||||
}
|
||||
|
||||
_fisici_distinti = fisici.items();
|
||||
_giuridici_distinti = giuridici.items();
|
||||
}
|
||||
else
|
||||
{
|
||||
_fisici_distinti = 0;
|
||||
_giuridici_distinti = 0;
|
||||
}
|
||||
|
||||
_totale = _totale_f;
|
||||
sum(_totale, _totale_g);
|
||||
|
||||
_fisici_distinti = fisici.items();
|
||||
_giuridici_distinti = giuridici.items();
|
||||
|
||||
return _righe;
|
||||
}
|
||||
@ -799,47 +807,27 @@ bool TRiporti::set(const TString& quadro, int anno, const long codditta, const l
|
||||
|
||||
if (quadro == "F" || quadro == "*")
|
||||
{
|
||||
rel = new TRelation (LF_QUAF);
|
||||
filt.format("CODDITTA=%ld", _codditta);
|
||||
cur = new TCursor(rel,filt,1);
|
||||
calcola_riporti_F (cur, dichiarante);
|
||||
delete cur; delete rel;
|
||||
calcola_riporti_F (dichiarante);
|
||||
}
|
||||
|
||||
if (quadro == "F1" || quadro == "*")
|
||||
{
|
||||
rel = new TRelation (LF_QUAF1);
|
||||
filt.format("CODDITTA=%ld", _codditta);
|
||||
cur = new TCursor(rel,filt,1);
|
||||
calcola_riporti_F1 (cur, dichiarante);
|
||||
delete cur; delete rel;
|
||||
calcola_riporti_F1 (dichiarante);
|
||||
}
|
||||
|
||||
if (quadro == "F2" || quadro == "*")
|
||||
{
|
||||
rel = new TRelation (LF_QUAF2);
|
||||
filt.format("CODDITTA=%ld", _codditta);
|
||||
cur = new TCursor(rel,filt,1);
|
||||
calcola_riporti_F2 (cur, dichiarante);
|
||||
delete cur; delete rel;
|
||||
calcola_riporti_F2 (dichiarante);
|
||||
}
|
||||
|
||||
if (quadro == "G" || quadro == "*")
|
||||
{
|
||||
rel = new TRelation (LF_QUAG);
|
||||
filt.format("CODDITTA=%ld", _codditta);
|
||||
cur = new TCursor(rel,filt,1);
|
||||
calcola_riporti_G (cur, dichiarante);
|
||||
delete cur; delete rel;
|
||||
calcola_riporti_G (dichiarante);
|
||||
}
|
||||
|
||||
if (quadro == "G1" || quadro == "*")
|
||||
{
|
||||
rel = new TRelation (LF_QUAG1);
|
||||
filt.format("CODDITTA=%ld", _codditta);
|
||||
cur = new TCursor(rel,filt,1);
|
||||
calcola_riporti_G1 (cur, dichiarante);
|
||||
delete cur; delete rel;
|
||||
calcola_riporti_G1 (dichiarante);
|
||||
}
|
||||
setta_flag_quadro_I(_codditta);
|
||||
return TRUE;
|
||||
@ -1347,248 +1335,73 @@ void TRiporti::calcola_riporti_E2(const long dich)
|
||||
}
|
||||
}
|
||||
|
||||
void TRiporti::calcola_riporti_F(TCursor* cur, const long dich)
|
||||
void TRiporti::calcola_riporti_F(const long dich)
|
||||
{
|
||||
return; // Per ora non devo riportare una minchia: Tracciati della bega.
|
||||
|
||||
TLocalisamfile basebis (LF_BASEBIS);
|
||||
TRecord_array* _prosp_a, *_prosp_b, *_prosp_c;
|
||||
|
||||
real a_sogrit, a_rope, b_sogrit, b_rope, c_sogrit, c_rope;
|
||||
real e_sogrit, e_rope, f_rope, f_sogrit;
|
||||
real g_sogrit, g_rope, h_rope, h_sogrit;
|
||||
|
||||
real i20_1, i20_2, i20_3, i20_4, i20_5, i20_6, i21_1, i21_2, i21_3;
|
||||
bool almeno_una_riga = FALSE;
|
||||
|
||||
(*cur) = 0L;
|
||||
TRecnotype items = cur->items();
|
||||
|
||||
TString scritta(60);
|
||||
scritta.format("Calcolo riporti del quadro F per la ditta %ld", _codditta);
|
||||
|
||||
i20_4 = cur->curr().get_real(QF0_A1);
|
||||
i20_5 = cur->curr().get_real(QF0_A2);
|
||||
i20_6 = cur->curr().get_real(QF0_A3);
|
||||
i21_1 = cur->curr().get_real(QF0_A4);
|
||||
e_sogrit = cur->curr().get_real(QF0_ESOGRIT);
|
||||
f_sogrit = cur->curr().get_real(QF0_FSOGRIT);
|
||||
e_rope = cur->curr().get_real(QF0_EROPE);
|
||||
f_rope = cur->curr().get_real(QF0_FROPE);
|
||||
|
||||
// Per stabilire se il quadro e' stato compilato verifica anche i campi
|
||||
// fuori dagli spreadsheet
|
||||
almeno_una_riga = i20_4 != ZERO || i20_5 != ZERO || i20_6 != ZERO ||
|
||||
i21_1 != ZERO || e_sogrit != ZERO || f_sogrit != ZERO || e_rope != ZERO ||
|
||||
f_rope != ZERO;
|
||||
|
||||
TLocalisamfile rf(LF_RIGHEF);
|
||||
|
||||
TRectype dep(rf.curr());
|
||||
dep.zero();
|
||||
dep.put("CODDITTA", _codditta);
|
||||
dep.put("TIPOPRO", "A");
|
||||
_prosp_a = new TRecord_array(dep, "NPROG");
|
||||
_prosp_a->read(dep);
|
||||
dep.put("TIPOPRO", "B");
|
||||
_prosp_b = new TRecord_array(dep, "NPROG");
|
||||
_prosp_b->read(dep);
|
||||
dep.put("TIPOPRO", "C");
|
||||
_prosp_c = new TRecord_array(dep, "NPROG");
|
||||
_prosp_c->read(dep);
|
||||
|
||||
items = _prosp_a->last_row() + _prosp_b->last_row() + _prosp_c->last_row();
|
||||
TProgind progn(items, scritta, FALSE, TRUE);
|
||||
|
||||
for (int i = 1; i <= _prosp_a->last_row(); i++)
|
||||
TConta_persone conta(LF_RIGHEF, _codditta);
|
||||
int err = conta.read_basebis(dich);
|
||||
if (err == NOERR)
|
||||
{
|
||||
TRectype& r = _prosp_a->row(i, TRUE);
|
||||
a_sogrit += r.get_real(RQF0_SOGRIT);
|
||||
a_rope += r.get_real(RQF0_ROPE);
|
||||
almeno_una_riga = TRUE;
|
||||
progn.addstatus(1);
|
||||
}
|
||||
i20_1 = a_sogrit;
|
||||
i20_2 = a_rope;
|
||||
long righe = conta.compute("TIPOPRO!=\"H\"");
|
||||
const TRectype& totale = conta.totale();
|
||||
TRectype& base = conta.basebis().curr();
|
||||
|
||||
for (i = 1; i <= _prosp_b->last_row(); i++)
|
||||
{
|
||||
TRectype& r = _prosp_b->row(i, TRUE);
|
||||
b_sogrit += r.get_real(RQF0_SOGRIT);
|
||||
b_rope += r.get_real(RQF0_ROPE);
|
||||
almeno_una_riga = TRUE;
|
||||
progn.addstatus(1);
|
||||
}
|
||||
base.put(BSB_F0SSRITBF, totale.get(RQF0_SOGRIT));
|
||||
base.put(BSB_F0ROPEBF, totale.get(RQF0_ROPE));
|
||||
|
||||
for (i = 1; i <= _prosp_c->last_row(); i++)
|
||||
{
|
||||
TRectype& r = _prosp_c->row(i, TRUE);
|
||||
c_sogrit += r.get_real(RQF0_SOGRIT);
|
||||
c_rope += r.get_real(RQF0_ROPE);
|
||||
almeno_una_riga = TRUE;
|
||||
progn.addstatus(1);
|
||||
}
|
||||
righe += conta.compute("TIPOPRO=\"H\"");
|
||||
base.put(BSB_F0AMMPRO, totale.get(RQF0_SOGRIT));
|
||||
base.put(BSB_F0PREOPE, totale.get(RQF0_ROPE));
|
||||
|
||||
i21_2 += b_sogrit + c_sogrit + e_sogrit + f_sogrit;
|
||||
i21_3 += b_rope + c_rope + e_rope + f_rope;
|
||||
conta.basebis().rewrite();
|
||||
|
||||
basebis.setkey(1);
|
||||
basebis.zero();
|
||||
if (dich)
|
||||
{
|
||||
basebis.put("TIPOQUA", COD_QUA_I_DIC);
|
||||
basebis.put(BSB_CODDITTA, dich);
|
||||
err = conta.read_basebis(0);
|
||||
if (err == NOERR)
|
||||
setta_flag_quadri_comp(_codditta, F, righe > 0, conta.basebis(), dich);
|
||||
}
|
||||
else
|
||||
basebis.put(BSB_CODDITTA, _codditta);
|
||||
|
||||
if (basebis.read(_isequal, _lock) == NOERR)
|
||||
{
|
||||
basebis.put(BSB_F0SRITA, i20_1);
|
||||
basebis.put(BSB_F0ROPEA, i20_2);
|
||||
basebis.put(BSB_F0TACCA, i20_3);
|
||||
basebis.put(BSB_F0EDACCA, i20_4);
|
||||
basebis.put(BSB_F0ERIMA, i20_5);
|
||||
basebis.put(BSB_F0SSVA, i20_6);
|
||||
basebis.put(BSB_F0ROPEVA, i21_1);
|
||||
basebis.put(BSB_F0SSRITBF, i21_2);
|
||||
basebis.put(BSB_F0ROPEBF, i21_3);
|
||||
basebis.rewrite();
|
||||
setta_flag_quadri_comp(_codditta, F, almeno_una_riga,basebis,dich);
|
||||
}
|
||||
else
|
||||
warning_box("Dichiarazione non presente. Impossibile registrare i riporti");
|
||||
}
|
||||
|
||||
void TRiporti::calcola_riporti_F1(TCursor* cur, const long dich)
|
||||
void TRiporti::calcola_riporti_F1(const long dich)
|
||||
{
|
||||
TLocalisamfile basebis (LF_BASEBIS);
|
||||
TLocalisamfile* rf;
|
||||
TRecord_array* _prosp_b;
|
||||
real b_sogrit, b_rope;
|
||||
real i22_1, i22_2;
|
||||
real f1a1=ZERO, f1a2=ZERO;
|
||||
bool almeno_una_riga = FALSE;
|
||||
|
||||
b_sogrit = b_rope = ZERO;
|
||||
i22_1 = i22_2 = ZERO;
|
||||
|
||||
(*cur) = 0L;
|
||||
TRecnotype items = cur->items();
|
||||
|
||||
TString scritta(60);
|
||||
scritta.format("Calcolo riporti del quadro F-1 per la ditta %ld", _codditta);
|
||||
|
||||
f1a1 = cur->curr().get_real("F1_A1");
|
||||
f1a2 = cur->curr().get_real("F1_A2");
|
||||
almeno_una_riga = (f1a1 != ZERO) || (f1a2 != ZERO);
|
||||
|
||||
rf = new TLocalisamfile(LF_RIGHEF1);
|
||||
|
||||
TRectype dep(rf->curr());
|
||||
dep.zero();
|
||||
dep.put("CODDITTA", _codditta);
|
||||
// dep.put("TIPOPRO", "B");
|
||||
_prosp_b = new TRecord_array(dep, "NPROG");
|
||||
_prosp_b->read(dep);
|
||||
|
||||
items = _prosp_b->last_row();
|
||||
TProgind progn(items, scritta, FALSE, TRUE);
|
||||
|
||||
for (int i = 1; i <= _prosp_b->last_row(); i++)
|
||||
TConta_persone conta(LF_RIGHEF1, _codditta);
|
||||
int err = conta.read_basebis(dich);
|
||||
if (err == NOERR)
|
||||
{
|
||||
TRectype& r = _prosp_b->row(i, TRUE);
|
||||
b_sogrit += r.get_real(QUF_SOGRIT);
|
||||
b_rope += r.get_real(QUF_ROPE);
|
||||
if (!almeno_una_riga) almeno_una_riga = TRUE;
|
||||
progn.addstatus(1);
|
||||
}
|
||||
conta.compute();
|
||||
const TRectype& totale = conta.totale();
|
||||
TRectype& base = conta.basebis().curr();
|
||||
|
||||
i22_1 += b_sogrit;
|
||||
i22_2 += b_rope;
|
||||
base.put(BSB_F1NFCOM, conta.fogli_compilati(QF1_PERCIPIENTI_PER_FOGLIO));
|
||||
base.put(BSB_F1NPER, conta.persone_distinte());
|
||||
base.put(BSB_F1SSRIT, totale.get(RQF1_SOGRIT));
|
||||
base.put(BSB_F1ROPE, totale.get(RQF1_ROPE));
|
||||
|
||||
conta.basebis().rewrite();
|
||||
|
||||
basebis.setkey(1);
|
||||
basebis.zero();
|
||||
if (dich)
|
||||
{
|
||||
basebis.put("TIPOQUA", COD_QUA_I_DIC);
|
||||
basebis.put(BSB_CODDITTA, dich);
|
||||
err = conta.read_basebis(0);
|
||||
if (err == NOERR)
|
||||
setta_flag_quadri_comp(_codditta, F1, conta.righe() > 0, conta.basebis(), dich);
|
||||
}
|
||||
else
|
||||
basebis.put(BSB_CODDITTA, _codditta);
|
||||
|
||||
if (basebis.read(_isequal, _lock) == NOERR)
|
||||
{
|
||||
basebis.put(BSB_F1SSRIT, i22_1);
|
||||
basebis.put(BSB_F1ROPE, i22_2);
|
||||
basebis.rewrite();
|
||||
setta_flag_quadri_comp(_codditta, F1, almeno_una_riga,basebis,dich);
|
||||
}
|
||||
else
|
||||
warning_box("Dichiarazione non presente. Impossibile registrare i riporti");
|
||||
}
|
||||
|
||||
void TRiporti::calcola_riporti_F2(TCursor* cur, const long dich)
|
||||
{
|
||||
TLocalisamfile basebis (LF_BASEBIS);
|
||||
TLocalisamfile* rf;
|
||||
TRecord_array* _prosp_b;
|
||||
real b_sogrit, b_rope;
|
||||
real i23_1, i23_2;
|
||||
bool almeno_una_riga = FALSE;
|
||||
|
||||
b_sogrit = b_rope = ZERO;
|
||||
i23_1 = i23_2 = ZERO;
|
||||
|
||||
(*cur) = 0L;
|
||||
TRecnotype items = cur->items();
|
||||
|
||||
TString scritta(60);
|
||||
scritta.format("Calcolo riporti del quadro F-2 per la ditta %ld", _codditta);
|
||||
|
||||
rf = new TLocalisamfile(LF_RIGHEF2);
|
||||
|
||||
TRectype dep(rf->curr());
|
||||
dep.zero();
|
||||
dep.put("CODDITTA", _codditta);
|
||||
dep.put("TIPOPRO", "B");
|
||||
_prosp_b = new TRecord_array(dep, "NPROG");
|
||||
_prosp_b->read(dep);
|
||||
|
||||
items = _prosp_b->last_row();
|
||||
TProgind progn(items, scritta, FALSE, TRUE);
|
||||
|
||||
for (int i = 1; i <= _prosp_b->last_row(); i++)
|
||||
void TRiporti::calcola_riporti_F2(const long dich)
|
||||
{
|
||||
TConta_persone conta(LF_RIGHEF2, _codditta);
|
||||
int err = conta.read_basebis(dich);
|
||||
if (err == NOERR)
|
||||
{
|
||||
TRectype& r = _prosp_b->row(i, TRUE);
|
||||
b_sogrit += r.get_real(RQF2_SOGRIT);
|
||||
b_rope += r.get_real(RQF2_ROPE);
|
||||
if (!almeno_una_riga) almeno_una_riga = TRUE;
|
||||
progn.addstatus(1);
|
||||
}
|
||||
conta.compute();
|
||||
const TRectype& totale = conta.totale();
|
||||
TRectype& base = conta.basebis().curr();
|
||||
|
||||
i23_1 += b_sogrit;
|
||||
i23_2 += b_rope;
|
||||
base.put(BSB_F2SSRIT, totale.get(RQF2_SOGRIT));
|
||||
base.put(BSB_F2ROPE, totale.get(RQF2_ROPE));
|
||||
|
||||
conta.basebis().rewrite();
|
||||
|
||||
basebis.setkey(1);
|
||||
basebis.zero();
|
||||
if (dich)
|
||||
{
|
||||
basebis.put("TIPOQUA", COD_QUA_I_DIC);
|
||||
basebis.put(BSB_CODDITTA, dich);
|
||||
err = conta.read_basebis(0);
|
||||
if (err == NOERR)
|
||||
setta_flag_quadri_comp(_codditta, F2, conta.righe() > 0, conta.basebis(), dich);
|
||||
}
|
||||
else
|
||||
basebis.put(BSB_CODDITTA, _codditta);
|
||||
|
||||
if (basebis.read(_isequal, _lock) == NOERR)
|
||||
{
|
||||
basebis.put(BSB_F2SSRIT, i23_1);
|
||||
basebis.put(BSB_F2ROPE, i23_2);
|
||||
basebis.rewrite();
|
||||
setta_flag_quadri_comp(_codditta, F2, almeno_una_riga,basebis,dich);
|
||||
}
|
||||
else
|
||||
warning_box("Dichiarazione non presente. Impossibile registrare i riporti");
|
||||
}
|
||||
|
||||
//
|
||||
@ -1599,7 +1412,7 @@ void TRiporti::calcola_riporti_F2(TCursor* cur, const long dich)
|
||||
// di posti previsto nel modulo.
|
||||
// Se il resto e' diverso da 0 conta un foglio in piu'
|
||||
//
|
||||
long fogli_compilati(const long fisiche, const long no_fisiche, const int fisiche_x_foglio, const int nofisiche_x_foglio)
|
||||
HIDDEN long fogli_compilati(const long fisiche, const long no_fisiche, const int fisiche_x_foglio, const int nofisiche_x_foglio)
|
||||
{
|
||||
long fogli_compilati=0L, fogli_fisiche=0L, fogli_nofisiche=0L;
|
||||
|
||||
@ -1620,175 +1433,158 @@ long fogli_compilati(const long fisiche, const long no_fisiche, const int fisich
|
||||
return fogli_compilati;
|
||||
}
|
||||
|
||||
void TRiporti::calcola_riporti_G(TCursor* cur, const long dich)
|
||||
void TRiporti::calcola_riporti_G(const long dich)
|
||||
{
|
||||
TLocalisamfile basebis (LF_BASEBIS);
|
||||
real b_sogrit, b_rope;
|
||||
real i24_1, i24_2, i24_3, i24_4, i24_5, i24_6;
|
||||
real i24_7, i24_8, i24_9, i24_10, i24_11, i24_12;
|
||||
real i24_13, i25_4;
|
||||
bool almeno_una_riga=FALSE, almeno_una_riga_distinta=FALSE,almeno_una_riga_prospetti=FALSE;
|
||||
long fogli_comp = 0L, percipienti=0L;
|
||||
TRelation* relp;
|
||||
TCursor* curp;
|
||||
int fisiche = 0, no_fisiche = 0;
|
||||
TString filt(20);
|
||||
|
||||
i24_1 = i24_2 = i24_3 = i24_4 = i24_5 = i24_6 = ZERO;
|
||||
i24_7 = i24_8 = i24_9 = i24_10 = i24_11 = i24_12 = ZERO;
|
||||
i24_13 = ZERO;
|
||||
i25_4 = ZERO;
|
||||
|
||||
(*cur) = 0L;
|
||||
TRecnotype items = cur->items();
|
||||
|
||||
// Legge quadro G
|
||||
//i24_2 = cur->curr().get_real(QG_P1NUMQT);
|
||||
//i24_3 = cur->curr().get_real(QG_P1AMMT);
|
||||
//i24_4 = cur->curr().get_real(QG_P2VALT);
|
||||
//i24_5 = cur->curr().get_real(QG_P22TOT);
|
||||
//i24_6 = cur->curr().get_real(QG_P33TOT);
|
||||
//i24_7 = cur->curr().get_real(QG_P35TOT);
|
||||
//i24_8 = cur->curr().get_real(QG_P36TOT);
|
||||
//i24_9 = cur->curr().get_real(QG_P37TOT);
|
||||
almeno_una_riga_prospetti = i24_2 != ZERO || i24_3 != ZERO
|
||||
|| i24_4 != ZERO
|
||||
|| i24_5 != ZERO || i24_6 != ZERO || i24_7 != ZERO
|
||||
|| i24_8 != ZERO || i24_9 != ZERO;
|
||||
|
||||
TString scritta(60);
|
||||
// scritta.format("Calcolo riporti del quadro G per la ditta %ld", _codditta);
|
||||
|
||||
// Scorre quadrogd (distinta)
|
||||
relp = new TRelation (LF_QUAGD);
|
||||
filt.format("CODDITTA=%ld", _codditta);
|
||||
curp = new TCursor(relp,filt,1);
|
||||
(*curp) = 0L;
|
||||
TRecnotype ItemDistinta = curp->items();
|
||||
scritta.format("Calcolo riporti del quadro G per la ditta %ld", _codditta);
|
||||
TProgind progn(ItemDistinta, scritta, FALSE, TRUE);
|
||||
|
||||
char tipoap = 'Z';
|
||||
long codanagrp = -1;
|
||||
|
||||
for (int i = 0; i < ItemDistinta; i++, ++(*curp))
|
||||
TConta_persone conta(LF_QUAGD, _codditta);
|
||||
int err = conta.read_basebis(dich);
|
||||
if (err == NOERR)
|
||||
{
|
||||
const char tipoa = curp->curr().get_char(QGD_TIPOA);
|
||||
const long codanagr = curp->curr().get_long(QGD_CODANAGR);
|
||||
|
||||
if ( (tipoa != tipoap) || (codanagr != codanagrp) )
|
||||
percipienti++;
|
||||
|
||||
tipoap = tipoa;
|
||||
codanagrp = codanagr;
|
||||
|
||||
if (tipoa == 'F')
|
||||
fisiche++;
|
||||
else
|
||||
no_fisiche++;
|
||||
|
||||
i24_11 += curp->curr().get_real(QGD_UTSPETT);
|
||||
i24_12 += curp->curr().get_real(QGD_UTPAG);
|
||||
i24_13 += curp->curr().get_real(QGD_ROPE);
|
||||
i25_4 += curp->curr().get_real(QGD_ROPESPET);
|
||||
|
||||
almeno_una_riga_distinta = TRUE;
|
||||
|
||||
progn.addstatus(1);
|
||||
}
|
||||
|
||||
// E' compilato se c'e' qualcosa nel G o nella distinta fax 15.7.96 p.1
|
||||
almeno_una_riga = almeno_una_riga_prospetti || almeno_una_riga_distinta;
|
||||
TWait_cursor hourglass;
|
||||
int numero_fogli = 0;
|
||||
TString str(80);
|
||||
real i28_7, i28_8, i28_9, i28_10, i28_11, i29_12, i29_13;
|
||||
|
||||
TLocalisamfile quadro(LF_QUAG);
|
||||
quadro.put("CODDITTA", _codditta);
|
||||
if (quadro.read() == NOERR)
|
||||
{
|
||||
i28_7 = quadro.get_real("UTILIAP21") + quadro.get_real("UTILIAP22");
|
||||
i28_8 = quadro.get_real("UTILI21") + quadro.get_real("UTILI22");
|
||||
if (i28_7 != ZERO || i28_8 != ZERO)
|
||||
numero_fogli = 1;
|
||||
}
|
||||
|
||||
TRelation rel(LF_QUAGP);
|
||||
TRectype rec(LF_QUAGP);
|
||||
rec.put("CODDITTA", _codditta);
|
||||
TCursor cur(&rel, "PROSPETTO=2", &rec, &rec);
|
||||
long righe = cur.items();
|
||||
if (righe > 0)
|
||||
{
|
||||
const char* const precompiled[6] = { "00,00", "10,00A", "10,00I",
|
||||
"12,50I", "15,00I", "32,40I" };
|
||||
int righe_inserite[2] = { 0, 0 };
|
||||
|
||||
str.cut(0);
|
||||
str << "Calcolo riporti Quadro G della ditta " << _codditta;
|
||||
TProgind pi(righe, str, FALSE, TRUE, 60);
|
||||
|
||||
TRectype& curr = cur.curr();
|
||||
long i;
|
||||
for (i = 0, cur = 0; i < righe; i++, ++cur)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
|
||||
fogli_comp = fogli_compilati(fisiche,no_fisiche,QGD_FISICHE_PER_FOGLIO,QGD_NOFISICHE_PER_FOGLIO);
|
||||
// Considera anche la parte del G (prospetti 1-2-3-4)
|
||||
if (almeno_una_riga_prospetti && fogli_comp==0)
|
||||
fogli_comp++;
|
||||
const real campo3 = curr.get("UTILI1S");
|
||||
const real campo4 = curr.get("UTILI2S");
|
||||
const real campo7 = curr.get("ROPE");
|
||||
const char titolo = toupper(curr.get_char("TITOLO"));
|
||||
i28_9 += campo3;
|
||||
i28_10 += campo4;
|
||||
switch(titolo)
|
||||
{
|
||||
case 'A': i28_11 += campo7; break;
|
||||
case 'I': i29_12 += campo7; break;
|
||||
default : i29_13 += campo3 + campo4; break;
|
||||
}
|
||||
|
||||
const real aliquota = curr.get("PERC");
|
||||
str = aliquota.string("@@,@@"); str << titolo;
|
||||
for (int p = 5; p >= 0 && str != precompiled[p]; p--);
|
||||
if (p < 0) // E' una riga non precompilata
|
||||
{
|
||||
const int sez = curr.get_int("SEZIONE");
|
||||
CHECK(sez == 1 || sez == 2, "Prospetto ignobile");
|
||||
righe_inserite[sez-1]++;
|
||||
}
|
||||
}
|
||||
|
||||
const int ri = max(righe_inserite[0], righe_inserite[1]);
|
||||
const int fc = (ri-1) / 3 + (righe > 0); // Fogli necessari
|
||||
if (fc > numero_fogli)
|
||||
numero_fogli = fc;
|
||||
}
|
||||
|
||||
// Calcola fogli necessari per il prospetto 1
|
||||
cur.setfilter("PROSPETTO=1");
|
||||
righe = cur.items();
|
||||
if (righe > 0)
|
||||
{
|
||||
const int fc = int(righe - 1) / 4 + 1;
|
||||
if (fc > numero_fogli)
|
||||
numero_fogli = fc;
|
||||
}
|
||||
|
||||
// Calcolo distinta del quadro G
|
||||
righe = conta.compute();
|
||||
|
||||
basebis.setkey(1);
|
||||
basebis.zero();
|
||||
if (dich)
|
||||
{
|
||||
basebis.put("TIPOQUA", COD_QUA_I_DIC);
|
||||
basebis.put(BSB_CODDITTA, dich);
|
||||
}
|
||||
else
|
||||
basebis.put(BSB_CODDITTA, _codditta);
|
||||
|
||||
if (basebis.read(_isequal, _lock) == NOERR)
|
||||
{
|
||||
basebis.put(BSB_G0NFCOM, (long)fogli_comp);
|
||||
basebis.put(BSB_G0NPER, (long)percipienti);
|
||||
basebis.put(BSB_G0USPE, i24_11);
|
||||
basebis.put(BSB_G0UPAG, i24_12);
|
||||
basebis.put(BSB_G0ROPE, i24_13);
|
||||
basebis.put(BSB_G0NAZI1, i24_2);
|
||||
basebis.put(BSB_G0UDEN1, i24_3);
|
||||
basebis.put(BSB_G0UNAT1, i24_4);
|
||||
basebis.put(BSB_G0IUTI2, i24_5);
|
||||
basebis.put(BSB_G0USRIT3, i24_6);
|
||||
basebis.put(BSB_G0RACC3, i24_7);
|
||||
basebis.put(BSB_G0RIMP3, i24_8);
|
||||
basebis.put(BSB_G0UNSRIT3, i24_9);
|
||||
basebis.put(BSB_G0RITSPET, i25_4);
|
||||
basebis.rewrite();
|
||||
setta_flag_quadri_comp(_codditta, G, almeno_una_riga,basebis,dich);
|
||||
}
|
||||
else
|
||||
warning_box("Dichiarazione non presente. Impossibile registrare i riporti");
|
||||
// Calcolo fogli necessari per la distinta
|
||||
if (righe > 0)
|
||||
{
|
||||
const int fc = conta.fogli_compilati(QGD_PERCIPIENTI_PER_FOGLIO);
|
||||
if (fc > numero_fogli)
|
||||
numero_fogli = fc;
|
||||
}
|
||||
|
||||
const TRectype& totale = conta.totale();
|
||||
TRectype& base = conta.basebis().curr();
|
||||
|
||||
base.put(BSB_G0NFCOM, numero_fogli);
|
||||
base.put(BSB_G0NPER, conta.persone_distinte());
|
||||
base.put(BSB_G0USPE, totale.get("UTSPET"));
|
||||
base.put(BSB_G0RITSPET, totale.get("ROPESPET"));
|
||||
base.put(BSB_G0UPAG, totale.get("UTPAG"));
|
||||
base.put(BSB_G0ROPE, totale.get("ROPE"));
|
||||
base.put(BSB_G0UTDACOR, i28_7);
|
||||
base.put(BSB_G0UTDELDIS, i28_8);
|
||||
base.put(BSB_G0UTCOR1S, i28_9);
|
||||
base.put(BSB_G0UTCOR2S, i28_10);
|
||||
base.put(BSB_G0RACC3, i28_11);
|
||||
base.put(BSB_G0RIMP3, i29_12);
|
||||
base.put(BSB_G0UNSRIT3, i29_13);
|
||||
conta.basebis().rewrite();
|
||||
|
||||
err = conta.read_basebis(0);
|
||||
if (err == NOERR)
|
||||
setta_flag_quadri_comp(_codditta, G, numero_fogli > 0, conta.basebis(), dich);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void TRiporti::calcola_riporti_G1 (TCursor* cur, const long dich)
|
||||
void TRiporti::calcola_riporti_G1 (const long dich)
|
||||
{
|
||||
TLocalisamfile basebis (LF_BASEBIS);
|
||||
real i27_1, i27_2, i27_3, i27_4, i27_5;
|
||||
bool almeno_una_riga = FALSE;
|
||||
|
||||
i27_1 = i27_2 = i27_3 = i27_4 = i27_5 = ZERO;
|
||||
(*cur) = 0L;
|
||||
TRecnotype items = cur->items();
|
||||
TConta_persone conta(LF_QUAG1, _codditta);
|
||||
int err = conta.read_basebis(dich);
|
||||
if (err == NOERR)
|
||||
{
|
||||
TRectype& base = conta.basebis().curr();
|
||||
const TRectype& totale = conta.totale();
|
||||
|
||||
real i31_7, i31_8;
|
||||
long righe = conta.compute("ALIQUOTA=0");
|
||||
if (righe > 0)
|
||||
{
|
||||
i31_7 = totale.get_real(QG1_UTILI1S);
|
||||
i31_8 = totale.get_real(QG1_UTILI2S);
|
||||
}
|
||||
|
||||
righe = conta.compute();
|
||||
base.put(BSB_G1UTCOR1S, totale.get(QG1_UTILI1S));
|
||||
base.put(BSB_G1UTCOR2S, totale.get(QG1_UTILI2S));
|
||||
base.put(BSB_G1RITAV1, totale.get(QG1_RACCVER1S));
|
||||
base.put(BSB_G1RITAV2, totale.get(QG1_RACCVER2S));
|
||||
base.put(BSB_G1RITIV1, totale.get(QG1_RIMPVER1S));
|
||||
base.put(BSB_G1RITIV2, totale.get(QG1_RIMPVER2S));
|
||||
base.put(BSB_G1UTNSR1S, i31_7);
|
||||
base.put(BSB_G1UTNSR2S, i31_8);
|
||||
conta.basebis().rewrite();
|
||||
|
||||
i27_1 = cur->curr().get_real(QG1_P12TOT);
|
||||
i27_2 = cur->curr().get_real(QG1_P13TOT);
|
||||
i27_3 = cur->curr().get_real(QG1_P15TOT);
|
||||
i27_4 = cur->curr().get_real(QG1_P16TOT);
|
||||
i27_5 = cur->curr().get_real(QG1_P17TOT);
|
||||
|
||||
almeno_una_riga = (i27_1 != ZERO) || (i27_2 != ZERO) || (i27_3 != ZERO) ||
|
||||
(i27_4 != ZERO) || (i27_5 != ZERO);
|
||||
TString scritta(60);
|
||||
scritta.format("Calcolo riporti del quadro G-1 per la ditta %ld", _codditta);
|
||||
TProgind progn(items, scritta, FALSE, TRUE);
|
||||
|
||||
basebis.setkey(1);
|
||||
basebis.zero();
|
||||
if (dich)
|
||||
{
|
||||
basebis.put("TIPOQUA", COD_QUA_I_DIC);
|
||||
basebis.put(BSB_CODDITTA, dich);
|
||||
err = conta.read_basebis(0);
|
||||
if (err == NOERR)
|
||||
setta_flag_quadri_comp(_codditta, G1, conta.righe() > 0, conta.basebis(), dich);
|
||||
}
|
||||
else
|
||||
basebis.put(BSB_CODDITTA, _codditta);
|
||||
|
||||
if (basebis.read(_isequal, _lock) == NOERR)
|
||||
{
|
||||
basebis.put(BSB_G1UCOR, i27_1);
|
||||
basebis.put(BSB_G1USRIT, i27_2);
|
||||
basebis.put(BSB_G1RACC, i27_3);
|
||||
basebis.put(BSB_G1RIMP, i27_4);
|
||||
basebis.put(BSB_G1UNSRIT, i27_5);
|
||||
basebis.rewrite();
|
||||
setta_flag_quadri_comp(_codditta, G1, almeno_una_riga,basebis,dich);
|
||||
}
|
||||
else
|
||||
warning_box("Dichiarazione non presente. Impossibile registrare i riporti");
|
||||
|
||||
progn.addstatus(1);
|
||||
}
|
||||
|
||||
HIDDEN const int QB_NUMPERC_PER_FOGLIO = 16;
|
||||
|
||||
void TRiporti::calcola_riporti_B (TCursor* cur, const long dich)
|
||||
{
|
||||
TLocalisamfile base (LF_BASE);
|
||||
@ -1847,7 +1643,7 @@ void TRiporti::calcola_riporti_B (TCursor* cur, const long dich)
|
||||
progn.addstatus(1);
|
||||
}
|
||||
|
||||
fogli_comp = fogli_compilati(items,0L,QB_NUMPERC_PER_FOGLIO,0);
|
||||
fogli_comp = fogli_compilati(items,0L,QB_PERCIPIENTI_PER_FOGLIO,0);
|
||||
|
||||
c1 = fogli_comp;
|
||||
c2 = NumPerc;
|
||||
|
@ -13,7 +13,7 @@ bool filter_func (const TRelation *);
|
||||
enum {A,A1,A2,A3,B,B1,C,D,D1,E,E1,E2,F,F1,F2,G,G1,H,I,L,N,P,Q,R,S,T,AB,DB,U};
|
||||
|
||||
const int CAMPI_IB1 = 61;
|
||||
const int CAMPI_IB2 = 50;
|
||||
const int CAMPI_IB2 = 53;
|
||||
const int CAMPI_A = 53;
|
||||
|
||||
HIDDEN const char* _campi_I1[CAMPI_IB1] = { BSE_A0NFCOM,BSE_A0NLDIP,BSE_A0COBB,BSE_A0CNET,BSE_A0EPREV,BSE_A0IITRA,
|
||||
@ -28,15 +28,19 @@ HIDDEN const char* _campi_I1[CAMPI_IB1] = { BSE_A0NFCOM,BSE_A0NLDIP,BSE_A0COBB,B
|
||||
BSE_D0ROPE,BSE_D0CIIAUT,BSE_D1NFCOM,BSE_D1NPER,BSE_D1TACOR,BSE_D1SNSRIT,
|
||||
BSE_D1ROPE};
|
||||
|
||||
HIDDEN const char* _campi_I2[CAMPI_IB2] = { BSB_E0NFCOM,BSB_E0NPER,BSB_E0AIMP,BSB_E0ROPE,BSB_E0SNSRIT,BSB_E1NFCOM,
|
||||
BSB_E1NPER,BSB_E1SCOR,BSB_E1BCOM,BSB_E1ROPE,BSB_E1ACOM,BSB_E1BCOM2,
|
||||
BSB_E1ROPE2,BSB_E2NFCOM,BSB_E2NPER,BSB_E2ROPE,BSB_E2SSRIT,BSB_F0SRITA,
|
||||
BSB_F0ROPEA,BSB_F0TACCA,BSB_F0EDACCA,BSB_F0ERIMA,BSB_F0SSRITBF,BSB_F0ROPEBF,
|
||||
BSB_F0SSVA,BSB_F0ROPEVA,BSB_F1SSRIT,BSB_F1ROPE,BSB_F2SSRIT,BSB_F2ROPE,
|
||||
BSB_G0NFCOM,BSB_G0NAZI1,BSB_G0UDEN1,BSB_G0UNAT1,BSB_G0IUTI2,BSB_G0ROPE,
|
||||
BSB_G0USRIT3,BSB_G0RACC3,BSB_G0RIMP3,BSB_G0UNSRIT3,BSB_G0USPE,BSB_G0UPAG,
|
||||
BSB_G0NPER,BSB_G1UCOR,BSB_G1USRIT,BSB_G1RACC,BSB_G1RIMP,BSB_G1UNSRIT,
|
||||
BSB_H0CODLAV,BSB_H0COLDIP};
|
||||
HIDDEN const char* _campi_I2[CAMPI_IB2] = {
|
||||
BSB_E0NFCOM, BSB_E0NPER, BSB_E0AIMP, BSB_E0ROPE, BSB_E0SNSRIT,
|
||||
BSB_E1NFCOM, BSB_E1NPER, BSB_E1SCOR, BSB_E1BCOM, BSB_E1ROPE,
|
||||
BSB_E1ACOM, BSB_E1BCOM2, BSB_E1ROPE2, BSB_E2NFCOM, BSB_E2NPER,
|
||||
BSB_E2ROPE, BSB_E2SSRIT, BSB_F0SRITA, BSB_F0ROPEA, BSB_F0TACCA,
|
||||
BSB_F0EDACCA, BSB_F0ERIMA, BSB_F0SSRITBF, BSB_F0ROPEBF, BSB_F0SSVA,
|
||||
BSB_F0ROPEVA, BSB_F1SSRIT, BSB_F1ROPE, BSB_F2SSRIT, BSB_F2ROPE,
|
||||
BSB_G0NFCOM, BSB_G0NAZI1, BSB_G0UDEN1, BSB_G0UNAT1, BSB_G0IUTI2,
|
||||
BSB_G0ROPE, BSB_G0USRIT3, BSB_G0RACC3, BSB_G0RIMP3, BSB_G0UNSRIT3,
|
||||
BSB_G0USPE, BSB_G0UPAG, BSB_G0NPER, BSB_G1UTCOR1S, BSB_G1UTCOR2S,
|
||||
BSB_G1RITAV1, BSB_G1RITAV2, BSB_G1RITIV1, BSB_G1RITIV2, BSB_G1UTNSR1S,
|
||||
BSB_G1UTNSR2S, BSB_H0CODLAV, BSB_H0COLDIP,
|
||||
};
|
||||
|
||||
HIDDEN const char* _campi_A [CAMPI_A] = {
|
||||
QUA_DENARO, QUA_NATURA, QUA_COBBDIP, QUA_COMPNETTI,
|
||||
@ -85,11 +89,11 @@ protected:
|
||||
void calcola_riporti_E (const long dich=0L);
|
||||
void calcola_riporti_E1(const long dich=0L);
|
||||
void calcola_riporti_E2(const long dich=0L);
|
||||
void calcola_riporti_F (TCursor* cur, const long dich=0L);
|
||||
void calcola_riporti_F1(TCursor* cur, const long dich=0L);
|
||||
void calcola_riporti_F2(TCursor* cur, const long dich=0L);
|
||||
void calcola_riporti_G (TCursor* cur, const long dich=0L);
|
||||
void calcola_riporti_G1(TCursor* cur, const long dich=0L);
|
||||
void calcola_riporti_F (const long dich=0L);
|
||||
void calcola_riporti_F1(const long dich=0L);
|
||||
void calcola_riporti_F2(const long dich=0L);
|
||||
void calcola_riporti_G (const long dich=0L);
|
||||
void calcola_riporti_G1(const long dich=0L);
|
||||
public:
|
||||
bool riporta_I_globale(const long dich);
|
||||
bool riporti_dich(const long dich, const int anno);
|
||||
|
@ -213,7 +213,7 @@ void TQuadroG1::arr2rel(const TMask& m)
|
||||
const real rimp2s = row.get(); tot += rimp2s;
|
||||
if (i == 0 || tot > 0.0)
|
||||
{
|
||||
if (i < 2)
|
||||
if (i < 3)
|
||||
last_saved = i;
|
||||
else
|
||||
{
|
||||
@ -223,13 +223,13 @@ void TQuadroG1::arr2rel(const TMask& m)
|
||||
last_saved++;
|
||||
|
||||
TRectype& rec = arr.row(last_saved, TRUE);
|
||||
rec.put("UTILI1S", utili1s);
|
||||
rec.put("UTILI2S", utili2s);
|
||||
rec.put("ALIQUOTA", aliquota);
|
||||
rec.put("RACCVER1S", racc1s);
|
||||
rec.put("RACCVER2S", racc2s);
|
||||
rec.put("RIMPVER1S", rimp1s);
|
||||
rec.put("RIMPVER2S", rimp2s);
|
||||
rec.put(QG1_UTILI1S, utili1s);
|
||||
rec.put(QG1_UTILI2S, utili2s);
|
||||
rec.put(QG1_ALIQUOTA, aliquota);
|
||||
rec.put(QG1_RACCVER1S, racc1s);
|
||||
rec.put(QG1_RACCVER2S, racc2s);
|
||||
rec.put(QG1_RIMPVER1S, rimp1s);
|
||||
rec.put(QG1_RIMPVER2S, rimp2s);
|
||||
}
|
||||
}
|
||||
arr.rewrite();
|
||||
@ -349,4 +349,4 @@ bool quadro_g1(int argc, char* argv[])
|
||||
TQuadroG1 a;
|
||||
a.run(argc, argv, a.taitol());
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
#define BSB_E0AIMP "E0AIMP"
|
||||
#define BSB_E0ROPE "E0ROPE"
|
||||
#define BSB_E0SNSRIT "E0SNSRIT"
|
||||
|
||||
#define BSB_E1NFCOM "E1NFCOM"
|
||||
#define BSB_E1NPER "E1NPER"
|
||||
#define BSB_E1SCOR "E1SCOR"
|
||||
@ -17,10 +18,12 @@
|
||||
#define BSB_E1ACOM "E1ACOM"
|
||||
#define BSB_E1BCOM2 "E1BCOM2"
|
||||
#define BSB_E1ROPE2 "E1ROPE2"
|
||||
|
||||
#define BSB_E2NFCOM "E2NFCOM"
|
||||
#define BSB_E2NPER "E2NPER"
|
||||
#define BSB_E2ROPE "E2ROPE"
|
||||
#define BSB_E2SSRIT "E2SSRIT"
|
||||
|
||||
#define BSB_F0SRITA "F0SRITA"
|
||||
#define BSB_F0ROPEA "F0ROPEA"
|
||||
#define BSB_F0TACCA "F0TACCA"
|
||||
@ -30,12 +33,19 @@
|
||||
#define BSB_F0ROPEBF "F0ROPEBF"
|
||||
#define BSB_F0SSVA "F0SSVA"
|
||||
#define BSB_F0ROPEVA "F0ROPEVA"
|
||||
#define BSB_F0AMMPRO "F0AMMPRO"
|
||||
#define BSB_F0PREOPE "F0PREOPE"
|
||||
|
||||
#define BSB_F1NFCOM "F1NFCOM"
|
||||
#define BSB_F1NPER "F1NPER"
|
||||
#define BSB_F1TPLUA "F1TPLUA"
|
||||
#define BSB_F1ROPEA "F1ROPEA"
|
||||
#define BSB_F1SSRIT "F1SSRIT"
|
||||
#define BSB_F1ROPE "F1ROPE"
|
||||
|
||||
#define BSB_F2SSRIT "F2SSRIT"
|
||||
#define BSB_F2ROPE "F2ROPE"
|
||||
|
||||
#define BSB_G0NFCOM "G0NFCOM"
|
||||
#define BSB_G0NAZI1 "G0NAZI1"
|
||||
#define BSB_G0UDEN1 "G0UDEN1"
|
||||
@ -49,11 +59,20 @@
|
||||
#define BSB_G0USPE "G0USPE"
|
||||
#define BSB_G0UPAG "G0UPAG"
|
||||
#define BSB_G0NPER "G0NPER"
|
||||
#define BSB_G1UCOR "G1UCOR"
|
||||
#define BSB_G1USRIT "G1USRIT"
|
||||
#define BSB_G1RACC "G1RACC"
|
||||
#define BSB_G1RIMP "G1RIMP"
|
||||
#define BSB_G1UNSRIT "G1UNSRIT"
|
||||
#define BSB_G0UTDACOR "G0UTDACOR"
|
||||
#define BSB_G0UTDELDIS "G0UTDELDIS"
|
||||
#define BSB_G0UTCOR1S "G0UTCOR1S"
|
||||
#define BSB_G0UTCOR2S "G0UTCOR2S"
|
||||
|
||||
#define BSB_G1UTCOR1S "G1UTCOR1S"
|
||||
#define BSB_G1UTCOR2S "G1UTCOR2S"
|
||||
#define BSB_G1RITAV1 "G1RITAV1"
|
||||
#define BSB_G1RITAV2 "G1RITAV2"
|
||||
#define BSB_G1RITIV1 "G1RITIV1"
|
||||
#define BSB_G1RITIV2 "G1RITIV2"
|
||||
#define BSB_G1UTNSR1S "G1UTNSR1S"
|
||||
#define BSB_G1UTNSR2S "G1UTNSR2S"
|
||||
|
||||
#define BSB_H0CODLAV "H0CODLAV"
|
||||
#define BSB_H0COLDIP "H0COLDIP"
|
||||
#define BSB_H0NPVERH "H0NPVERH"
|
||||
@ -68,12 +87,12 @@
|
||||
#define BSB_LAVDIPCIN "LAVDIPCIN"
|
||||
#define BSB_PIMPINI "PIMPINI"
|
||||
#define BSB_PIMPFINE "PIMPFINE"
|
||||
#define BSB_G0RITSPET "G0RITSPET"
|
||||
#define BSB_G0RITSPET "G0RITSPET"
|
||||
|
||||
#define I11_1 "B1NFCOM"
|
||||
#define I11_2 "B1NPER"
|
||||
#define I11_3 "B1TIND"
|
||||
#define I11_4 "B1TIRM"
|
||||
#define I11_5 "B1TICOM"
|
||||
#define I11_1 "B1NFCOM"
|
||||
#define I11_2 "B1NPER"
|
||||
#define I11_3 "B1TIND"
|
||||
#define I11_4 "B1TIRM"
|
||||
#define I11_5 "B1TICOM"
|
||||
|
||||
#endif
|
||||
|
@ -1,3 +1,3 @@
|
||||
100
|
||||
1
|
||||
m770/righef2|0|0|103|4|Righe F2 modello 770|||
|
||||
m770/righef2|8|8|103|0|Righe quadro F2|||
|
||||
|
@ -6,7 +6,7 @@ NPROG|2|2|0|Numero riga
|
||||
CODCAUS|9|2|0|Codice causale
|
||||
DENCAUS|1|50|0|Denominazione fondo
|
||||
ALIQUOTA|4|6|2|Aliquota
|
||||
SOGRIT|4|18|0|Somme soggette a ritenuta
|
||||
ROPE|4|18|0|Ritenuta operata
|
||||
SOGRIT|4|18|0|2 - Somme soggette a ritenuta
|
||||
ROPE|4|18|0|4 - Ritenuta operata
|
||||
1
|
||||
CODDITTA+TIPOPRO+NPROG|
|
||||
|
@ -1,3 +1,3 @@
|
||||
118
|
||||
1
|
||||
m770/quadrogp|0|0|135|4|Prospetti quadro G|||
|
||||
m770/quadrogp|0|0|137|0|Prospetti quadro G|||
|
||||
|
@ -1,16 +1,16 @@
|
||||
118
|
||||
12
|
||||
CODDITTA|3|5|0|Ditta
|
||||
PROSPETTO|1|1|0|Codice prospetto (2)
|
||||
SEZIONE|1|1|0|Sezione
|
||||
NPROG|2|2|0|Numero Riga
|
||||
PROSPETTO|1|1|0|Codice prospetto (1 e 2)
|
||||
SEZIONE|1|1|0|Sezione (1 e 2)
|
||||
NPROG|2|4|0|Numero Riga
|
||||
DATADEL|5|8|0|Data deliberazione prospetto 1 sezione 1
|
||||
NUMQUOTE|3|9|0|Numero azioni prospetto 1 sezione 1
|
||||
DESCRBENI|1|35|0|Descrizione dei beni
|
||||
UTILI1S|4|18|0|Utili primo semestre / Importo per azione (prosp.1 sez.1) / Valore beni (prosp.1 sez.2)
|
||||
UTILI2S|4|18|0|Utili secondo semestre / Importo complessivo (prosp.1 sez.1)
|
||||
ALIQUOTA|4|18|2|Aliquota
|
||||
TITOLO|7|1|0|Titolo della ritenuta <A>cconto, <I>mposta
|
||||
ROPE|4|18|0|Ritenute operate
|
||||
UTILI1S|4|18|0|3 - Utili primo semestre / Importo per azione (prosp.1 sez.1) / Valore beni (prosp.1 sez.2)
|
||||
UTILI2S|4|18|0|4 - Utili secondo semestre / Importo complessivo (prosp.1 sez.1)
|
||||
ALIQUOTA|4|18|2|5 - Aliquota
|
||||
TITOLO|7|1|0|6 - Titolo della ritenuta <A>cconto, <I>mposta
|
||||
ROPE|4|18|0|7 - Ritenute effettuate
|
||||
1
|
||||
CODDITTA+PROSPETTO+SEZIONE+NPROG|
|
||||
|
@ -1,3 +1,3 @@
|
||||
71
|
||||
1
|
||||
m770/quadrog1|0|0|624|4|Quadro G1 770|||
|
||||
m770/quadrog1|0|0|124|4|Quadro G1 770|||
|
||||
|
16
m770/f71.trr
16
m770/f71.trr
@ -1,13 +1,13 @@
|
||||
71
|
||||
9
|
||||
CODDITTA|3|5|0|Ditta
|
||||
NPROG|1|0|0|Numero riga
|
||||
UTILI1S|1|100|0|Utili 1 semestre
|
||||
UTILI2S|1|100|0|Utili 2 semestre
|
||||
ALIQUOTA|1|100|0|Aliquota
|
||||
RACCVER1S|1|100|0|Ritenute d'acconto versate 1 semestre
|
||||
RACCVER2S|1|100|0|Ritenute d'acconto versate 2 semestre
|
||||
RIMPVER1S|1|100|0|Ritenute d'imposta versate 1 semestre
|
||||
RIMPVER2S|4|18|0|Ritenute d'imposta versate 2 semestre
|
||||
NPROG|3|4|0|Numero riga
|
||||
UTILI1S|4|18|0|1 - Utili 1 semestre
|
||||
UTILI2S|4|18|0|2 - Utili 2 semestre
|
||||
ALIQUOTA|4|6|2|3 - Aliquota
|
||||
RACCVER1S|4|18|0|4 - Ritenute d'acconto versate 1 semestre
|
||||
RACCVER2S|4|18|0|5 - Ritenute d'acconto versate 2 semestre
|
||||
RIMPVER1S|4|18|0|6 - Ritenute d'imposta versate 1 semestre
|
||||
RIMPVER2S|4|18|0|7 - Ritenute d'imposta versate 2 semestre
|
||||
1
|
||||
CODDITTA+NPROG|
|
||||
|
@ -1,3 +1,3 @@
|
||||
99
|
||||
1
|
||||
m770/righef1|0|0|94|4|Righe F1 del modello 770 (27/05/97)|||
|
||||
m770/righef1|3|3|94|0|Righe quadro F1|||
|
||||
|
@ -6,9 +6,9 @@ NPROG|2|2|0|Numero riga
|
||||
TIPOA|1|1|0|Tipo persona
|
||||
CODANAGR|3|5|0|Codice anagrafica persone
|
||||
CODCAUS|9|2|0|Codice causale
|
||||
DENCAUS|1|35|0|Causale
|
||||
DENCAUS|1|35|0|11 - Causale
|
||||
ALIQUOTA|4|6|2|Aliquota
|
||||
SOGRIT|4|18|0|Somme soggette a ritenuta
|
||||
ROPE|4|18|0|Ritenute operate
|
||||
SOGRIT|4|18|0|12 - Somme soggette a ritenuta
|
||||
ROPE|4|18|0|13 - Ritenute operate
|
||||
1
|
||||
CODDITTA+TIPOPRO+NPROG|
|
||||
|
@ -5,6 +5,8 @@
|
||||
// righe f1
|
||||
#define RQF1_TIPOA "TIPOA"
|
||||
#define RQF1_CODANAGR "CODANAGR"
|
||||
#define RQF1_SOGRIT "SOGRIT"
|
||||
#define RQF1_ROPE "ROPE"
|
||||
|
||||
// righe f
|
||||
#define RQF0_SOGRIT "SOGRIT"
|
||||
|
@ -1,14 +1,9 @@
|
||||
// quadrog1.h
|
||||
#define QG1_CODDITTA "CODDITTA"
|
||||
#define QG1_P12 "P12"
|
||||
#define QG1_P13 "P13"
|
||||
#define QG1_P14 "P14"
|
||||
#define QG1_P15 "P15"
|
||||
#define QG1_P16 "P16"
|
||||
#define QG1_P17 "P17"
|
||||
#define QG1_P12TOT "P12TOT"
|
||||
#define QG1_P13TOT "P13TOT"
|
||||
#define QG1_P15TOT "P15TOT"
|
||||
#define QG1_P16TOT "P16TOT"
|
||||
#define QG1_P17TOT "P17TOT"
|
||||
|
||||
#define QG1_CODDITTA "CODDITTA"
|
||||
#define QG1_UTILI1S "UTILI1S"
|
||||
#define QG1_UTILI2S "UTILI2S"
|
||||
#define QG1_ALIQUOTA "ALIQUOTA"
|
||||
#define QG1_RACCVER1S "RACCVER1S"
|
||||
#define QG1_RACCVER2S "RACCVER2S"
|
||||
#define QG1_RIMPVER1S "RIMPVER1S"
|
||||
#define QG1_RIMPVER2S "RIMPVER2S"
|
||||
|
Loading…
x
Reference in New Issue
Block a user