diff --git a/sv/sv2100.cpp b/sv/sv2100.cpp index 63be5e273..f88eeb926 100755 --- a/sv/sv2100.cpp +++ b/sv/sv2100.cpp @@ -135,6 +135,8 @@ void TRicalcolo_stats::calc_stats(const TDate& dfr, const TDate& dto) _agg.update(); } _agg.update(); + if (_agg.empty()) + message_box("Attenzione: l'archivio riepilogativo delle statistiche ora ricalcolato risulta vuoto"); } diff --git a/sv/svlib01.cpp b/sv/svlib01.cpp index 83f18e7bf..3fd48c9f1 100755 --- a/sv/svlib01.cpp +++ b/sv/svlib01.cpp @@ -476,6 +476,12 @@ bool TStats_agg::add(const TRiga_documento& rdoc) return ok; } +bool TStats_agg::empty() +{ + TLocalisamfile stat(LF_SVRIEP); + return stat.empty(); +} + bool TStats_agg::update() { // eliminato perché rompeva a Sandro diff --git a/sv/svlib01.h b/sv/svlib01.h index 3749e64f9..9a817ba2e 100755 --- a/sv/svlib01.h +++ b/sv/svlib01.h @@ -76,7 +76,8 @@ public: bool sub(const TRiga_documento& rdoc); bool add(const TRiga_documento& rdoc); bool update(); - + // restituisce TRUE se l'archivio di riepilogo è vuoto + bool empty(); TFrequenza_statistiche frequency() const { return _frequenza; }