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
|
// Stampa allegati iva
|
||||||
|
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
|
#include <prefix.h>
|
||||||
#include <mask.h>
|
#include <mask.h>
|
||||||
#include <printapp.h>
|
#include <printapp.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
@ -821,71 +822,78 @@ void CG3300_application::calcola ()
|
|||||||
nuova_ditta = _nditte->curr().get_long(NDT_CODDITTA);
|
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;
|
( nuova_ditta =_nditte->curr().get_long(NDT_CODDITTA) ) <= ditta_a;
|
||||||
_nditte->next())
|
_nditte->next())
|
||||||
|
|
||||||
{
|
{
|
||||||
ditta_curr = get_firm();
|
ditta_curr = get_firm();
|
||||||
|
|
||||||
if (ditta_curr != nuova_ditta)
|
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 ())
|
prnd.addstatus(1);
|
||||||
_RecordSort->somma(_alleg, _tipo_stampa); // somma nella struttura
|
|
||||||
else
|
if (buono())
|
||||||
{
|
{
|
||||||
if (_RecordSort->importo() != 0)
|
if (da_sommare ())
|
||||||
|
_RecordSort->somma(_alleg, _tipo_stampa); // somma nella struttura
|
||||||
|
else
|
||||||
{
|
{
|
||||||
_sort->sort (_RecordSort->Strutt_str());
|
if (_RecordSort->importo() != 0)
|
||||||
_num_cf += 1; // incremento contatore numero di C/F
|
{
|
||||||
}
|
_sort->sort (_RecordSort->Strutt_str());
|
||||||
_t->incrementa_totali(_RecordSort->Strutt(), _tipo_stampa);
|
_num_cf += 1; // incremento contatore numero di C/F
|
||||||
|
}
|
||||||
|
_t->incrementa_totali(_RecordSort->Strutt(), _tipo_stampa);
|
||||||
|
|
||||||
_RecordSort->compila(_alleg);
|
_RecordSort->compila(_alleg);
|
||||||
}
|
}
|
||||||
} // if buono()
|
} // if buono()
|
||||||
_alleg->next();
|
_alleg->next();
|
||||||
} while (!_alleg->eof()); // for !eof su _alleg
|
} while (!_alleg->eof()); // for !eof su _alleg
|
||||||
|
|
||||||
// rimetto all'inizio il puntatore di _alleg dopo averlo scorso tutto una volta
|
// rimetto all'inizio il puntatore di _alleg dopo averlo scorso tutto una volta
|
||||||
_alleg->first();
|
_alleg->first();
|
||||||
|
}
|
||||||
|
|
||||||
if (_nditte->eof()) break;
|
if (_nditte->eof()) break;
|
||||||
|
|
||||||
} // for su nditte
|
} // for su nditte
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user