Corretti errori acconti
git-svn-id: svn://10.65.10.50/trunk@1937 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
102ab2d8b4
commit
4f73af3c79
@ -525,17 +525,9 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
tipodoc == "IN" || tipodoc == "PG");
|
tipodoc == "IN" || tipodoc == "PG");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* check date: se si calcola l'acconto, solo da 1/12 a 20/12 | 1/10 a 20/12
|
* check date: se si calcola l'acconto, solo da 1/12 a 20/12
|
||||||
*/
|
*/
|
||||||
int accmonth = _isdifferita ? 11 : 12;
|
int accmonth = _isdifferita ? 11 : 12;
|
||||||
//if (_comp_acconto && date.month() != accmonth && date.day() > 20)
|
|
||||||
// continue;
|
|
||||||
if (_comp_acconto && _freqviva == "M" && date.month() != accmonth)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (_comp_acconto && _freqviva == "T")
|
|
||||||
if (date.month() != 10 && date.month() != 11 && date.month() != 12)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (_comp_acconto && date.month() == accmonth && date.day() > 20)
|
if (_comp_acconto && date.month() == accmonth && date.day() > 20)
|
||||||
continue;
|
continue;
|
||||||
|
@ -498,8 +498,24 @@ else if (_basecalc == incorso)
|
|||||||
_comp_acconto = TRUE;
|
_comp_acconto = TRUE;
|
||||||
// force recalc of current month
|
// force recalc of current month
|
||||||
_recalc = one;
|
_recalc = one;
|
||||||
// insozza il water
|
int need_refresh = FALSE;
|
||||||
update_firm(12);
|
for (int mese = 1; mese < _month; mese++)
|
||||||
|
if (is_month_ok_strict(mese) && (!look_lim(mese) || !_lim->get_bool("B0")))
|
||||||
|
{
|
||||||
|
need_refresh = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (need_refresh && yesno_box("Alcuni mesi precedenti non "
|
||||||
|
"risultano ricalcolati. E' consigliabile il ricalcolo. "
|
||||||
|
"Si desidera eseguirlo?"))
|
||||||
|
_recalc = ever;
|
||||||
|
|
||||||
|
for (int m = 1; m <= _month; m++)
|
||||||
|
if (is_month_plain(m) || _recalc == ever)
|
||||||
|
{
|
||||||
|
if (_prind->iscancelled()) break;
|
||||||
|
update_firm(m);
|
||||||
|
}
|
||||||
|
|
||||||
// calcola l'acconto
|
// calcola l'acconto
|
||||||
if (look_lim(12)) //posiziona anche la tabella lam
|
if (look_lim(12)) //posiziona anche la tabella lam
|
||||||
@ -509,7 +525,13 @@ else if (_basecalc == incorso)
|
|||||||
// somma i non fatturati/non annotati
|
// somma i non fatturati/non annotati
|
||||||
bc += inf + ina;
|
bc += inf + ina;
|
||||||
cre = _lim->get_real("R12");
|
cre = _lim->get_real("R12");
|
||||||
deb = _lim->get_real("R13");
|
|
||||||
|
//quando calcolo la 12° ci vado a sommare il
|
||||||
|
//versa. dovuto all'acconto
|
||||||
|
//allora devo ricalcolarmi l'effettivo credito
|
||||||
|
cre -= _lim->get_real("R11");
|
||||||
|
|
||||||
|
deb = _lim->get_real("R13") + inf + ina;
|
||||||
if (bc.sign() > 0) acc = bc;
|
if (bc.sign() > 0) acc = bc;
|
||||||
|
|
||||||
// 11/09/1995
|
// 11/09/1995
|
||||||
@ -549,7 +571,12 @@ else error = 1;
|
|||||||
// pulisci il water
|
// pulisci il water
|
||||||
_comp_acconto = FALSE;
|
_comp_acconto = FALSE;
|
||||||
_isprint = FALSE;
|
_isprint = FALSE;
|
||||||
|
/*
|
||||||
update_firm(12);
|
update_firm(12);
|
||||||
|
*/
|
||||||
|
for (int i = 1; i <= _month; i++)
|
||||||
|
if (is_month_plain(i))
|
||||||
|
update_firm(i);
|
||||||
_isprint = TRUE;
|
_isprint = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user