Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/branches/R_10_00@21628 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									b1787f3ee4
								
							
						
					
					
						commit
						dab692b17a
					
				@ -43,10 +43,15 @@ bool TSost_condpag_msk::elabora_documenti()
 | 
			
		||||
  const real     totdoc = get_real(F_TOTDOC);
 | 
			
		||||
 | 
			
		||||
  TString query;
 | 
			
		||||
  query << "USE DOC SELECT (CODNUM=\"" << codnum << "\")&&(TIPODOC=\"" << tipodoc << "\")&&(STATO=\"" << stato << "\")&&(TIPOCF=\"C\")&&(BETWEEN(CODCF," << dacodcf << "," << acodcf << "))&&(BETWEEN(DATADOC,#DADATA,#ADATA))";
 | 
			
		||||
  if(totdoc > ZERO)
 | 
			
		||||
  query << "USE DOC SELECT (CODNUM=\"" << codnum << "\")"
 | 
			
		||||
        << "&&(TIPODOC=\"" << tipodoc << "\")"
 | 
			
		||||
        << "&&(STATO=\"" << stato << "\")"
 | 
			
		||||
        << "&&(TIPOCF=\"C\")"
 | 
			
		||||
        << "&&(BETWEEN(CODCF," << dacodcf << "," << acodcf << "))"
 | 
			
		||||
        << "&&(BETWEEN(DATADOC,#DADATA,#ADATA))\n"
 | 
			
		||||
  /*if(totdoc > ZERO)
 | 
			
		||||
    query << "&&(G1:TOTDOC<=" << totdoc << ')';
 | 
			
		||||
  query << "\n"
 | 
			
		||||
  query << "\n"*/
 | 
			
		||||
        << "FROM PROVV=\"D\" ANNO=" << daanno << "\n"
 | 
			
		||||
        << "TO PROVV=\"D\" ANNO=" << aanno;
 | 
			
		||||
 | 
			
		||||
@ -58,6 +63,7 @@ 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);
 | 
			
		||||
 | 
			
		||||
@ -70,9 +76,11 @@ bool TSost_condpag_msk::elabora_documenti()
 | 
			
		||||
    TRectype& rec = doc.cursor()->curr();
 | 
			
		||||
 | 
			
		||||
    const TString4 codpagdoc = rec.get(DOC_CODPAG);
 | 
			
		||||
    const TString4 tipopag = cache().get("%CPG", codpagdoc, "S4");
 | 
			
		||||
    const TString4 tipopag   = cache().get("%CPG", codpagdoc, "S4");
 | 
			
		||||
    const real     totdocd   = rec.get_real("G1:TOTDOC");
 | 
			
		||||
 | 
			
		||||
    if (codpagdoc != codpag && tipopag == "3") //tipopag = 3-> riba
 | 
			
		||||
 | 
			
		||||
    if (totdocd <= totdocm && codpagdoc != codpag && tipopag == "3" ) //tipopag = 3-> riba
 | 
			
		||||
    {
 | 
			
		||||
      rec.put(DOC_CODPAG, codpag);
 | 
			
		||||
 | 
			
		||||
@ -80,7 +88,7 @@ bool TSost_condpag_msk::elabora_documenti()
 | 
			
		||||
      if (abi.full())
 | 
			
		||||
      {
 | 
			
		||||
        const TString8 cab  = get(F_CAB);
 | 
			
		||||
        const TString prog = get(F_PROG);
 | 
			
		||||
        const TString prog  = get(F_PROG);
 | 
			
		||||
 | 
			
		||||
        rec.put(DOC_CODABIP, abi);
 | 
			
		||||
        rec.put(DOC_CODCABP, cab);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user