Patch level : 10.0 patch 471
Files correlati : lv2 Ricompilazione Demo : [ ] Commento : Corretta la gestione delle date; pensate in formato ansi, in realtà vengono scritte in fomato ggmmaaa Evitato che nel nome file venga scritto anche il percorso, così il file viene effettivamente trovato git-svn-id: svn://10.65.10.50/trunk@19445 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
93b23a63fc
commit
42bbc82938
@ -531,21 +531,23 @@ bool TConta_pulito_msk::elabora_file(const TFilename& file)
|
||||
{
|
||||
TString riga = s.line();
|
||||
if (riga.blank())
|
||||
continue;
|
||||
continue;
|
||||
|
||||
TRiga_pacco* rp = new TRiga_pacco();
|
||||
rp->set_key(riga.left(50));
|
||||
rp->set_articolo(riga.mid(50, 20));
|
||||
rp->set_quantita(atoi(riga.mid(70, 8)));
|
||||
rp->set_data((TDate)riga.mid(78, 8));
|
||||
TDate data(atoi(riga.mid(78, 2)), atoi(riga.mid(80, 2)), atoi(riga.mid(82, 4)));
|
||||
rp->set_data(data);
|
||||
int codcf = atoi(riga.mid(86, 6));
|
||||
if(codcf > 0)
|
||||
{
|
||||
rp->set_cliente(codcf); //eventualmente vuoto
|
||||
rp->set_databo((TDate)riga.mid(92, 8)); //eventualmente vuoto
|
||||
TDate databo(atoi(riga.mid(92, 2)), atoi(riga.mid(94, 2)), atoi(riga.mid(96, 4)));
|
||||
rp->set_databo(databo); //eventualmente vuoto
|
||||
}
|
||||
|
||||
const bool ann = riga.mid(100, 1) == 'S' ? true : false;
|
||||
const bool ann = riga.mid(100, 1)[0] == 'S' ? true : false;
|
||||
rp->set_annullato(ann);
|
||||
|
||||
//recupero l'unità di misura principale di quest'articolo
|
||||
@ -553,8 +555,19 @@ bool TConta_pulito_msk::elabora_file(const TFilename& file)
|
||||
key.add(riga.mid(50, 20));
|
||||
key.add(1);
|
||||
const TRectype& umart = cache().get(LF_UMART, key);
|
||||
TString4 um = umart.get(UMART_UM);
|
||||
rp->set_um(um);
|
||||
if (umart.empty())
|
||||
{
|
||||
TString str;
|
||||
TString80 codart = riga.mid(50,20);
|
||||
codart.trim();
|
||||
str << "ATTENZIONE: non è stata trovata nessuna unità di misura valida per l'articolo " << codart;
|
||||
warning_box(str);
|
||||
}
|
||||
else
|
||||
{
|
||||
TString4 um = umart.get(UMART_UM);
|
||||
rp->set_um(um);
|
||||
}
|
||||
|
||||
rp->write(f);
|
||||
}
|
||||
@ -909,9 +922,12 @@ TConta_pulito_msk::TConta_pulito_msk():TAutomask("lv2900a")
|
||||
TConfig configlv(CONFIG_DITTA, "lv");
|
||||
|
||||
const TString& path = configlv.get("PathPulito");
|
||||
const TString& file = configlv.get("FilePulito");
|
||||
TFilename& file = (TFilename)configlv.get("FilePulito");
|
||||
TString80 f = file.name_only();
|
||||
f << ".dat";
|
||||
|
||||
set(F_PATH, path);
|
||||
set(F_FNAME, file);
|
||||
set(F_FNAME, f);
|
||||
|
||||
//se ho più di un parametro, allora lo sto lanciando da linea di comando, e ne devo tenere conto
|
||||
if (main_app().argc() > 2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user