diff --git a/cg/cg5400.cpp b/cg/cg5400.cpp index 104e21ccd..ce276e5d6 100755 --- a/cg/cg5400.cpp +++ b/cg/cg5400.cpp @@ -140,6 +140,19 @@ bool TRipristina_stampa::reg_restore(const TString& regist, reg.put("I4", mese); // Ultimo mese di stampa liquidazione if (reg.get_int("I8") >= mese) reg.zero("I8"); // Mese di ultima stampa credito precedente + + TTable lim("LIM"); // Azzera i flag di stampa liquidazione + lim.put("CODTAB", format("%04d%02d", year, mese+1)); + for (int err = lim.read(_isgteq); err == NOERR; err = lim.next()) + { + if (atoi(lim.get("CODTAB").left(4)) != year) break; + const bool stampato = lim.get_bool("B1"); + if (stampato) + { + lim.zero("B1"); + lim.rewrite(); + } + } } } else