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:
parent
c4abf9b089
commit
d5d9d7d47f
@ -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");
|
||||||
@ -954,7 +954,7 @@ bool TGenera_documenti_app::transfer()
|
|||||||
// Ensure that the ofstream is well closed before ve1 call
|
// Ensure that the ofstream is well closed before ve1 call
|
||||||
if (tmp.full()) // dummy test
|
if (tmp.full()) // dummy test
|
||||||
{
|
{
|
||||||
TDoc_key kd(documenti.get_hashobj()->key());
|
TDoc_key kd(documenti.get_hashobj()->key());
|
||||||
TString16 chiavedoc; // Parte della chiave comune a tutti i documenti
|
TString16 chiavedoc; // Parte della chiave comune a tutti i documenti
|
||||||
chiavedoc << kd.provv() << '|' << kd.anno() << '|' << kd.codnum() << '|';
|
chiavedoc << kd.provv() << '|' << kd.anno() << '|' << kd.codnum() << '|';
|
||||||
|
|
||||||
@ -985,24 +985,29 @@ bool TGenera_documenti_app::transfer()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (adata < TODAY && _msk->get_int(F_TPGEN) == 0)
|
if (documenti.items() == 0)
|
||||||
warning_box(TR("Non è stato possibile generare documenti con data prevista consegna nel passato"));
|
warning_box(TR("Non è stato possibile generare nessun documento; probabilmente i documenti richiesti esistono già"));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TReport_book buc;
|
if (adata < TODAY && _msk->get_int(F_TPGEN) == 0)
|
||||||
buc.add(rep);
|
warning_box(TR("Non è stato possibile generare documenti con data prevista consegna nel passato"));
|
||||||
if (buc.pages() > 0)
|
|
||||||
buc.preview();
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TString str;
|
TReport_book buc;
|
||||||
if (numdocgen > 1)
|
buc.add(rep);
|
||||||
str << "Sono stati generati " << numdocgen << " buoni.";
|
if (buc.pages() > 0)
|
||||||
|
buc.preview();
|
||||||
else
|
else
|
||||||
str << "E' stato generato " << numdocgen << " buono.";
|
{
|
||||||
message_box(str);
|
TString str;
|
||||||
|
if (numdocgen > 1)
|
||||||
|
str << "Sono stati generati " << numdocgen << " buoni.";
|
||||||
|
else
|
||||||
|
str << "E' stato generato " << numdocgen << " buono.";
|
||||||
|
message_box(str);
|
||||||
|
|
||||||
message_box(TR("Generazione terminata"));
|
message_box(TR("Generazione terminata"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user