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,7 +567,8 @@ void CG3400_application::preprocess_footer()
|
||||
|
||||
_forza_ariportare = FALSE;
|
||||
|
||||
_devo_riportare = FALSE;
|
||||
if (_devo_riportare > TRUE)
|
||||
_devo_riportare = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -789,7 +790,6 @@ void CG3400_application::preprocess_header()
|
||||
real riporto_dare, riporto_avere;
|
||||
|
||||
// _gia_settato_ariportare = FALSE;
|
||||
_devo_riportare = FALSE;
|
||||
|
||||
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 rows_left = printer().rows_left();
|
||||
const TPrinter& p = printer();
|
||||
int rows_left = p.rows_left();
|
||||
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;
|
||||
}
|
||||
|
||||
@ -928,9 +929,9 @@ print_action CG3400_application::postprocess_page(int file, int counter)
|
||||
|
||||
if (counter)
|
||||
{
|
||||
if (_nuovo_mese) {
|
||||
// if (!_stampa_definitiva) // su bollato ho gia' barrato il foglio fino in fondo
|
||||
printer().formfeed();
|
||||
if (_nuovo_mese)
|
||||
{
|
||||
printer().formfeed();
|
||||
_nuovo_mese = FALSE;
|
||||
}
|
||||
return NEXT_PAGE;
|
||||
@ -939,39 +940,48 @@ print_action CG3400_application::postprocess_page(int file, int counter)
|
||||
switch (file)
|
||||
{
|
||||
case LF_MOV:
|
||||
reset_print();
|
||||
righe_iva_settate = 0;
|
||||
if (_libro_giornale_iva_unico)
|
||||
{
|
||||
righe_iva_settate = setta_righe_iva();
|
||||
righe_iva_settate = setta_righe_valuta(righe_iva_settate);
|
||||
}
|
||||
|
||||
_cur->save_status();
|
||||
++(*_cur);
|
||||
_data_succ = _cur->file(LF_MOV).get_date(MOV_DATAREG);
|
||||
_mese_succ = _data_succ.month();
|
||||
--(*_cur);
|
||||
_cur->restore_status();
|
||||
|
||||
if (_data_corr != _data_succ || _cur->pos() == _cur->items()-1)
|
||||
{
|
||||
_nuovo_mese = (_mese_succ != _mese_corr);
|
||||
int righe = set_totali_giorno(_data_corr, righe_iva_settate);
|
||||
if (_nuovo_mese)
|
||||
reset_print();
|
||||
righe_iva_settate = 0;
|
||||
if (_libro_giornale_iva_unico)
|
||||
{
|
||||
righe = set_totali_pagina(righe);
|
||||
|
||||
// Nella stampa su bollato metto un segno su tutte le righe
|
||||
if (_stampa_definitiva)
|
||||
fill_page(righe, righe_iva_settate);
|
||||
righe_iva_settate = setta_righe_iva();
|
||||
righe_iva_settate = setta_righe_valuta(righe_iva_settate);
|
||||
}
|
||||
return REPEAT_PAGE;
|
||||
|
||||
_cur->save_status();
|
||||
++(*_cur);
|
||||
_data_succ = _cur->file(LF_MOV).get_date(MOV_DATAREG);
|
||||
_mese_succ = _data_succ.month();
|
||||
--(*_cur);
|
||||
_cur->restore_status();
|
||||
|
||||
_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);
|
||||
int righe = set_totali_giorno(_data_corr, righe_iva_settate);
|
||||
if (_nuovo_mese || last_row)
|
||||
{
|
||||
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
|
||||
if (_stampa_definitiva)
|
||||
fill_page(righe, righe_iva_settate);
|
||||
}
|
||||
return REPEAT_PAGE;
|
||||
}
|
||||
|
||||
if (righe_iva_settate > 0)
|
||||
return REPEAT_PAGE;
|
||||
}
|
||||
|
||||
if (righe_iva_settate > 0)
|
||||
return REPEAT_PAGE;
|
||||
|
||||
break;
|
||||
|
||||
case LF_RMOV:
|
||||
@ -1107,9 +1117,6 @@ void CG3400_application::set_rows (int file, int counter)
|
||||
if (_reg.not_empty())
|
||||
set_row(r+1, " (R.IVA @b%3s@r Prot. @b%ld@r) ", (const char*)_reg,protiva);
|
||||
}
|
||||
|
||||
_devo_riportare = TRUE;
|
||||
|
||||
break;
|
||||
|
||||
case LF_RMOV:
|
||||
@ -1209,8 +1216,10 @@ bool CG3400_application::preprocess_page(int file, int counter)
|
||||
_num_rig = 0;
|
||||
_data_corr = _cur->file(LF_MOV).get_date(MOV_DATAREG);
|
||||
// _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();
|
||||
_devo_riportare = TRUE;
|
||||
break;
|
||||
|
||||
case LF_RMOV:
|
||||
|
Loading…
x
Reference in New Issue
Block a user