Corretti errori MI0921 e MI0939 e segnalazione con fax da VLADIMIRO del 14.12.95
git-svn-id: svn://10.65.10.50/trunk@2393 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b0f727ea6b
commit
4d1845e1c4
@ -115,7 +115,8 @@ class CG3400_application : public TPrintapp
|
|||||||
|
|
||||||
static bool filter_func(const TRelation * r);
|
static bool filter_func(const TRelation * r);
|
||||||
static bool filtra_reg (const TRelation * r);
|
static bool filtra_reg (const TRelation * r);
|
||||||
|
int righe_rimaste() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
TCursor* _cur;
|
TCursor* _cur;
|
||||||
@ -133,8 +134,7 @@ private:
|
|||||||
long _num_rig;
|
long _num_rig;
|
||||||
real _importo;
|
real _importo;
|
||||||
char _sezione;
|
char _sezione;
|
||||||
// TParagraph_string* _descr_conto;
|
int _pagine_contate; // cnt pag. stampate.
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TDate _inizioEs, _fineEs; // date inizio e fine esercizio
|
TDate _inizioEs, _fineEs; // date inizio e fine esercizio
|
||||||
TRigaiva_array _iva_array;
|
TRigaiva_array _iva_array;
|
||||||
@ -168,15 +168,14 @@ public:
|
|||||||
TLocalisamfile * _com, *_clifo,*_pconti,*_nditte,*_anag, *_causali;
|
TLocalisamfile * _com, *_clifo,*_pconti,*_nditte,*_anag, *_causali;
|
||||||
|
|
||||||
TLocalisamfile* _attiv; // da togliere in futuro (?)
|
TLocalisamfile* _attiv; // da togliere in futuro (?)
|
||||||
|
|
||||||
TTable *_tabreg, *_tabval, *_tabes, *_tabiva;
|
TTable *_tabreg, *_tabval, *_tabes, *_tabiva;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual void preprocess_header();
|
virtual void preprocess_header();
|
||||||
virtual void preprocess_footer();
|
virtual void preprocess_footer();
|
||||||
virtual bool preprocess_page(int, int);
|
virtual bool preprocess_page(int, int);
|
||||||
virtual print_action postprocess_page(int, int);
|
virtual print_action postprocess_page(int, int);
|
||||||
|
virtual print_action postprocess_print(int, int);
|
||||||
virtual bool preprocess_print(int, int);
|
virtual bool preprocess_print(int, int);
|
||||||
virtual void postclose_print();
|
virtual void postclose_print();
|
||||||
// virtual bool cancel_hook();
|
// virtual bool cancel_hook();
|
||||||
@ -219,7 +218,7 @@ public:
|
|||||||
void update_totals (char sezione, real& importo);
|
void update_totals (char sezione, real& importo);
|
||||||
void set_reg_filter(TMask& m);
|
void set_reg_filter(TMask& m);
|
||||||
|
|
||||||
CG3400_application() {};
|
CG3400_application() : _pagine_contate(0) {};
|
||||||
virtual ~CG3400_application() {};
|
virtual ~CG3400_application() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -505,8 +504,7 @@ void CG3400_application::postclose_print()
|
|||||||
{
|
{
|
||||||
if (_stampa_definitiva)
|
if (_stampa_definitiva)
|
||||||
{
|
{
|
||||||
const int ultima_fatta = printer().getcurrentpage() - 1;
|
const int ultima_fatta = _pagine_contate;
|
||||||
|
|
||||||
if (yesno_box("La stampa e' corretta ?"))
|
if (yesno_box("La stampa e' corretta ?"))
|
||||||
{
|
{
|
||||||
aggiorna_mov ();
|
aggiorna_mov ();
|
||||||
@ -543,8 +541,7 @@ void CG3400_application::preprocess_footer()
|
|||||||
// 2. Sono sull'ultima riga
|
// 2. Sono sull'ultima riga
|
||||||
//
|
//
|
||||||
|
|
||||||
const bool riporta = _forza_ariportare ||
|
const bool riporta = _forza_ariportare || (!_gia_settato_ariportare && _cur->pos() < _cur->items()-1);
|
||||||
(!_gia_settato_ariportare && _cur->pos() < _cur->items()-1);
|
|
||||||
|
|
||||||
if (riporta)
|
if (riporta)
|
||||||
{
|
{
|
||||||
@ -588,8 +585,6 @@ int CG3400_application::set_totali_pagina(int righe)
|
|||||||
ap = TRUE;
|
ap = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SONO SULL'ULTIMO ???????????? SI O NO ????????????
|
|
||||||
// if (_cur->pos() >= _cur->items()-1) // se sono sull'ultimo
|
|
||||||
if (_cur->pos() == _cur->items()-1) // se sono sull'ultimo
|
if (_cur->pos() == _cur->items()-1) // se sono sull'ultimo
|
||||||
{
|
{
|
||||||
// I totali distinti tra anno precedente e corrente SOLO SE STAMPA DI PROVA
|
// I totali distinti tra anno precedente e corrente SOLO SE STAMPA DI PROVA
|
||||||
@ -610,7 +605,7 @@ int CG3400_application::set_totali_pagina(int righe)
|
|||||||
);
|
);
|
||||||
|
|
||||||
set_row (r++, (const char*) riga);
|
set_row (r++, (const char*) riga);
|
||||||
|
|
||||||
if (ap)
|
if (ap)
|
||||||
{
|
{
|
||||||
riga.format("@b@%dgTotale progressivi anno precedente @%dg%c %s @%dg%c @%dg%s",
|
riga.format("@b@%dgTotale progressivi anno precedente @%dg%c %s @%dg%c @%dg%s",
|
||||||
@ -625,8 +620,8 @@ int CG3400_application::set_totali_pagina(int righe)
|
|||||||
);
|
);
|
||||||
set_row (r++, (const char*) riga);
|
set_row (r++, (const char*) riga);
|
||||||
}
|
}
|
||||||
} // !stampa_definitiva
|
} // stampa_definitiva
|
||||||
|
|
||||||
_tot_dare_generale = _tot_dare_progr + _tot_dare_progr_ap;
|
_tot_dare_generale = _tot_dare_progr + _tot_dare_progr_ap;
|
||||||
_tot_avere_generale = _tot_avere_progr + _tot_avere_progr_ap;
|
_tot_avere_generale = _tot_avere_progr + _tot_avere_progr_ap;
|
||||||
dts = _tot_dare_generale.string (TOT_PICTURE);
|
dts = _tot_dare_generale.string (TOT_PICTURE);
|
||||||
@ -647,10 +642,13 @@ int CG3400_application::set_totali_pagina(int righe)
|
|||||||
}
|
}
|
||||||
else // Non ancora totale generale
|
else // Non ancora totale generale
|
||||||
{
|
{
|
||||||
// Se il movimento ha righe che continuano nella pagina successiva
|
// Determina se le righe settate finora stanno in questa pagina oppure no
|
||||||
// "A riportare" viene stampato dalla preprocess_footer senno' qui
|
_gia_settato_ariportare = righe_rimaste() > righe;
|
||||||
|
|
||||||
_gia_settato_ariportare = TRUE;
|
// La fill_page mette forza_ariportare a TRUE
|
||||||
|
// nel caso di pagine con solo i totali (v. fax VLADIMIRO) bisogna impedire
|
||||||
|
// che venga stampato di nuovo "Totale ..." nella preprocess_footer
|
||||||
|
_forza_ariportare = FALSE;
|
||||||
|
|
||||||
dt = _tot_dare_progr + _tot_dare_progr_ap;
|
dt = _tot_dare_progr + _tot_dare_progr_ap;
|
||||||
at = _tot_avere_progr + _tot_avere_progr_ap;
|
at = _tot_avere_progr + _tot_avere_progr_ap;
|
||||||
@ -780,7 +778,7 @@ void CG3400_application::preprocess_header()
|
|||||||
TString256 riporto;
|
TString256 riporto;
|
||||||
real riporto_dare, riporto_avere;
|
real riporto_dare, riporto_avere;
|
||||||
|
|
||||||
_gia_settato_ariportare = FALSE;
|
// _gia_settato_ariportare = FALSE;
|
||||||
|
|
||||||
if (pag > 0) // Stampa riporti
|
if (pag > 0) // Stampa riporti
|
||||||
{
|
{
|
||||||
@ -864,6 +862,14 @@ bool CG3400_application::preprocess_print(int file, int counter)
|
|||||||
}
|
}
|
||||||
***/
|
***/
|
||||||
|
|
||||||
|
int CG3400_application::righe_rimaste() const
|
||||||
|
{
|
||||||
|
int rows_left = printer().rows_left();
|
||||||
|
if (rows_left <= 0)
|
||||||
|
rows_left = printer().formlen() - (printer().headersize()+1) - printer().footersize();
|
||||||
|
return rows_left;
|
||||||
|
}
|
||||||
|
|
||||||
void CG3400_application::fill_page(int start_riga, int righe_iva_settate)
|
void CG3400_application::fill_page(int start_riga, int righe_iva_settate)
|
||||||
{
|
{
|
||||||
TString256 rigas;
|
TString256 rigas;
|
||||||
@ -875,15 +881,8 @@ void CG3400_application::fill_page(int start_riga, int righe_iva_settate)
|
|||||||
_forza_ariportare = TRUE;
|
_forza_ariportare = TRUE;
|
||||||
}
|
}
|
||||||
int r_l = rows_left - start_riga - righe_iva_settate;
|
int r_l = rows_left - start_riga - righe_iva_settate;
|
||||||
/*******
|
|
||||||
if (r_l < 0)
|
// Se sono rimaste righe da riempire
|
||||||
{
|
|
||||||
// Tolgo l'intestazione + la riga con i riporti
|
|
||||||
r_l += printer().formlen() - (printer().headersize() + 1);
|
|
||||||
_forza_ariportare = TRUE;
|
|
||||||
}
|
|
||||||
****/
|
|
||||||
// Se sono rimaste righe da riempire
|
|
||||||
if (r_l > 0)
|
if (r_l > 0)
|
||||||
{
|
{
|
||||||
rigas.fill('=', _stampa_width);
|
rigas.fill('=', _stampa_width);
|
||||||
@ -902,6 +901,13 @@ void CG3400_application::fill_page(int start_riga, int righe_iva_settate)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print_action CG3400_application::postprocess_print(int file, int counter)
|
||||||
|
{
|
||||||
|
if (file == LF_MOV)
|
||||||
|
_pagine_contate = printer().getcurrentpage() - 1;
|
||||||
|
return NEXT_PAGE;
|
||||||
|
}
|
||||||
|
|
||||||
print_action CG3400_application::postprocess_page(int file, int counter)
|
print_action CG3400_application::postprocess_page(int file, int counter)
|
||||||
{
|
{
|
||||||
int righe_iva_settate=0;
|
int righe_iva_settate=0;
|
||||||
@ -910,7 +916,7 @@ print_action CG3400_application::postprocess_page(int file, int counter)
|
|||||||
if (counter)
|
if (counter)
|
||||||
{
|
{
|
||||||
if (_nuovo_mese) {
|
if (_nuovo_mese) {
|
||||||
if (!_stampa_definitiva) // su bollato ho gia' barrato il foglio fino in fondo
|
// if (!_stampa_definitiva) // su bollato ho gia' barrato il foglio fino in fondo
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
_nuovo_mese = FALSE;
|
_nuovo_mese = FALSE;
|
||||||
}
|
}
|
||||||
@ -920,7 +926,6 @@ print_action CG3400_application::postprocess_page(int file, int counter)
|
|||||||
switch (file)
|
switch (file)
|
||||||
{
|
{
|
||||||
case LF_MOV:
|
case LF_MOV:
|
||||||
|
|
||||||
reset_print();
|
reset_print();
|
||||||
righe_iva_settate = 0;
|
righe_iva_settate = 0;
|
||||||
if (_libro_giornale_iva_unico)
|
if (_libro_giornale_iva_unico)
|
||||||
@ -963,6 +968,7 @@ print_action CG3400_application::postprocess_page(int file, int counter)
|
|||||||
// Sposto qui per evitare di aggiornare i progressivi con una riga della
|
// Sposto qui per evitare di aggiornare i progressivi con una riga della
|
||||||
// pagina dopo
|
// pagina dopo
|
||||||
update_totals(_sezione, _importo);
|
update_totals(_sezione, _importo);
|
||||||
|
_gia_settato_ariportare = FALSE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -1295,8 +1301,12 @@ int CG3400_application::setta_righe_iva()
|
|||||||
{
|
{
|
||||||
TRigaiva& riga = (TRigaiva&)_iva_array[j];
|
TRigaiva& riga = (TRigaiva&)_iva_array[j];
|
||||||
r = j+1;
|
r = j+1;
|
||||||
set_row(r, " Imponibile@15g%r", &riga._imponibile);
|
TString impon_str(riga._imponibile.string(REAL_PICTURE));
|
||||||
set_row(r, "@31gImposta@39g%r", &riga._imposta);
|
TString impos_str(riga._imposta.string(REAL_PICTURE));
|
||||||
|
// set_row(r, " Imponibile@15g%15r", &riga._imponibile);
|
||||||
|
// set_row(r, "@31gImposta@39g%15r", &riga._imposta);
|
||||||
|
set_row(r, " Imponibile@15g%15s", (const char*)impon_str);
|
||||||
|
set_row(r, "@31gImposta@39g%15s", (const char*)impos_str);
|
||||||
// set_row(r, "@58gCod.Iva@68g%3s", (const char*)riga._codiva);
|
// set_row(r, "@58gCod.Iva@68g%3s", (const char*)riga._codiva);
|
||||||
set_row(r, "@56gCod.Iva %3s", (const char*)riga._codiva);
|
set_row(r, "@56gCod.Iva %3s", (const char*)riga._codiva);
|
||||||
const TString80 codiva_des(get_codiva_des(riga._codiva));
|
const TString80 codiva_des(get_codiva_des(riga._codiva));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user