diff --git a/cg/cg0500a.uml b/cg/cg0500a.uml index e795b28f8..5ad1fb5e5 100755 --- a/cg/cg0500a.uml +++ b/cg/cg0500a.uml @@ -141,7 +141,7 @@ BEGIN END // Questo rimane quasi sempre nascosto -STRING F_TIPO_MOV 2 +STRING F_TIPO_MOV 1 BEGIN PROMPT 2 5 "" FIELD TIPOMOV diff --git a/cg/cg5400.cpp b/cg/cg5400.cpp index 79a211487..104e21ccd 100755 --- a/cg/cg5400.cpp +++ b/cg/cg5400.cpp @@ -97,12 +97,12 @@ bool TRipristina_stampa::reg_restore(const TString& regist, TRectype from(mov.curr()); from.zero(); TRectype to(from); - TString16 filter; + TString80 filter; from.put(MOV_DATAREG, d); to.put(MOV_DATAREG, dlast); if (!giornale) - filter.format("%s==\"%s\"", MOV_REG, regist); + filter.format("%s==\"%s\"", MOV_REG, (const char*)regist); TCursor cursor(&rel, filter, 2, &from, &to); long last_num = 0L; @@ -131,17 +131,25 @@ bool TRipristina_stampa::reg_restore(const TString& regist, --d; if (d > inizio_anno) // Aggiorna data ultima stampa - { - reg.put("D3", d); // Data ultima stampa - reg.put("I4", d.month()-1); // Ultimo mese di stampa liquidazione - if (reg.get_int("I8") >= d.month()) - reg.zero("I8"); // Mese di ultima stampa credito precedente + { + reg.put("D3", d); // Data ultima stampa + if (!giornale) + { + const int mese = d.month(); + if (reg.get_int("I4") > mese) + reg.put("I4", mese); // Ultimo mese di stampa liquidazione + if (reg.get_int("I8") >= mese) + reg.zero("I8"); // Mese di ultima stampa credito precedente + } } else { reg.zero("D3"); - reg.zero("I4"); - reg.zero("I8"); + if (!giornale) + { + reg.zero("I4"); + reg.zero("I8"); + } } ok = (reg.rewrite() == NOERR); @@ -246,7 +254,7 @@ bool TRipristina_stampa::menu(MENU_TAG) if (yesno_box(mess)) { switch (_op) - { + { case restore_inl: inl_restore(reg, year, month); break; default: @@ -264,6 +272,6 @@ bool TRipristina_stampa::menu(MENU_TAG) int cg5400(int argc, char* argv[]) { TRipristina_stampa a ; - a.run(argc, argv, "Ripristino stampa registri"); + a.run(argc, argv, "Ripristino stampe"); return 0; } diff --git a/cg/cg5400a.uml b/cg/cg5400a.uml index b9307f26b..64b80a7e4 100755 --- a/cg/cg5400a.uml +++ b/cg/cg5400a.uml @@ -37,6 +37,7 @@ BEGIN CHECKTYPE REQUIRED HELP "Anno IVA da cui ripristinare la stampa" WARNING "L'anno deve essere specificato" + MESSAGE COPY,F_ESER END STRING F_ESER 4 @@ -65,6 +66,7 @@ BEGIN DISPLAY "Descrizione @50" S0 DISPLAY "Tipo" I0 OUTPUT F_YEAR CODTAB[1,4] + OUTPUT F_ESER CODTAB[1,4] OUTPUT F_REG CODTAB[5,7] OUTPUT F_DREG S0 OUTPUT F_TIPO I0