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);
|
TSheet_field& sheet = _msk->sfield(F_SHEET_NAME);
|
||||||
sheet.set_auto_append();
|
sheet.set_auto_append();
|
||||||
|
|
||||||
|
open_files(LF_DOC, LF_RIGHEDOC);
|
||||||
|
|
||||||
return TSkeleton_application::create();
|
return TSkeleton_application::create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,10 +211,12 @@ void TAcquisizione_lavanderie_app::elabora_file(const TString& file, bool new_fi
|
|||||||
else if (riga.len() == 121) // ->SKEMA
|
else if (riga.len() == 121) // ->SKEMA
|
||||||
{
|
{
|
||||||
//leggo i campi dalla riga del file
|
//leggo i campi dalla riga del file
|
||||||
datadoc.set_year(atoi(riga.mid(0,4)));
|
const int y = atoi(riga.mid(0,4));
|
||||||
datadoc.set_month(atoi(riga.mid(4,2)));
|
const int m = atoi(riga.mid(4,2));
|
||||||
datadoc.set_day(atoi(riga.mid(6,2)));
|
const int d = atoi(riga.mid(6,2));
|
||||||
|
if (d > 0 && d <= 31 && m > 0 && m <= 12 && y > 2000)
|
||||||
|
{
|
||||||
|
datadoc = TDate(d, m, y);
|
||||||
codart = riga.mid(8,20);
|
codart = riga.mid(8,20);
|
||||||
codcf = atol(riga.mid(28,20));
|
codcf = atol(riga.mid(28,20));
|
||||||
qta = atoi(riga.mid(48,11));
|
qta = atoi(riga.mid(48,11));
|
||||||
@ -225,8 +229,9 @@ void TAcquisizione_lavanderie_app::elabora_file(const TString& file, bool new_fi
|
|||||||
case 3: tipo_conteggio = "Scarto"; break;
|
case 3: tipo_conteggio = "Scarto"; break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
operatore = riga.mid(81,40); }
|
||||||
operatore = riga.mid(81,40);
|
else
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool found = false;
|
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"
|
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 SI il documento verrà sovracsritto;\n"
|
||||||
"Premendo NO le quantità verranno sommate a quelle esistenti\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)
|
switch (k)
|
||||||
{
|
{
|
||||||
case K_YES: sovrascrivi = true; break;
|
case K_YES: sovrascrivi = true; break;
|
||||||
@ -289,9 +294,17 @@ void TAcquisizione_lavanderie_app::elabora_file(const TString& file, bool new_fi
|
|||||||
}
|
}
|
||||||
new_file = false;
|
new_file = false;
|
||||||
}
|
}
|
||||||
|
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();
|
ca.destroy();
|
||||||
deleted_docs.destroy();
|
deleted_docs.destroy();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//TRANSFER: metodo che scorre i campi nome e, se sono pieni, richiama il metodo
|
//TRANSFER: metodo che scorre i campi nome e, se sono pieni, richiama il metodo
|
||||||
//ELABORA_FILE(), che effettivamente fa l'elaborazione
|
//ELABORA_FILE(), che effettivamente fa l'elaborazione
|
||||||
|
Loading…
x
Reference in New Issue
Block a user