Patch level : 10.0 patch 40?

Files correlati     : lv2
Ricompilazione Demo : [ ]
Commento            :
Aggiunto il log che elenca i documenti non evasi perchè mancava la data di prevista consegna


git-svn-id: svn://10.65.10.50/trunk@19176 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca83 2009-07-31 14:12:14 +00:00
parent d02275dca3
commit c1db794940

View File

@ -1,5 +1,7 @@
#include <automask.h>
#include <progind.h>
#include <reputils.h>
#include <reprint.h>
#include "lvlib.h"
#include "../ve/velib.h"
@ -706,7 +708,9 @@ bool TGenera_documenti_app::transfer()
TString4 tpdoc;
TString4 statoi;
TString4 statof;
bool err;
// bool err;
TLog_report *rep = new TLog_report("Documenti non evasi");
numerazione_drit(0, codnum, tpdoc, statoi, statof);
@ -760,11 +764,24 @@ bool TGenera_documenti_app::transfer()
query << "TO DTCONS=" << adatacons << "\n";
TISAM_recordset plan(query);
plan.move_first();
crea_documento(plan);
if (!plan.move_first())
{
TString str;
str << "Il documento " << docritiri.get(DOC_CODNUM) << ' ' << docritiri.get(DOC_TIPODOC) << " del cliente "
<< docritiri.get(DOC_CODCF) << " non è stato evaso (manca data di prevista consegna)";
rep->log(0, str);
}
else
crea_documento(plan);
}
TReport_book buc;
buc.add(*rep);
if (buc.pages() > 0)
buc.preview();
else
message_box(TR("Generazione terminata"));
return true;
}
void TGenera_documenti_app::main_loop()