Patch level : 12.0 342

Files correlati     : cg4.exe

Corretto il calcolo pro-rata durante l'anno (non in 13a) nel caso non sia reperibile la percentuale annuale.


git-svn-id: svn://10.65.10.50/branches/R_10_00@23588 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
bonazzi 2017-02-08 16:05:06 +00:00
parent 0387238275
commit c038b8ba9c
2 changed files with 16 additions and 5 deletions

View File

@ -1783,8 +1783,6 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
const int tipodet = is_detraibile ? 0 : tipoind;
const real imponibile = is_detraibile ? impon_det : impon_ind;
const real imposta = is_detraibile ? impos_det : impos_ind;
//qui da verificare
if ((imponibile.is_zero() && imposta.is_zero()) &&
(bIsMovDiff &&
@ -2646,6 +2644,19 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
if (percentuale2 != INVALID_PRORATA && percentuale2 != INVALID_PRORATA_ASSERT)
aaa -= rr2 ? *rr2 : ZERO;
prorata = _prorata.calc_prorata(aaa, _year);
yy.format("%d", year_int);
if (_prorata.percentuale(yy) == INVALID_PRORATA)
_prorata.perc_array().add(yy, prorata);
if (percentuale1 == INVALID_PRORATA)
{
yy.format("%d", year_int - 1);
_prorata.perc_array().add(yy, prorata_precedente1);
}
if (percentuale2 == INVALID_PRORATA)
{
yy.format("%d", year_int - 2);
_prorata.perc_array().add(yy, prorata_precedente2);
}
const real prorata_diff = _prorata.calc_prorata(fdiffinc_iva_acq, _year);

View File

@ -1051,9 +1051,9 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
if (!annual) // Se non siamo in annuale prende il prorata su doc. acq. anno precedente
{
t->_r12 += _plm->get_real("R14");
t->_r13 = _plm->get_real("R4"); // percentuale prorata anno precedente
t->_r13 = _plm->get_real("R4"); // percentuale prorata anno precedente
t->_r14 += _plm->get_real("R15");
t->_r15 = _plm->get_real("R16"); // percentuale prorata 2 anni addietro
t->_r15 = _plm->get_real("R16"); // percentuale prorata 2 anni addietro
}
// pro-rata indetraibile sui doc. acq. anno attuale
@ -1065,7 +1065,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
ad2 = real(ttm.get(2));
ad1 += _pom->get_real("R11");
ad2 += _pom->get_real("R12");
ttm.add(_plm->get("R12"), 0); // % pro-rata anno corrente
ttm.add(_plm->get_real("R12"), 0); // % pro-rata anno corrente
ttm.add(ad1.string(),1); // imp. acq. amm. indetr.
ttm.add(ad2.string(),2); // IVA acq. amm. indetr
t->_s0 = ttm;