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 << "/f"; fn << i;
fn.ext("trr");
dr.set_xml();
ofstream out(fn);
out << rc;
fn.ext("dir");
@ -1129,9 +1130,14 @@ void TManutenzione_app::convert_recdef(int firm)
TString pref = prefix().name();
const int curr_firm = prefix().get_codditta();
bool all_firms = firm < 0;
const int from_firm = all_firms || firm == 0 ? 1 : firm;
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);
if (all_firms || firm == 0)
@ -1143,15 +1149,21 @@ void TManutenzione_app::convert_recdef(int firm)
clean_recdef(dir);
dump_trc(dir);
}
for (int i = from_firm; i <= to_firm; i++)
for (int i = 0; i < ditte.items(); i++)
{
set_firm(i);
dir = firm2dir(i);
dir.add("recdesc");
if (!dexist(dir))
make_dir(dir);
clean_recdef(dir);
dump_trc(dir);
int firm = atoi((TString &)ditte[i]);
dir = firm2dir(firm);
if (dexist(dir))
{
set_firm(firm);
load_des();
dir.add("recdesc");
if (!dexist(dir))
make_dir(dir);
clean_recdef(dir);
dump_trc(dir);
}
}
if (curr_firm > 0)
set_firm(curr_firm);