Patch level : 12.0 1174

Files correlati     : ba1.exe

Commento:
Migliorata protezione aggiornamento tracciati sulla base dei dati Team
This commit is contained in:
Alessandro Bonazzi 2022-06-21 08:56:53 +02:00
parent 0b8c42fc8c
commit 5987467204

View File

@ -525,6 +525,7 @@ void TManutenzione_app::dump_trc(const char * dir, const bool des_too, const lon
fn = dir; fn = dir;
fn << "/f"; fn << i; fn << "/f"; fn << i;
fn.ext("trr"); fn.ext("trr");
dr.set_xml();
ofstream out(fn); ofstream out(fn);
out << rc; out << rc;
fn.ext("dir"); fn.ext("dir");
@ -1129,9 +1130,14 @@ void TManutenzione_app::convert_recdef(int firm)
TString pref = prefix().name(); TString pref = prefix().name();
const int curr_firm = prefix().get_codditta(); const int curr_firm = prefix().get_codditta();
bool all_firms = firm < 0; bool all_firms = firm < 0;
const int from_firm = all_firms || firm == 0 ? 1 : firm;
TString_array ditte; TString_array ditte;
const int to_firm = all_firms ? prefix().firms(ditte) : firm; int nditte = firm > 0 ? 1 : 0;
if (all_firms)
nditte = prefix().firms(ditte);
else
if (firm > 0)
ditte.add(format("%d", firm));
TFilename dir = firm2dir(0); TFilename dir = firm2dir(0);
if (all_firms || firm == 0) if (all_firms || firm == 0)
@ -1143,16 +1149,22 @@ void TManutenzione_app::convert_recdef(int firm)
clean_recdef(dir); clean_recdef(dir);
dump_trc(dir); dump_trc(dir);
} }
for (int i = from_firm; i <= to_firm; i++) for (int i = 0; i < ditte.items(); i++)
{ {
set_firm(i); int firm = atoi((TString &)ditte[i]);
dir = firm2dir(i);
dir = firm2dir(firm);
if (dexist(dir))
{
set_firm(firm);
load_des();
dir.add("recdesc"); dir.add("recdesc");
if (!dexist(dir)) if (!dexist(dir))
make_dir(dir); make_dir(dir);
clean_recdef(dir); clean_recdef(dir);
dump_trc(dir); dump_trc(dir);
} }
}
if (curr_firm > 0) if (curr_firm > 0)
set_firm(curr_firm); set_firm(curr_firm);
else else