From 3be485524e8a20d680858ec84c59acb7ff0cdbe9 Mon Sep 17 00:00:00 2001 From: luca83 Date: Mon, 16 Nov 2009 16:58:26 +0000 Subject: [PATCH] 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 --- lv/lv2400.cpp | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/lv/lv2400.cpp b/lv/lv2400.cpp index 25e73e013..2bef43cc2 100755 --- a/lv/lv2400.cpp +++ b/lv/lv2400.cpp @@ -51,7 +51,7 @@ class TGenera_documenti_app : public TSkeleton_application private: //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); //Metodi per il recupero di codnum, tpdoc, stato 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 -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 const TDate datagen(TODAY); @@ -209,7 +209,10 @@ bool TGenera_documenti_app::crea_documento(const TISAM_recordset& plan, TLog_rep } if (doc.rows() > 0) + { err = doc.rewrite(); + ++numdocgen; + } else doc.remove(); @@ -742,7 +745,9 @@ bool TGenera_documenti_app::transfer() TString4 tpdoc; TString4 statoi; TString4 statof; - numerazione_drit(0, codnum, tpdoc, statoi, statof); + numerazione_drit(0, codnum, tpdoc, statoi, statof); + + int numdocgen = 0; for (dadata; dadata <= adata; ++dadata) { @@ -791,7 +796,7 @@ bool TGenera_documenti_app::transfer() { _quantita.destroy(); _quantita_ritirata.destroy(); - crea_documento(plan, rep); + crea_documento(plan, rep, numdocgen); } } } @@ -805,7 +810,16 @@ bool TGenera_documenti_app::transfer() if (buc.pages() > 0) buc.preview(); else - message_box(TR("Generazione terminata")); + { + 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")); + } } return true;