Patch level : 10.0 patch 520
Files correlati : lv2 Ricompilazione Demo : [ ] Commento : la generazione dei buoni di prelievo non mi dice quanti ne ha generati git-svn-id: svn://10.65.10.50/trunk@19638 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4fa67a5fc1
commit
3be485524e
@ -51,7 +51,7 @@ class TGenera_documenti_app : public TSkeleton_application
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
//Metodi per la generazione dei documenti
|
//Metodi per la generazione dei documenti
|
||||||
bool crea_documento(const TISAM_recordset& plan, TLog_report& rep);
|
bool crea_documento(const TISAM_recordset& plan, TLog_report& rep, int numdocgen);
|
||||||
void crea_riga(const TString& codart, const char modpas, const int tplis, const bool tmp, const bool prinbo,TDocumento& doc, TLog_report& rep);
|
void crea_riga(const TString& codart, const char modpas, const int tplis, const bool tmp, const bool prinbo,TDocumento& doc, TLog_report& rep);
|
||||||
//Metodi per il recupero di codnum, tpdoc, stato
|
//Metodi per il recupero di codnum, tpdoc, stato
|
||||||
bool numerazione_ddt(TString& codnum, TString& tpdoc, TString& statoi, TString& statof) const;
|
bool numerazione_ddt(TString& codnum, TString& tpdoc, TString& statoi, TString& statof) const;
|
||||||
@ -116,7 +116,7 @@ bool TGenera_documenti_app::destroy()
|
|||||||
///////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
|
|
||||||
//CREA_DOCUMENTO: metodo che crea un nuovo documento di trasporto dai dati salvati
|
//CREA_DOCUMENTO: metodo che crea un nuovo documento di trasporto dai dati salvati
|
||||||
bool TGenera_documenti_app::crea_documento(const TISAM_recordset& plan, TLog_report& rep)
|
bool TGenera_documenti_app::crea_documento(const TISAM_recordset& plan, TLog_report& rep, int numdocgen)
|
||||||
{
|
{
|
||||||
//recupero i dati di interesse dalla maschera
|
//recupero i dati di interesse dalla maschera
|
||||||
const TDate datagen(TODAY);
|
const TDate datagen(TODAY);
|
||||||
@ -209,7 +209,10 @@ bool TGenera_documenti_app::crea_documento(const TISAM_recordset& plan, TLog_rep
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (doc.rows() > 0)
|
if (doc.rows() > 0)
|
||||||
|
{
|
||||||
err = doc.rewrite();
|
err = doc.rewrite();
|
||||||
|
++numdocgen;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
doc.remove();
|
doc.remove();
|
||||||
|
|
||||||
@ -744,6 +747,8 @@ bool TGenera_documenti_app::transfer()
|
|||||||
TString4 statof;
|
TString4 statof;
|
||||||
numerazione_drit(0, codnum, tpdoc, statoi, statof);
|
numerazione_drit(0, codnum, tpdoc, statoi, statof);
|
||||||
|
|
||||||
|
int numdocgen = 0;
|
||||||
|
|
||||||
for (dadata; dadata <= adata; ++dadata)
|
for (dadata; dadata <= adata; ++dadata)
|
||||||
{
|
{
|
||||||
//per ogni data cerco i documenti e per ogni documento cerco i dati del passaggio
|
//per ogni data cerco i documenti e per ogni documento cerco i dati del passaggio
|
||||||
@ -791,7 +796,7 @@ bool TGenera_documenti_app::transfer()
|
|||||||
{
|
{
|
||||||
_quantita.destroy();
|
_quantita.destroy();
|
||||||
_quantita_ritirata.destroy();
|
_quantita_ritirata.destroy();
|
||||||
crea_documento(plan, rep);
|
crea_documento(plan, rep, numdocgen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -805,8 +810,17 @@ bool TGenera_documenti_app::transfer()
|
|||||||
if (buc.pages() > 0)
|
if (buc.pages() > 0)
|
||||||
buc.preview();
|
buc.preview();
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
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"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user