Corretti riporti
git-svn-id: svn://10.65.10.50/trunk@3764 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
833c0905bc
commit
c219b104c8
@ -567,6 +567,7 @@ void CG3400_application::preprocess_footer()
|
|||||||
|
|
||||||
_forza_ariportare = FALSE;
|
_forza_ariportare = FALSE;
|
||||||
|
|
||||||
|
if (_devo_riportare > TRUE)
|
||||||
_devo_riportare = FALSE;
|
_devo_riportare = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -789,7 +790,6 @@ void CG3400_application::preprocess_header()
|
|||||||
real riporto_dare, riporto_avere;
|
real riporto_dare, riporto_avere;
|
||||||
|
|
||||||
// _gia_settato_ariportare = FALSE;
|
// _gia_settato_ariportare = FALSE;
|
||||||
_devo_riportare = FALSE;
|
|
||||||
|
|
||||||
if (pag > 0) // Stampa riporti
|
if (pag > 0) // Stampa riporti
|
||||||
{
|
{
|
||||||
@ -875,9 +875,10 @@ bool CG3400_application::preprocess_print(int file, int counter)
|
|||||||
|
|
||||||
int CG3400_application::righe_rimaste() const
|
int CG3400_application::righe_rimaste() const
|
||||||
{
|
{
|
||||||
int rows_left = printer().rows_left();
|
const TPrinter& p = printer();
|
||||||
|
int rows_left = p.rows_left();
|
||||||
if (rows_left <= 0)
|
if (rows_left <= 0)
|
||||||
rows_left = printer().formlen() - (printer().headersize()+1) - printer().footersize();
|
rows_left = p.formlen() - (p.headersize()+1) - p.footersize();
|
||||||
return rows_left;
|
return rows_left;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -928,8 +929,8 @@ 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
|
{
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
_nuovo_mese = FALSE;
|
_nuovo_mese = FALSE;
|
||||||
}
|
}
|
||||||
@ -939,6 +940,7 @@ 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)
|
||||||
@ -954,14 +956,22 @@ print_action CG3400_application::postprocess_page(int file, int counter)
|
|||||||
--(*_cur);
|
--(*_cur);
|
||||||
_cur->restore_status();
|
_cur->restore_status();
|
||||||
|
|
||||||
if (_data_corr != _data_succ || _cur->pos() == _cur->items()-1)
|
_devo_riportare = TRUE;
|
||||||
|
|
||||||
|
const bool last_row = _cur->pos() == _cur->items()-1;
|
||||||
|
if (_data_corr != _data_succ || last_row)
|
||||||
{
|
{
|
||||||
_nuovo_mese = (_mese_succ != _mese_corr);
|
_nuovo_mese = (_mese_succ != _mese_corr);
|
||||||
int righe = set_totali_giorno(_data_corr, righe_iva_settate);
|
int righe = set_totali_giorno(_data_corr, righe_iva_settate);
|
||||||
if (_nuovo_mese)
|
if (_nuovo_mese || last_row)
|
||||||
{
|
{
|
||||||
righe = set_totali_pagina(righe);
|
righe = set_totali_pagina(righe);
|
||||||
|
|
||||||
|
if (righe-1 > (int)printer().rows_left())
|
||||||
|
_devo_riportare = 3; // Very TRUE!
|
||||||
|
else
|
||||||
|
_devo_riportare = FALSE;
|
||||||
|
|
||||||
// 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, righe_iva_settate);
|
fill_page(righe, righe_iva_settate);
|
||||||
@ -971,7 +981,7 @@ print_action CG3400_application::postprocess_page(int file, int counter)
|
|||||||
|
|
||||||
if (righe_iva_settate > 0)
|
if (righe_iva_settate > 0)
|
||||||
return REPEAT_PAGE;
|
return REPEAT_PAGE;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LF_RMOV:
|
case LF_RMOV:
|
||||||
@ -1107,9 +1117,6 @@ void CG3400_application::set_rows (int file, int counter)
|
|||||||
if (_reg.not_empty())
|
if (_reg.not_empty())
|
||||||
set_row(r+1, " (R.IVA @b%3s@r Prot. @b%ld@r) ", (const char*)_reg,protiva);
|
set_row(r+1, " (R.IVA @b%3s@r Prot. @b%ld@r) ", (const char*)_reg,protiva);
|
||||||
}
|
}
|
||||||
|
|
||||||
_devo_riportare = TRUE;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LF_RMOV:
|
case LF_RMOV:
|
||||||
@ -1209,8 +1216,10 @@ bool CG3400_application::preprocess_page(int file, int counter)
|
|||||||
_num_rig = 0;
|
_num_rig = 0;
|
||||||
_data_corr = _cur->file(LF_MOV).get_date(MOV_DATAREG);
|
_data_corr = _cur->file(LF_MOV).get_date(MOV_DATAREG);
|
||||||
// _ultima_data_mov finisce sul registro come ultima data di stampa
|
// _ultima_data_mov finisce sul registro come ultima data di stampa
|
||||||
if (_data_corr > _ultima_data_mov) _ultima_data_mov = _data_corr;
|
if (_data_corr > _ultima_data_mov)
|
||||||
|
_ultima_data_mov = _data_corr;
|
||||||
_mese_corr = _data_corr.month();
|
_mese_corr = _data_corr.month();
|
||||||
|
_devo_riportare = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LF_RMOV:
|
case LF_RMOV:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user