diff --git a/src/cg/cg5500.cpp b/src/cg/cg5500.cpp index fb4812c0e..40a155996 100755 --- a/src/cg/cg5500.cpp +++ b/src/cg/cg5500.cpp @@ -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);