Corretto riporto
git-svn-id: svn://10.65.10.50/trunk@3779 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c356c07146
commit
cbefd21564
@ -131,6 +131,7 @@ private:
|
||||
int _anno_iva;
|
||||
bool _stampa_definitiva;
|
||||
bool _MovGiaStampato;
|
||||
bool _totals_updated;
|
||||
|
||||
bool _gia_settato_ariportare;
|
||||
bool _forza_ariportare;
|
||||
@ -445,12 +446,12 @@ void CG3400_application::aggiorna_mov()
|
||||
|
||||
int CG3400_application::set_totali_giorno(const TDate& data, const int righeiva)
|
||||
{
|
||||
int r;
|
||||
int r = righeiva + 1;
|
||||
char dep[200];
|
||||
const int SHIFT = 15;
|
||||
const int STACC = 51 + SHIFT;
|
||||
|
||||
r = righeiva == 0 ? 1 : righeiva + 1;
|
||||
// r = righeiva == 0 ? 1 : righeiva + 1;
|
||||
|
||||
// Se e' l'unico totale lo stampo anche se e' zero
|
||||
if (competenza_ec() || (_tot_avere_gg != ZERO || _tot_dare_gg != ZERO))
|
||||
@ -883,12 +884,13 @@ int CG3400_application::righe_rimaste() const
|
||||
return rows_left;
|
||||
}
|
||||
|
||||
void CG3400_application::fill_page(int start_riga, int righe_iva_settate)
|
||||
void CG3400_application::fill_page(int righe_da_stampare, int righe_iva_settate)
|
||||
{
|
||||
const TPrinter& p = printer();
|
||||
|
||||
TString256 rigas;
|
||||
int rrr = start_riga + righe_iva_settate + 1;
|
||||
// int rrr = start_riga + righe_iva_settate + 1;
|
||||
int r = righe_da_stampare + 1;
|
||||
// int rows_left = p.rows_left();
|
||||
/* if (rows_left <= 0)
|
||||
{
|
||||
@ -896,7 +898,8 @@ void CG3400_application::fill_page(int start_riga, int righe_iva_settate)
|
||||
_forza_ariportare = TRUE;
|
||||
}
|
||||
*/
|
||||
int r_l = p.rows_left() - start_riga - righe_iva_settate;
|
||||
// int r_l = p.rows_left() - start_riga - righe_iva_settate;
|
||||
int r_l = p.rows_left() - righe_da_stampare;
|
||||
|
||||
if (r_l < 0)
|
||||
r_l += p.formlen() - (p.headersize()/*+1*/) - p.footersize();
|
||||
@ -906,7 +909,8 @@ void CG3400_application::fill_page(int start_riga, int righe_iva_settate)
|
||||
{
|
||||
rigas.fill('=', _stampa_width);
|
||||
// rigas.cut(_stampa_width+1);
|
||||
set_row(rrr++, "%s", (const char*) rigas);
|
||||
// set_row(rrr++, "%s", (const char*) rigas);
|
||||
set_row(r++, "%s", (const char*) rigas);
|
||||
int j=0;
|
||||
// Calcola una specie di coefficiente angolare
|
||||
int alfa = (_stampa_width - 6) / r_l;
|
||||
@ -915,7 +919,7 @@ void CG3400_application::fill_page(int start_riga, int righe_iva_settate)
|
||||
for ( ; r_l > 0; r_l--) // Non stampare sulla riga orizzontale!
|
||||
{
|
||||
rigas.format("@%dg======", j);
|
||||
set_row(rrr++, rigas);
|
||||
set_row(r++, rigas);
|
||||
j += alfa;
|
||||
}
|
||||
}
|
||||
@ -973,7 +977,7 @@ print_action CG3400_application::postprocess_page(int file, int counter)
|
||||
{
|
||||
righe = set_totali_pagina(righe);
|
||||
|
||||
if (righe-1 > (int)printer().rows_left())
|
||||
if (righe - 1 > (int)printer().rows_left())
|
||||
_devo_riportare = 3; // Very TRUE!
|
||||
else
|
||||
_devo_riportare = FALSE;
|
||||
@ -993,7 +997,8 @@ print_action CG3400_application::postprocess_page(int file, int counter)
|
||||
case LF_RMOV:
|
||||
// Sposto qui per evitare di aggiornare i progressivi con una riga della
|
||||
// pagina dopo
|
||||
update_totals(_sezione, _importo);
|
||||
if (!_totals_updated)
|
||||
update_totals(_sezione, _importo);
|
||||
_gia_settato_ariportare = FALSE;
|
||||
break;
|
||||
default:
|
||||
@ -1194,7 +1199,19 @@ void CG3400_application::set_rows (int file, int counter)
|
||||
|
||||
if (_MovGiaStampato && !_stampa_definitiva)
|
||||
set_row(r,format("@%dg*",_stampa_width == 132 ? 131 : 197));
|
||||
|
||||
|
||||
{
|
||||
const int rows = rdes - 1;
|
||||
const int left = printer().rows_left();
|
||||
if (left > 0 && left < rows)
|
||||
{
|
||||
_totals_updated = TRUE;
|
||||
update_totals(_sezione, _importo);
|
||||
}
|
||||
else
|
||||
_totals_updated = FALSE;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user