From d9425ffdaae43e7f402f521f8876af49e376b0ea Mon Sep 17 00:00:00 2001 From: angelo Date: Mon, 20 May 1996 13:47:51 +0000 Subject: [PATCH] Corretto errore MI1069. git-svn-id: svn://10.65.10.50/trunk@2863 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg1303.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cg/cg1303.cpp b/cg/cg1303.cpp index dc0b5c56d..4199c8073 100755 --- a/cg/cg1303.cpp +++ b/cg/cg1303.cpp @@ -2,6 +2,7 @@ //* Rinumerazione numero protocollo * //*********************************** #include +#include #include "cg1300.h" #include "cg1303.h" @@ -64,8 +65,14 @@ bool TAgg_nprot::menu(MENU_TAG m) int TAgg_nprot::rinumera_prot() { + TConfig cnf(CONFIG_DITTA,"cg"); + const bool sc_enabled = cnf.get_bool("GesSal"); + TRelation rel (LF_MOV); + rel.add(LF_PARTITE,"NREG=NUMREG",2); + TLocalisamfile& mov = rel.lfile(); + TLocalisamfile& part= rel.lfile(LF_PARTITE); //TString80 filter; //filter.format("ANNOIVA=%04d && REG=\"%s\"", _anno, (const char*)_reg); @@ -126,6 +133,13 @@ int TAgg_nprot::rinumera_prot() mov.put(MOV_PROTIVA, nprot); mov.put(MOV_UPROTIVA, uprot); mov.rewrite(); + // Aggiorna il nr di prot. iva sul file partite + if (sc_enabled && rel.is_first_match(LF_PARTITE)) + do + { + part.put(PART_PROTIVA,nprot); + part.rewrite(); + } while (rel.next_match(LF_PARTITE)); } TTable reg("REG");