Patch level : 12.0

Files correlati     :

Commento:
Modifiche programma Archiviazione sostitutiva
This commit is contained in:
smen 2022-10-11 17:49:43 +02:00
parent 28e6e44c6e
commit 3fb180ea24
3 changed files with 38 additions and 24 deletions

View File

@ -83,11 +83,13 @@ int TEstrai_mask::estrai()
if (escluso)
int here = 0;
if (numdoc.empty())
if (numdoc.blank())
numdoc = mov.get_string(MOV_NUMDOC);
// Se definitivo controllo il flag di stampato REGST
if ((flagpro || stampato) && numdoc.full() && iva == tipo)
{
if (numdoc.blank())
int here = 0;
// Creo il movimento da inserire e lo inserisco
_estrazione->add_mov(new TMovimento_estr(mov, tipo, escluso));
++count;
@ -241,21 +243,24 @@ bool TMonitor_mask::save_conf(TMask& config_mask)
config_mask.close();
f9_app().edit_wa(old_codsoc);
TLocalisamfile tabmod(LF_TABMOD);
tabmod.put("MOD", "F9");
tabmod.put("COD", "SQL");
tabmod.put("CODTAB", "VERSION");
tabmod.put("S0", real(new_lvl));
if (tabmod.write_rewrite() == NOERR)
if (new_lvl.full() && (new_lvl != old_lvl))
{
config_mask.set(CF_LVLOLD, new_lvl);
config_mask.set(CF_LVLNEW, "");
message_box("Versione impostata!");
TLocalisamfile tabmod(LF_TABMOD);
tabmod.put("MOD", "F9");
tabmod.put("COD", "SQL");
tabmod.put("CODTAB", "VERSION");
tabmod.put("S0", real(new_lvl));
if (tabmod.write_rewrite() == NOERR)
{
config_mask.set(CF_LVLOLD, new_lvl);
config_mask.set(CF_LVLNEW, "");
message_box("Versione impostata!");
}
else
return error_box("Impossibile aggiornare il livello degli archivi");
}
else
return error_box("Impossibile aggiornare il livello degli archivi");
return true;
return true;
}
void TMonitor_mask::controllo_errori() const
@ -290,10 +295,12 @@ void TMonitor_mask::controllo_errori() const
void TMonitor_mask::delete_estr_fld(const TString& idestr)
{
TFilename dir(F9CONF.get_addr_doc_loc());
dir << SLASH << F9CONF.get_ambiente() << SLASH << idestr << SLASH << "*";
remove_files(dir, true);
if (dexist(dir))
{
dir << SLASH << F9CONF.get_ambiente() << SLASH << idestr << SLASH << "*";
remove_files(dir, true);
}
}
void TMonitor_mask::delete_pack(const bool all) const
@ -343,8 +350,11 @@ void TMonitor_mask::delete_pack(const bool all) const
return;
}
fp_db().sq_commit();
// DA VEDERE
delete_estr_fld(id_estr);
if (!all)
if (!all)
break;
}
}
@ -710,7 +720,7 @@ void TControllo_mask::fill_fppro_sheet() const
"ORDER BY " << order << " " << (_verso == 'A' ? "ASC" : "DESC") << "\n";
fp_db().sq_set_exec(query, false);
for (bool ok = fp_db().sq_first(); ok; ok = fp_db().sq_next())
for (bool ok = fp_db().sq_next(); ok; ok = fp_db().sq_next())
{
const int row = sf.set_row_cell(F_FTIPODOC, fp_db().sq_get("TIPODOC"));

View File

@ -546,9 +546,11 @@ public:
bool mov2listann(const TString& numreg, TString_array & list_annessi);
bool mov2listann_vect(const long numreg, TArray & list_annessi);
static TString get_full_path_file_cartaceo(const TString& filename)
static TString & get_full_path_file_cartaceo(const TString& filename)
{
return TString() << TFilename(F9CONF.get_addr_cart()).slash_terminate() << filename;
TString & s = get_tmp_string();
s << TFilename(F9CONF.get_addr_cart()).slash_terminate() << filename;
return s;
}
TF9_doccart() : _tannessi(LF_F9ANNESSI) { }

View File

@ -151,8 +151,10 @@ TMovimento_estr::TMovimento_estr(TISAM_recordset & mov, TipoIVA tipo, bool escl)
_meseliq = mov.get_int(MOV_MESELIQ);
if (tipo == iva_vendite)
_numdoc = get_numdoc_exp_fp(_numreg);
if (_numdoc.empty())
if (_numdoc.blank())
_numdoc = mov.get_string(MOV_NUMDOCEXT);
if (_numdoc.blank())
_numdoc = mov.get_string(MOV_NUMDOC);
_tot = mov.get_real(MOV_TOTDOC) + mov.get_real(MOV_RITFIS) + mov.get_real(MOV_RITSOC);
_codcf = mov.get_long(MOV_CODCF);
@ -291,7 +293,7 @@ state_fppro TEstrazione::check_fppro(int numreg)
{
TLocalisamfile mov(LF_MOV);
mov.put(MOV_NUMREG, numreg);
if (mov.read() == NOERR && check_causale(mov.get(MOV_CODCAUS)))
if (mov.read() == NOERR && check_causale(mov.get(MOV_CODCAUS), mov.get_date(MOV_DATAREG).year()))
{
// Controllo se ho i riferimenti all'FPPRO e verifico che sia tutto ok
const TString& keys_fppro = mov.get(MOV_KEYFPPRO);