Patch level : 12.0 618

Files correlati     : cg5.exe
Commento            :

L'IVA da versare o a credito non veniva ricalcolata se cambiavo il credito autorizzato
This commit is contained in:
AlexBonazzi 2018-09-20 17:33:13 +02:00
parent 905a62b808
commit 77cad74ae9

View File

@ -1391,8 +1391,8 @@ void Visliq_app::recalc_next_liq(int start_month, TSheet_field* sl, TSheet_field
risl -= debt;
risc -= cred;
risd -= debt;
// aggiunge nuovo credito o debito
// aggiunge nuovo credito o debito
real min = min_vers(_year, i);
if (rstart.sign() < 0 || (rstart.sign() > 0 && rstart < min))
risl += rstart;
@ -1661,8 +1661,8 @@ void Visliq_app::read_general(TMask& m)
real r0 = _lim->get_real("R0");
if (compensabile)
r0 += autf24;
//if (compensabile)
// r0 += autf24;
tt->add(abs(r0).string(), 11);
tt->add(r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C"), 12);
tt->add(_lim->get("S3"), 13);
@ -1811,7 +1811,8 @@ void Visliq_app::write_general(TMask& m)
real nvers(tt_vn.get(5));
real crcode(tt_ln.get(6));
real crf24(tt_ln.get(7));
real autf24(tt_ln.get(8));
real oautf24(tt_lo.get(8));
real autf24(tt_ln.get(8));
TDate dautf24(tt_ln.get(9));
TDate odate(tt_vo.get(1));
TDate ndate(tt_vn.get(1));
@ -1946,6 +1947,11 @@ void Visliq_app::write_general(TMask& m)
risl -= debt;
risc -= cred;
risd -= debt;
if (oautf24 != autf24)
{
risl -= oautf24;
risl += autf24;
}
// aggiunge nuovo credito o debito
real min = min_vers(_year, i);