Patch level : 10.0 patch 262
Files correlati : lv2 Ricompilazione Demo : [ ] Commento : Corretti dettagli sull'importazione da contapezzi git-svn-id: svn://10.65.10.50/trunk@18570 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7d5e0aeaba
commit
89aad9db2e
@ -154,6 +154,8 @@ bool TAcquisizione_lavanderie_app::create()
|
||||
TSheet_field& sheet = _msk->sfield(F_SHEET_NAME);
|
||||
sheet.set_auto_append();
|
||||
|
||||
open_files(LF_DOC, LF_RIGHEDOC);
|
||||
|
||||
return TSkeleton_application::create();
|
||||
}
|
||||
|
||||
@ -209,24 +211,27 @@ void TAcquisizione_lavanderie_app::elabora_file(const TString& file, bool new_fi
|
||||
else if (riga.len() == 121) // ->SKEMA
|
||||
{
|
||||
//leggo i campi dalla riga del file
|
||||
datadoc.set_year(atoi(riga.mid(0,4)));
|
||||
datadoc.set_month(atoi(riga.mid(4,2)));
|
||||
datadoc.set_day(atoi(riga.mid(6,2)));
|
||||
|
||||
codart = riga.mid(8,20);
|
||||
codcf = atol(riga.mid(28,20));
|
||||
qta = atoi(riga.mid(48,11));
|
||||
ndoc = atoi(riga.mid(59,11));
|
||||
|
||||
switch (atoi(riga.mid(70,11)))
|
||||
const int y = atoi(riga.mid(0,4));
|
||||
const int m = atoi(riga.mid(4,2));
|
||||
const int d = atoi(riga.mid(6,2));
|
||||
if (d > 0 && d <= 31 && m > 0 && m <= 12 && y > 2000)
|
||||
{
|
||||
case 1: tipo_conteggio = "Automatico"; break;
|
||||
case 2: tipo_conteggio = "Manuale"; break;
|
||||
case 3: tipo_conteggio = "Scarto"; break;
|
||||
default: break;
|
||||
datadoc = TDate(d, m, y);
|
||||
codart = riga.mid(8,20);
|
||||
codcf = atol(riga.mid(28,20));
|
||||
qta = atoi(riga.mid(48,11));
|
||||
ndoc = atoi(riga.mid(59,11));
|
||||
|
||||
switch (atoi(riga.mid(70,11)))
|
||||
{
|
||||
case 1: tipo_conteggio = "Automatico"; break;
|
||||
case 2: tipo_conteggio = "Manuale"; break;
|
||||
case 3: tipo_conteggio = "Scarto"; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
operatore = riga.mid(81,40);
|
||||
operatore = riga.mid(81,40); }
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
bool found = false;
|
||||
@ -239,7 +244,7 @@ void TAcquisizione_lavanderie_app::elabora_file(const TString& file, bool new_fi
|
||||
KEY k = yesnocancel_box(TR("ATTENZIONE: il documento che si sta importando esiste già! Si desidera continuare?\n"
|
||||
"Premendo SI il documento verrà sovracsritto;\n"
|
||||
"Premendo NO le quantità verranno sommate a quelle esistenti\n"
|
||||
"Premendo CANCEL il file verrà ignorato"));
|
||||
"Premendo ANNULLA il file verrà ignorato"));
|
||||
switch (k)
|
||||
{
|
||||
case K_YES: sovrascrivi = true; break;
|
||||
@ -289,8 +294,16 @@ void TAcquisizione_lavanderie_app::elabora_file(const TString& file, bool new_fi
|
||||
}
|
||||
new_file = false;
|
||||
}
|
||||
ca.destroy();
|
||||
deleted_docs.destroy();
|
||||
if (ca.empty())
|
||||
{
|
||||
warning_box(TR("ATTENZIONE: il file importato non ha generato nessun documento; controllare che il tracciato record sia coerente"));
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
ca.destroy();
|
||||
deleted_docs.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
//TRANSFER: metodo che scorre i campi nome e, se sono pieni, richiama il metodo
|
||||
|
Loading…
x
Reference in New Issue
Block a user