Correzione errore

git-svn-id: svn://10.65.10.50/trunk@1760 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
nik 1995-08-31 09:41:26 +00:00
parent 0d9a5bcc55
commit 87f3d41343

View File

@ -196,7 +196,7 @@ public:
int setta_righe_valuta(int start_riga); int setta_righe_valuta(int start_riga);
int setta_righe_descr(TParagraph_string&, enum descr); int setta_righe_descr(TParagraph_string&, enum descr);
void fill_page(int row); void fill_page(int start_riga, int righe_iva);
void calcola_iva(); void calcola_iva();
void init_print(); void init_print();
bool init_cursor(); bool init_cursor();
@ -870,10 +870,11 @@ bool CG3400_application::preprocess_print(int file, int counter)
} }
***/ ***/
void CG3400_application::fill_page(int riga) void CG3400_application::fill_page(int start_riga, int righe_iva_settate)
{ {
TString256 rigas; TString256 rigas;
// char frm[4]; // char frm[4];
int rrr = start_riga;
int r_l = printer().rows_left() - 2; // Tolgo le 2 righe del totale int r_l = printer().rows_left() - 2; // Tolgo le 2 righe del totale
if (r_l < 0) if (r_l < 0)
{ {
@ -881,13 +882,17 @@ void CG3400_application::fill_page(int riga)
_forza_ariportare = TRUE; _forza_ariportare = TRUE;
} }
// Tolgo le righe iva che sono state settate ma NON ancora stampate (=> non ancora contate da rows_left())
if (_libro_giornale_iva_unico)
r_l -= righe_iva_settate;
// Se sono rimaste righe da riempire // Se sono rimaste righe da riempire
if (r_l > 0) if (r_l > 0)
{ {
rigas.fill('=', _stampa_width); rigas.fill('=', _stampa_width);
rigas.cut(_stampa_width+1); rigas.cut(_stampa_width+1);
// sprintf(frm, "%%%3ds", _stampa_width); // sprintf(frm, "%%%3ds", _stampa_width);
set_row(riga++, "%s", (const char*) rigas); set_row(rrr++, "%s", (const char*) rigas);
// rigas = ""; // rigas = "";
// if (--r_l) // if (--r_l)
// { // {
@ -908,7 +913,7 @@ void CG3400_application::fill_page(int riga)
for ( ; r_l > 1; r_l--) // Non stampare sulla riga orizzontale! for ( ; r_l > 1; r_l--) // Non stampare sulla riga orizzontale!
{ {
rigas.format("@%dg======", j); rigas.format("@%dg======", j);
set_row(riga++, rigas); set_row(rrr++, rigas);
j += alfa; j += alfa;
} }
} }
@ -956,7 +961,7 @@ print_action CG3400_application::postprocess_page(int file, int counter)
righe = set_totali_pagina(righe); righe = set_totali_pagina(righe);
// Nella stampa su bollato metto un segno su tutte le righe // Nella stampa su bollato metto un segno su tutte le righe
if (_stampa_definitiva) if (_stampa_definitiva)
fill_page(righe); fill_page(righe, righe_iva_settate);
} }
return REPEAT_PAGE; return REPEAT_PAGE;
} }