Corretta stampa descrizione cliente in stampa scaduto
git-svn-id: svn://10.65.10.50/trunk@2590 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
67d79afd7d
commit
c695a1724f
@ -126,7 +126,7 @@ bool fil_function(const TRelation *r)
|
||||
}
|
||||
|
||||
void TStampaScaduto::save_totals()
|
||||
// Sto' salvataggio serve per memorizzare i totali nel caso in preprocess_page sia ritornato FALSE
|
||||
// 'Sto salvataggio serve per memorizzare i totali nel caso in preprocess_page sia ritornato FALSE
|
||||
// evitando percio' strane somme di totali o mancanze di essi.
|
||||
{
|
||||
TAssoc_array& a = (TAssoc_array&) _t[0];
|
||||
@ -359,7 +359,8 @@ bool TStampaScaduto::preprocess_page(int file, int counter)
|
||||
rec = current_cursor()->curr(LF_PCON);
|
||||
if (!cs.checked(c->read(_isequal))) // Se non e' stato selezionato salta alla prossima part
|
||||
return FALSE;
|
||||
|
||||
|
||||
bool ret = FALSE;
|
||||
int nriga = 1;
|
||||
if (_tipost == clienti || _tipost == fornitori)
|
||||
{
|
||||
@ -386,15 +387,22 @@ bool TStampaScaduto::preprocess_page(int file, int counter)
|
||||
if (_end_printed) return TRUE; // Go back, print and exit!
|
||||
}
|
||||
}
|
||||
|
||||
set_page_clifoco(nriga); // Setta le righe per stampare le informazioni del cli/fo/conto
|
||||
_cod_pre = _cod;
|
||||
_cod_pre = _cod;
|
||||
set_row(nriga++,""); /* fv */
|
||||
nriga++;
|
||||
}
|
||||
set_page_part(nriga);
|
||||
if (rc.get_int(PART_NRIGA) != 1)
|
||||
{
|
||||
|
||||
if (rc.get_int(PART_NRIGA) == 1)
|
||||
set_page_part(nriga);
|
||||
else
|
||||
// if (rc.get_int(PART_NRIGA) != 1)
|
||||
// {
|
||||
restore_totals();
|
||||
return FALSE; // Skip this, 'cause row #1 is already read!
|
||||
}
|
||||
// return ret; // Skip this, 'cause row #1 has been read already!
|
||||
// }
|
||||
|
||||
//Pesca gli estremi dalla prima riga di fattura, che non e' necessariamente la riga #1
|
||||
_residuo = "";
|
||||
_nonscad = "";
|
||||
@ -422,10 +430,12 @@ bool TStampaScaduto::preprocess_page(int file, int counter)
|
||||
compute_all(p);
|
||||
}
|
||||
current_cursor()->repos(); // Very, very necessary...
|
||||
|
||||
if (r < 1)
|
||||
{
|
||||
restore_totals();
|
||||
return FALSE;
|
||||
reset_row(nriga);
|
||||
return TRUE;
|
||||
}
|
||||
if (_residuo.empty() && _nonscad.empty() && _sc_1.empty() && _sc_2.empty() &&
|
||||
_sc_3.empty() && _sc_4.empty() && _sc_5.empty() && _sc_6.empty())
|
||||
@ -593,19 +603,20 @@ bool TStampaScaduto::set_print(int)
|
||||
break;
|
||||
default: break;
|
||||
} // End of inner switch
|
||||
long inc = 15;
|
||||
|
||||
long inc = 15l;
|
||||
if (_tipost == clienti)
|
||||
inc = 30;
|
||||
inc = 30l;
|
||||
long nday = inc;
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
TDate* d = (TDate *)_s_date.objptr(j);
|
||||
if (_tipost == fornitori && j == 4 )
|
||||
nday+=inc;
|
||||
nday += inc;
|
||||
*d = _limscad - nday;
|
||||
nday+=inc;
|
||||
nday += inc;
|
||||
}
|
||||
rt=TRUE;
|
||||
rt = TRUE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -769,14 +780,15 @@ void TStampaScaduto::print_header()
|
||||
}
|
||||
|
||||
void TStampaScaduto::set_page_clifoco(int& nriga)
|
||||
{
|
||||
{
|
||||
reset_row(nriga); /**/
|
||||
set_row(nriga,"@b#t",&_cod);
|
||||
set_row(nriga++,"@18g#t@r",&_des);
|
||||
set_row(nriga,"");
|
||||
set_row(nriga/*++*/,"@18g#t@r",&_des);
|
||||
}
|
||||
|
||||
void TStampaScaduto::set_page_part(int& nriga)
|
||||
{
|
||||
{
|
||||
reset_row(nriga); /**/
|
||||
set_row(nriga,"#2t/@7s",&_anno,FLD(LF_PARTITE,PART_NUMPART));
|
||||
set_row(nriga,"@12g#t@20g#5t",&_numdoc,&_protiva);
|
||||
set_row(nriga,"@26g#t@37g#t",&_datadoc,&_codval);
|
||||
|
Loading…
x
Reference in New Issue
Block a user