Patch level : 10.0 884
Files correlati : lv4.exe Ricompilazione Demo : [ ] Commento : Impostato il numero partita al mese nell importazione fatture (CHIMA) git-svn-id: svn://10.65.10.50/branches/R_10_00@21438 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
29ec2137f6
commit
a393284f49
@ -67,11 +67,14 @@ TLaundry_recordset::TLaundry_recordset(const int rec_lenght)
|
||||
class TConti_cache : public TCache
|
||||
{
|
||||
TLog_report * _log;
|
||||
bool _errors;
|
||||
|
||||
protected:
|
||||
virtual TObject* key2obj(const char* key);
|
||||
public:
|
||||
const bool errors() const { return _errors; }
|
||||
const TBill& decodifica_conti(const long mastro, const long conto);
|
||||
TConti_cache(TLog_report * log) : _log(log) {}
|
||||
TConti_cache(TLog_report * log) : _log(log), _errors(false) {}
|
||||
};
|
||||
|
||||
//KEY2OBJ: ridefinisco il metodo virtuale key2obj in modo che mi restituisca quello di cui ho bisogno
|
||||
@ -88,6 +91,7 @@ TObject* TConti_cache::key2obj(const char* key)
|
||||
|
||||
mastro = mastro.left(6);
|
||||
_log->log(2, format(FR("Mastro %6s Conto %6s assente"), (const char *) mastro, (const char *) conto));
|
||||
_errors = true;
|
||||
return new TBill;
|
||||
}
|
||||
|
||||
@ -111,6 +115,7 @@ class TDecodifica_codici : public TObject
|
||||
TAssoc_array _tab;
|
||||
TConti_cache _conti;
|
||||
TLog_report * _log;
|
||||
bool _errors;
|
||||
|
||||
protected:
|
||||
void riempi_array();
|
||||
@ -123,6 +128,7 @@ public:
|
||||
const TString& decodifica_regiva(const int regiva_cog);
|
||||
const TString& decodifica_valute(const int val_cog);
|
||||
const TBill& decodifica_conto(const long mastro, const long conto);
|
||||
const bool errors() const { return _errors || _conti.errors(); }
|
||||
|
||||
TDecodifica_codici(TLog_report * log);
|
||||
};
|
||||
@ -175,6 +181,7 @@ const TString& TDecodifica_codici::decodifica(const char* tabella, const int cod
|
||||
return *data;
|
||||
}
|
||||
_log->log(2, format(FR("Tabella %s codice %ld assente"), tabella, codice));
|
||||
_errors = true;
|
||||
return EMPTY_STRING;
|
||||
}
|
||||
|
||||
@ -215,7 +222,7 @@ const TBill& TDecodifica_codici::decodifica_conto(const long mastro, const long
|
||||
}
|
||||
|
||||
//costruttore
|
||||
TDecodifica_codici::TDecodifica_codici(TLog_report * log) : _log(log), _conti(log)
|
||||
TDecodifica_codici::TDecodifica_codici(TLog_report * log) : _log(log), _conti(log), _errors(false)
|
||||
{}
|
||||
|
||||
////////////////////////////////
|
||||
@ -596,6 +603,10 @@ void TImporta_fat_app::transfer(const TFilename& file)
|
||||
book.add(*_log);
|
||||
book.print_or_preview();
|
||||
_log->reset();
|
||||
bool ok = true;
|
||||
if (_codici->errors())
|
||||
ok = yesno_box("Sono stati rilevati errori, si desidera proseguire con l'importazione");
|
||||
if (ok)
|
||||
elabora_file(tmpdir);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user