Modificato il calcolo sulle rate in attesa B.F (considera solo quelle
maggiori di _limbf). Corretta la stampa dei totali nel caso di selezione di un singolo cliente e la stampa di misteriose righe vuote. D'ora in avanti non dovrebbe mangiarsi neanche l'intestazione del cliente. git-svn-id: svn://10.65.10.50/trunk@2966 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
dd514ba4b5
commit
7a84c65933
@ -227,7 +227,7 @@ void TStampaScaduto::compute_all(TPartita& p)
|
|||||||
if (prima_riga_pagamento > -1 && prima_riga_pagamento == pp)
|
if (prima_riga_pagamento > -1 && prima_riga_pagamento == pp)
|
||||||
data_pag = d; // Se e' il primo pagamento(in ordine di data) di questa rata
|
data_pag = d; // Se e' il primo pagamento(in ordine di data) di questa rata
|
||||||
// prende la data di scadenza relativa.
|
// prende la data di scadenza relativa.
|
||||||
if (data_pag >= _limbf && data_pag <= _limscad)
|
if (data_pag >= _limbf) // && data_pag <= _limscad)
|
||||||
bf += TImporto(sez,pg.get_real(field));
|
bf += TImporto(sez,pg.get_real(field));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -362,6 +362,9 @@ bool TStampaScaduto::preprocess_page(int file, int counter)
|
|||||||
int nriga = 1;
|
int nriga = 1;
|
||||||
|
|
||||||
bool checked = cs.checked(c->read(_isequal));
|
bool checked = cs.checked(c->read(_isequal));
|
||||||
|
|
||||||
|
if (!checked && !_end_printed) // Se non e' stato selezionato salta alla prossima part
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (_tipost == clienti || _tipost == fornitori)
|
if (_tipost == clienti || _tipost == fornitori)
|
||||||
{
|
{
|
||||||
@ -379,7 +382,7 @@ bool TStampaScaduto::preprocess_page(int file, int counter)
|
|||||||
if (_cod != _cod_pre || _end_printed) // Controlla se e' cambiato il codice cli/fo/conto
|
if (_cod != _cod_pre || _end_printed) // Controlla se e' cambiato il codice cli/fo/conto
|
||||||
{
|
{
|
||||||
reset_print();
|
reset_print();
|
||||||
if (_pending_total > 0) // stampa i totali del precedente solo se non e' la prima
|
if (_pending_total > 0 ) // stampa i totali del precedente solo se non e' la prima
|
||||||
{
|
{
|
||||||
TAssoc_array& a = (TAssoc_array&) _t[0];
|
TAssoc_array& a = (TAssoc_array&) _t[0];
|
||||||
if (a.items() > 0)
|
if (a.items() > 0)
|
||||||
@ -399,8 +402,9 @@ bool TStampaScaduto::preprocess_page(int file, int counter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!checked) // Se non e' stato selezionato salta alla prossima part
|
TPartita p(rc);
|
||||||
return FALSE;
|
|
||||||
|
int r = p.prima_fattura();
|
||||||
|
|
||||||
if (rc.get_int(PART_NRIGA) == 1)
|
if (rc.get_int(PART_NRIGA) == 1)
|
||||||
{
|
{
|
||||||
@ -409,10 +413,11 @@ bool TStampaScaduto::preprocess_page(int file, int counter)
|
|||||||
{
|
{
|
||||||
set_page_clifoco(nriga); // Setta le righe per stampare le informazioni del cli/fo/conto
|
set_page_clifoco(nriga); // Setta le righe per stampare le informazioni del cli/fo/conto
|
||||||
_pending_clifo = FALSE;
|
_pending_clifo = FALSE;
|
||||||
set_row(nriga++,"");
|
set_row(++nriga,"");
|
||||||
nriga++;
|
nriga++;
|
||||||
}
|
}
|
||||||
set_page_part(nriga);
|
if (r > 0)
|
||||||
|
set_page_part(nriga);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Pesca gli estremi dalla prima riga di fattura, che non e' necessariamente la riga #1
|
//Pesca gli estremi dalla prima riga di fattura, che non e' necessariamente la riga #1
|
||||||
@ -426,9 +431,6 @@ bool TStampaScaduto::preprocess_page(int file, int counter)
|
|||||||
_sc_5 = "";
|
_sc_5 = "";
|
||||||
_sc_6 = "";
|
_sc_6 = "";
|
||||||
|
|
||||||
TPartita p(rc);
|
|
||||||
|
|
||||||
int r = p.prima_fattura();
|
|
||||||
if (r > 0) //Skip next partita if no fatture!
|
if (r > 0) //Skip next partita if no fatture!
|
||||||
{
|
{
|
||||||
TRiga_partite& rp = p.riga(r);
|
TRiga_partite& rp = p.riga(r);
|
||||||
@ -447,13 +449,12 @@ bool TStampaScaduto::preprocess_page(int file, int counter)
|
|||||||
|
|
||||||
if (r < 1)
|
if (r < 1)
|
||||||
{
|
{
|
||||||
reset_row(nriga);
|
|
||||||
_pending_total--;
|
_pending_total--;
|
||||||
if (_pending_clifo)
|
if (_pending_clifo)
|
||||||
_pending_clifo = (_pending_total > 0);
|
_pending_clifo = (_pending_total > 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_residuo.empty() && _nonscad.empty() && _sc_1.empty() && _sc_2.empty() &&
|
if (_residuo.empty() && _nonscad.empty() && _sc_1.empty() && _sc_2.empty() &&
|
||||||
_sc_3.empty() && _sc_4.empty() && _sc_5.empty() && _sc_6.empty())
|
_sc_3.empty() && _sc_4.empty() && _sc_5.empty() && _sc_6.empty())
|
||||||
{
|
{
|
||||||
@ -716,7 +717,7 @@ void TStampaScaduto::print_totali(int& nriga)
|
|||||||
set_row(nriga,"TOTALE %s",(const char*) s);
|
set_row(nriga,"TOTALE %s",(const char*) s);
|
||||||
print_totali_rows(nriga,0);
|
print_totali_rows(nriga,0);
|
||||||
set_row(nriga++,"");
|
set_row(nriga++,"");
|
||||||
if (_end_printed)
|
if (_end_printed)
|
||||||
{
|
{
|
||||||
set_row(nriga,"TOTALE GENERALE");
|
set_row(nriga,"TOTALE GENERALE");
|
||||||
print_totali_rows(nriga,1);
|
print_totali_rows(nriga,1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user