Aggiornamento scadenze da primanota
Cagaggio modifica mese commerciale in primanota git-svn-id: svn://10.65.10.50/trunk@2481 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8f84227a26
commit
1d3b9b7826
@ -904,8 +904,8 @@ word TPagamento::recalc_rate(int row, bool is_perc_modified,
|
||||
if (oldscad <= 0l) return P_SCAD;
|
||||
}
|
||||
else if (lastdate < _datadoc) return P_INIZIO; // _inizio
|
||||
tt.add(scad,3);
|
||||
ss.add(scad,3);
|
||||
tt.add(scad,3); tt.add(oldscad, 0);
|
||||
ss.add(scad,3); ss.add(oldscad, 0);
|
||||
// ricalcola rate successive: se si vuole modificarne solo una
|
||||
// ci si fotte e si disabilita il ricalcolo
|
||||
TDate ddd (lastdate);
|
||||
@ -941,7 +941,7 @@ word TPagamento::recalc_rate(int row, bool is_perc_modified,
|
||||
{
|
||||
need_recalc = TRUE;
|
||||
// questa la subappaltiamo, per evitare l'inferno
|
||||
return change_value(row, real(new_value), rdiff, is_perc_modified);
|
||||
return change_value(row, real(new_value), rdiff, is_perc_modified, mcomm);
|
||||
}
|
||||
}
|
||||
else // i != row modified
|
||||
@ -969,7 +969,8 @@ word TPagamento::recalc_rate(int row, bool is_perc_modified,
|
||||
return P_OK;
|
||||
}
|
||||
|
||||
word TPagamento::change_value(int rata, real user_val, int rdiff, bool is_perc)
|
||||
word TPagamento::change_value(int rata, real user_val, int rdiff, bool is_perc,
|
||||
bool mcomm)
|
||||
{
|
||||
word err = 0;
|
||||
|
||||
@ -992,7 +993,7 @@ word TPagamento::change_value(int rata, real user_val, int rdiff, bool is_perc)
|
||||
if (!err)
|
||||
{
|
||||
// riaggiusta gli altri parametri se si sono create rate nuove
|
||||
adjust_parameters();
|
||||
adjust_parameters(mcomm);
|
||||
// risistema scadenze fisse se necessario
|
||||
adjust_fixed_scad();
|
||||
// riaggiusta le percentuali o gli importi rispetto al dato modificato
|
||||
@ -1244,7 +1245,7 @@ word TPagamento::change_value_uguali_possible(int row, real user_val, bool is_pe
|
||||
return 0;
|
||||
}
|
||||
|
||||
void TPagamento::adjust_parameters()
|
||||
void TPagamento::adjust_parameters(bool mcomm)
|
||||
{
|
||||
TDate last_date;
|
||||
int last_type;
|
||||
@ -1273,9 +1274,9 @@ void TPagamento::adjust_parameters()
|
||||
if (_inited)
|
||||
{
|
||||
#ifdef USE_DEFAULT_INT_RATE
|
||||
next_scad(last_date, last_scad == 0 ? _int_rate : last_scad, _mcomm, i);
|
||||
next_scad(last_date, last_scad == 0 ? _int_rate : last_scad, mcomm, i);
|
||||
#else
|
||||
next_scad(last_date, last_scad, _mcomm, i);
|
||||
next_scad(last_date, last_scad, mcomm, i);
|
||||
#endif
|
||||
r.add(last_date, 3);
|
||||
}
|
||||
|
@ -65,14 +65,14 @@ class TPagamento : public TObject
|
||||
|
||||
protected:
|
||||
// gestione casino se si modificano importi o percentuali rate
|
||||
word change_value(int rata, real new_val, int rdiff, bool is_perc);
|
||||
word change_value(int rata, real new_val, int rdiff, bool is_perc, bool mcomm);
|
||||
word change_value_differenziate(int rata, real value, bool is_perc);
|
||||
word change_value_uguali(int rata, real value, bool is_perc);
|
||||
word change_value_uguali_prossima(int rata, real value, bool is_perc);
|
||||
word change_value_uguali_possible(int rata, real value, bool is_perc);
|
||||
|
||||
// aggiusta parametri diversi da importo se si sono aggiunte rate
|
||||
void adjust_parameters();
|
||||
void adjust_parameters(bool mcomm);
|
||||
// riaggiusta le percentuali o gli importi rispetto al dato modificato
|
||||
void adjust_perc_imp(bool is_perc, int rdiff);
|
||||
// riaggiusta le percentuali rispetto al dato modificato
|
||||
|
Loading…
x
Reference in New Issue
Block a user