Corretti errori MI2308 e MI2309, relativo al calcolo dell'acconto

per anno precedente.


git-svn-id: svn://10.65.10.50/trunk@4340 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
angelo 1997-05-14 10:46:05 +00:00
parent 2b26a6840c
commit a2e7b5aa4a

View File

@ -470,6 +470,7 @@ bool TLiquidazione_app::recalc_acconto(real& inf, real& ina)
{ {
// determina casistica // determina casistica
enum { mm, tt, mt, tm, boh } history = boh; enum { mm, tt, mt, tm, boh } history = boh;
real divide_by_three = 1.0;
char thh = *_freqviva; char thh = *_freqviva;
TString16 thyear = _year; TString16 thyear = _year;
@ -526,9 +527,9 @@ bool TLiquidazione_app::recalc_acconto(real& inf, real& ina)
real av = _lim->get_real("R11"); real av = _lim->get_real("R11");
bc += av; bc += av;
} }
if (_basecalc == tm) if (history == tm)
// tm come tt ma si divide per 3 la base di calcolo prima di calcolare l'88% // tm come tt ma si divide per 3 la base di calcolo prima di calcolare l'88%
bc /= real(3.0); divide_by_three = 3.0;
break; break;
case mt: case mt:
// basecalcolo: 10, 11, 12 anno prec., 10 e 11 se a debito, 12 vedi acconto; // basecalcolo: 10, 11, 12 anno prec., 10 e 11 se a debito, 12 vedi acconto;
@ -557,9 +558,10 @@ bool TLiquidazione_app::recalc_acconto(real& inf, real& ina)
break; break;
} }
round_mille_lire(bc);
if (bc.sign() > 0) //debito if (bc.sign() > 0) //debito
{ {
acc = (bc * _ver->get(isdifferita ? B_LIQ_DIFF : B_LIQ_NORM))/CENTO; acc = ((bc / divide_by_three) * _ver->get(isdifferita ? B_LIQ_DIFF : B_LIQ_NORM))/CENTO;
acc.round(ROUND_LIRA); acc.round(ROUND_LIRA);
} }
@ -567,7 +569,8 @@ bool TLiquidazione_app::recalc_acconto(real& inf, real& ina)
} }
_year = thyear; _year = thyear;
} }
else if (_basecalc == incorso) else
if (_basecalc == incorso)
{ {
// that's pazzesc but as it turns out there's no better way // that's pazzesc but as it turns out there's no better way
_comp_acconto = TRUE; _comp_acconto = TRUE;