Patch level : 10.0 patch 601

Files correlati     : lv2
Ricompilazione Demo : [ ]
Commento            :
Evitato errore fatale nel caso in cui non vengano generati documenti


git-svn-id: svn://10.65.10.50/trunk@20019 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca83 2010-01-29 12:14:49 +00:00
parent c4abf9b089
commit d5d9d7d47f

View File

@ -946,7 +946,7 @@ bool TGenera_documenti_app::transfer()
} }
} }
if (_msk->get_bool(F_STAMPA)) if (_msk->get_bool(F_STAMPA) && documenti.items() > 0)
{ {
TFilename tmp; TFilename tmp;
tmp.temp("", "ini"); tmp.temp("", "ini");
@ -985,6 +985,10 @@ bool TGenera_documenti_app::transfer()
} }
} }
if (documenti.items() == 0)
warning_box(TR("Non è stato possibile generare nessun documento; probabilmente i documenti richiesti esistono già"));
else
{
if (adata < TODAY && _msk->get_int(F_TPGEN) == 0) if (adata < TODAY && _msk->get_int(F_TPGEN) == 0)
warning_box(TR("Non è stato possibile generare documenti con data prevista consegna nel passato")); warning_box(TR("Non è stato possibile generare documenti con data prevista consegna nel passato"));
else else
@ -1005,6 +1009,7 @@ bool TGenera_documenti_app::transfer()
message_box(TR("Generazione terminata")); message_box(TR("Generazione terminata"));
} }
} }
}
return true; return true;
} }