Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
Corretta la query  - il filtro su TOTDOC faceva un confronto tra stringhe e non tra numeri


git-svn-id: svn://10.65.10.50/branches/R_10_00@21629 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca83 2011-02-11 10:09:33 +00:00
parent dab692b17a
commit cf0e2fb56d

View File

@ -48,10 +48,10 @@ bool TSost_condpag_msk::elabora_documenti()
<< "&&(STATO=\"" << stato << "\")"
<< "&&(TIPOCF=\"C\")"
<< "&&(BETWEEN(CODCF," << dacodcf << "," << acodcf << "))"
<< "&&(BETWEEN(DATADOC,#DADATA,#ADATA))\n"
/*if(totdoc > ZERO)
query << "&&(G1:TOTDOC<=" << totdoc << ')';
query << "\n"*/
<< "&&(BETWEEN(DATADOC,#DADATA,#ADATA))";
if(totdoc > ZERO)
query << "&&(STR(G1:TOTDOC<=" << totdoc << "))";
query << "\n"
<< "FROM PROVV=\"D\" ANNO=" << daanno << "\n"
<< "TO PROVV=\"D\" ANNO=" << aanno;
@ -63,7 +63,6 @@ bool TSost_condpag_msk::elabora_documenti()
TLocalisamfile& documenti = doc.cursor()->file();
const TString4 codpag = get(F_CODPAG);
const real totdocm = get_real(F_TOTDOC);
TProgind pi(doc.items(), TR("Elaborazione documenti in corso..."), true, true);
@ -77,10 +76,8 @@ bool TSost_condpag_msk::elabora_documenti()
const TString4 codpagdoc = rec.get(DOC_CODPAG);
const TString4 tipopag = cache().get("%CPG", codpagdoc, "S4");
const real totdocd = rec.get_real("G1:TOTDOC");
if (totdocd <= totdocm && codpagdoc != codpag && tipopag == "3" ) //tipopag = 3-> riba
if (codpagdoc != codpag && tipopag == "3" ) //tipopag = 3-> riba
{
rec.put(DOC_CODPAG, codpag);