Patch level : 10.0 patch 505

Files correlati     : lv2
Ricompilazione Demo : [ ]
Commento            :
Acquisizione da contapezzi:
-Non sono obbligatori tutti i file, ma almeno uno
-Da linea di comando:
  -non mi deve dire finito
  -deve chiudere da solo la videata di ricezione


git-svn-id: svn://10.65.10.50/trunk@19596 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca83 2009-11-09 16:49:56 +00:00
parent 7931977267
commit 2e7870b0ec

View File

@ -533,14 +533,7 @@ bool TAcquisizione_lavanderie_app::destroy()
bool TAcquisizione_lavanderie_app::elabora_file(const TString& file, TLog_report& rep, TArticoli_contati& articoli, int& nrighe, int& nrsalt)
{
//scandisco il file solo se esiste
TFilename strname = file;
if (!strname.exist())
{
TString str;
str << "ATTENZIONE: il file " << strname << " non esiste!";
warning_box(str);
return false;
}
TFilename strname = file;
TScanner s(file);
while (s.ok())
@ -833,16 +826,36 @@ bool TAcquisizione_lavanderie_app::transfer()
file.add(*row1);
}
bool esiste = false;
if (file.find('*') >= 0 || file.find('?') >= 0)
{
TString_array lista_file;
list_files(file, lista_file);
FOR_EACH_ARRAY_ROW(lista_file, r2, row2)
elaborato = elabora_file(*row2, logrep, articoli, nrighe, nrsalt);
{
TFilename strname = *row2;
if (strname.exist())
{
esiste = true;
elaborato = elabora_file(*row2, logrep, articoli, nrighe, nrsalt);
}
}
}
else
else if(file.exist())
{
esiste = true;
elaborato = elabora_file(file, logrep, articoli, nrighe, nrsalt);
}
if (!esiste)
{
TString str;
str << "ATTENZIONE: non č stato trovato nessun file da elaborare";
warning_box(str);
}
}
}
@ -874,20 +887,29 @@ bool TAcquisizione_lavanderie_app::transfer()
list_files(file, lista_file);
FOR_EACH_ARRAY_ROW(lista_file, r2, row2)
sposta_file(*row2);
{
TFilename strname(*row2);
if (strname.exist())
sposta_file(*row2);
}
}
else
else if (file.exist())
sposta_file(file);
}
}
}
TReport_book buc;
buc.add(logrep);
if (buc.pages() > 0)
buc.preview();
if (_auto == "A")
_msk->send_key(K_SPACE, DLG_CANCEL);
else
message_box(TR("Generazione terminata"));
{
TReport_book buc;
buc.add(logrep);
if (buc.pages() > 0)
buc.preview();
else
message_box(TR("Generazione terminata"));
}
}
return true;