From 2e7870b0ec895879ec2e6b02107b29a3f23ea10b Mon Sep 17 00:00:00 2001 From: luca83 Date: Mon, 9 Nov 2009 16:49:56 +0000 Subject: [PATCH] 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 --- lv/lv2600.cpp | 56 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/lv/lv2600.cpp b/lv/lv2600.cpp index e51122c2b..0d96e45ce 100755 --- a/lv/lv2600.cpp +++ b/lv/lv2600.cpp @@ -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;