Cazzarole e agg. XI
git-svn-id: svn://10.65.10.50/trunk@2885 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
badc1e677a
commit
9101f9e6f1
108
cg/cg3300.cpp
108
cg/cg3300.cpp
@ -2,6 +2,7 @@
|
||||
// Stampa allegati iva
|
||||
|
||||
#include <applicat.h>
|
||||
#include <prefix.h>
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <progind.h>
|
||||
@ -821,71 +822,78 @@ void CG3300_application::calcola ()
|
||||
nuova_ditta = _nditte->curr().get_long(NDT_CODDITTA);
|
||||
}
|
||||
|
||||
for (_nditte->read();
|
||||
bool good = TRUE;
|
||||
for (int err = _nditte->read();
|
||||
( nuova_ditta =_nditte->curr().get_long(NDT_CODDITTA) ) <= ditta_a;
|
||||
_nditte->next())
|
||||
|
||||
{
|
||||
ditta_curr = get_firm();
|
||||
|
||||
|
||||
if (ditta_curr != nuova_ditta)
|
||||
set_firm (nuova_ditta);
|
||||
|
||||
if (_ricalcola) ricalcola (_anno_stampa);
|
||||
|
||||
// Legge i dati anagrafici del dichiarante
|
||||
_RecordSort->fill_dati_anag_dic(_nditte);
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// ELABORAZIONE ALLEGATI
|
||||
// ---------------------------------------------------------------------
|
||||
_alleg->zero();
|
||||
_alleg->put (ALL_ANNO, _anno_stampa);
|
||||
_alleg->put (ALL_CODCF, _tipoa_richiesto);
|
||||
|
||||
TProgind prnd(_alleg->items(),
|
||||
"Elaborazione in corso...",
|
||||
FALSE, TRUE);
|
||||
|
||||
if (_ricerca_att != "")
|
||||
_alleg->curr().put (ALL_CODATT, _ricerca_att);
|
||||
|
||||
if (_distingui_att)
|
||||
_alleg->setkey (1);
|
||||
else
|
||||
_alleg->setkey (2); // non distinguo le attivita
|
||||
|
||||
// for (_alleg->read(); !_alleg->eof(); _alleg->next())
|
||||
|
||||
_alleg->read();
|
||||
do
|
||||
{
|
||||
prnd.addstatus(1);
|
||||
if (good = prefix().exist(nuova_ditta)) // TBC *** fv mi sembrava ci volesse
|
||||
set_firm (nuova_ditta);
|
||||
}
|
||||
|
||||
if (good)
|
||||
{
|
||||
|
||||
if (_ricalcola) ricalcola (_anno_stampa);
|
||||
|
||||
// Legge i dati anagrafici del dichiarante
|
||||
_RecordSort->fill_dati_anag_dic(_nditte);
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// ELABORAZIONE ALLEGATI
|
||||
// ---------------------------------------------------------------------
|
||||
_alleg->zero();
|
||||
_alleg->put (ALL_ANNO, _anno_stampa);
|
||||
_alleg->put (ALL_CODCF, _tipoa_richiesto);
|
||||
|
||||
if (buono())
|
||||
TProgind prnd(_alleg->items(),
|
||||
"Elaborazione in corso...",
|
||||
FALSE, TRUE);
|
||||
|
||||
if (_ricerca_att != "")
|
||||
_alleg->curr().put (ALL_CODATT, _ricerca_att);
|
||||
|
||||
if (_distingui_att)
|
||||
_alleg->setkey (1);
|
||||
else
|
||||
_alleg->setkey (2); // non distinguo le attivita
|
||||
|
||||
// for (_alleg->read(); !_alleg->eof(); _alleg->next())
|
||||
|
||||
_alleg->read();
|
||||
do
|
||||
{
|
||||
if (da_sommare ())
|
||||
_RecordSort->somma(_alleg, _tipo_stampa); // somma nella struttura
|
||||
else
|
||||
prnd.addstatus(1);
|
||||
|
||||
if (buono())
|
||||
{
|
||||
if (_RecordSort->importo() != 0)
|
||||
if (da_sommare ())
|
||||
_RecordSort->somma(_alleg, _tipo_stampa); // somma nella struttura
|
||||
else
|
||||
{
|
||||
_sort->sort (_RecordSort->Strutt_str());
|
||||
_num_cf += 1; // incremento contatore numero di C/F
|
||||
}
|
||||
_t->incrementa_totali(_RecordSort->Strutt(), _tipo_stampa);
|
||||
if (_RecordSort->importo() != 0)
|
||||
{
|
||||
_sort->sort (_RecordSort->Strutt_str());
|
||||
_num_cf += 1; // incremento contatore numero di C/F
|
||||
}
|
||||
_t->incrementa_totali(_RecordSort->Strutt(), _tipo_stampa);
|
||||
|
||||
_RecordSort->compila(_alleg);
|
||||
}
|
||||
} // if buono()
|
||||
_alleg->next();
|
||||
} while (!_alleg->eof()); // for !eof su _alleg
|
||||
_RecordSort->compila(_alleg);
|
||||
}
|
||||
} // if buono()
|
||||
_alleg->next();
|
||||
} while (!_alleg->eof()); // for !eof su _alleg
|
||||
|
||||
// rimetto all'inizio il puntatore di _alleg dopo averlo scorso tutto una volta
|
||||
_alleg->first();
|
||||
// rimetto all'inizio il puntatore di _alleg dopo averlo scorso tutto una volta
|
||||
_alleg->first();
|
||||
}
|
||||
|
||||
if (_nditte->eof()) break;
|
||||
|
||||
} // for su nditte
|
||||
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user