Calcolo prorata annuale, stampa annuale su registri
git-svn-id: svn://10.65.10.50/trunk@1497 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6feb6f1afc
commit
3ecd157214
@ -236,12 +236,7 @@ bool TLiquidazione_app::user_create()
|
||||
from.put(MOV_DATAREG, f);
|
||||
to.put(MOV_DATAREG, t);
|
||||
_cur->setregion(from, to);
|
||||
_canprint = is_month_ok_strict(_month);
|
||||
|
||||
/*
|
||||
if (is_month_ok_strict(_month))
|
||||
update_firm(_month);
|
||||
*/
|
||||
_canprint = is_month_ok_strict(_month) || _month == 13;
|
||||
|
||||
//modifica del 03/05/1995
|
||||
int need_refresh = FALSE;
|
||||
@ -258,9 +253,8 @@ bool TLiquidazione_app::user_create()
|
||||
if (is_month_ok(mese, _month) || _recalc == ever)
|
||||
update_firm(mese);
|
||||
|
||||
if (is_month_ok_strict(_month))
|
||||
if (is_month_ok_strict(_month) || _month == 13)
|
||||
update_firm(_month);
|
||||
//fine modifica
|
||||
|
||||
if (_isprint && _descr_arr.items() > 0)
|
||||
print();
|
||||
|
@ -610,7 +610,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt)
|
||||
ttm.add(ad2.string(),2); // IVA acq. amm. indetr
|
||||
t->_s0 = ttm;
|
||||
|
||||
t->_f0 = !_prorata.is_zero(); // flag per segnalare l'esistenza
|
||||
t->_f0 = !_prorata.is_zero() && (month != 13); // flag per segnalare l'esistenza
|
||||
d->_r9 += _pom->get_real("R9"); // acq. inded. su ricavi esenti
|
||||
d->_r10 += _pom->get_real("R10"); // IVA acq. inded. su ricavi esenti
|
||||
|
||||
@ -667,20 +667,38 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt)
|
||||
real e2 = _pla->get_real("R2");
|
||||
real e3 = _pla->get_real("R3");
|
||||
real am = _pla->get_real("R4");
|
||||
real pr = _pla->get_real("R10");
|
||||
real co = _pla->get_real("R9");
|
||||
real iaq = _pla->get_real("R11"); // IVA acquisti
|
||||
real ppg = _pla->get_real("R12"); // pro-rata pagato
|
||||
|
||||
// calcola nuovo prorata per ogni attivita' (miste: 1+2)
|
||||
real ris = v - am - e3;
|
||||
|
||||
real pr(0.0);
|
||||
if (!ris.is_zero())
|
||||
pr = (e1/ris) * CENTO;
|
||||
real co = 0.0;
|
||||
real topay = 0.0;
|
||||
pr.round(ROUND_LIRA);
|
||||
if (pr != _prorata)
|
||||
{
|
||||
// calcolo conguaglio -- se positivo e' a debito
|
||||
topay = iaq * (pr / CENTO);
|
||||
co = topay - ppg;
|
||||
co.round(ROUND_LIRA);
|
||||
}
|
||||
|
||||
_DescrItem* dd = new _DescrItem(ANNUAL);
|
||||
|
||||
// prorata
|
||||
if (!_prorata.is_zero())
|
||||
dd->_f0 |= IS_PRORATA;
|
||||
dd->_r0 = v;
|
||||
dd->_r0 = ris;
|
||||
dd->_r1 = e1;
|
||||
dd->_r2 = pr;
|
||||
dd->_r3 = co;
|
||||
dd->_r4 = e2;
|
||||
dd->_r5 = e3;
|
||||
dd->_r5 = e3;
|
||||
dd->_r6 = topay;
|
||||
t->_arr.add(dd);
|
||||
}
|
||||
}
|
||||
@ -1412,6 +1430,12 @@ bool TLiquidazione_app::set_annual(_DescrItem& d)
|
||||
int row = get_maxrow()+1;
|
||||
if (d._f0 & IS_PRORATA)
|
||||
{
|
||||
// non lo ha stampato prima se annuale, perche' vladimiro il nefido
|
||||
// pretende l'assurdo aggiornamento della perc. a quella nuova
|
||||
set_row(++row, "%% PRO-RATA ed IVA non detraibile (%s%%)@69g%r",
|
||||
(const char*)(d._r2.string()), &(d._r6));
|
||||
row++;
|
||||
|
||||
set_bookmark("Calcolo pro-rata", _att_bookmark);
|
||||
|
||||
ret = TRUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user