diff --git a/src/tf/tf0100.cpp b/src/tf/tf0100.cpp index 0ef19d313..c2460bacf 100644 --- a/src/tf/tf0100.cpp +++ b/src/tf/tf0100.cpp @@ -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;