Patch level : 12.0 420

Files correlati     : 
Commento            : 
Programma:
- Ottimizzato l'invio
- Adesso durante il salvataggio finale salva anche i record disabilitati

git-svn-id: svn://10.65.10.50/branches/R_10_00@23941 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
mtollari 2017-07-13 12:41:19 +00:00
parent 4a8623e5d2
commit ebb382403c

View File

@ -736,6 +736,7 @@ bool TTrFa_app::send(TTrFa_mask* msk)
}
ini_set_bool(CONFIG_DITTA, "tf", "FirstExec", false);
}
// Mi carico i miei dati
TSheet_field& sheet = msk->sfield(F_RIGHE);
// Booleano per appendere i record nel db
@ -744,17 +745,9 @@ bool TTrFa_app::send(TTrFa_mask* msk)
* Esporto
***********************************************************************************************/
xvt_sql_begin(_db);
bool ok;
// Testata
ok = tff0100(sheet);
if(ok)
{
// Anagrafica
ok = tff0400(sheet);
if(ok)
// Documenti
ok = tff0700(sheet);
}
// Eseguo l'esportazione
bool ok = tff0100(sheet) && tff0400(sheet) && tff0700(sheet);
if(!ok)
{
@ -1326,9 +1319,6 @@ bool TTrFa_app::setEsportato(TSheet_field& sheet)
{
if(!p.add_status())
return false;
IF_IS_ENABLED(strarr);
TString modificato = strarr->get(_forzata);
if(modificato == "X")
{
@ -1338,7 +1328,11 @@ bool TTrFa_app::setEsportato(TSheet_field& sheet)
else
{
TRectype row = cache().get(LF_MOV, TString(strarr->get(_numero)));
row.put("TFINVIO", "I");
char invio = strarr->get_char(_invio);
if(invio == 'F' || invio == 'X')
invio = 'I';
row.put("TFINVIO", invio);
row.put("TFDATA", TDate(TODAY).string());
ok = row.rewrite(TLocalisamfile(LF_MOV)) == NOERR;
if(!ok) return false;