diff --git a/cg/cg5300.cpp b/cg/cg5300.cpp index fa159be71..ba7f6de5d 100755 --- a/cg/cg5300.cpp +++ b/cg/cg5300.cpp @@ -251,8 +251,9 @@ int TParaliq_app::rewrite(const TMask& m) static int oldyear; TSheet_field& sf = (TSheet_field&)m.field(F_SHEET_PLA); - const long firm = m.get_long(F_CODDITTA); - const int year = m.get_int(F_YEAR); + const long firm = m.get_long(F_CODDITTA); + const int year = m.get_int(F_YEAR); + const char freq = m.get(F_FREQ_VERS)[0]; int err = NOERR; bool was = FALSE; @@ -299,10 +300,11 @@ int TParaliq_app::rewrite(const TMask& m) TTable lim("LIM"); TRecfield lim_anno(lim.curr(),"CODTAB",0,3); + TRecfield lim_mese(lim.curr(),"CODTAB",4,5); for (lim.first(); !lim.eof(); lim.next()) { - if (year == atoi(lim_anno)) + if (year == atoi(lim_anno) && (freq == 'M' || (freq == 'T' && atoi(lim_mese) == 3))) { lim.put("B0",""); lim.rewrite();