Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@20512 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									a8fb67dd68
								
							
						
					
					
						commit
						ae42a8ea83
					
				@ -106,6 +106,7 @@ long TImporta_spese_app::genera_movcg()
 | 
				
			|||||||
  mov.put(MOV_NUMREG,   numreg);
 | 
					  mov.put(MOV_NUMREG,   numreg);
 | 
				
			||||||
  mov.put(MOV_DATACOMP, datareg);
 | 
					  mov.put(MOV_DATACOMP, datareg);
 | 
				
			||||||
  mov.put(MOV_DATAREG,  datareg);
 | 
					  mov.put(MOV_DATAREG,  datareg);
 | 
				
			||||||
 | 
					  mov.put(MOV_CODCAUS,  _msk->get(F_CODCAU));
 | 
				
			||||||
  mov.write();
 | 
					  mov.write();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return numreg;
 | 
					  return numreg;
 | 
				
			||||||
@ -232,6 +233,9 @@ bool TImporta_spese_app::transfer()
 | 
				
			|||||||
          chiudi_movimento(configfile, tot_doc, data, numreg, righean);
 | 
					          chiudi_movimento(configfile, tot_doc, data, numreg, righean);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        numreg = genera_movcg();
 | 
					        numreg = genera_movcg();
 | 
				
			||||||
 | 
					        TLocalisamfile mov(LF_MOV);
 | 
				
			||||||
 | 
					        mov.put(MOV_NUMREG,   numreg);
 | 
				
			||||||
 | 
					        mov.remove();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				TFilename filename(nomeini);
 | 
									TFilename filename(nomeini);
 | 
				
			||||||
				filename.fremove();
 | 
									filename.fremove();
 | 
				
			||||||
@ -258,7 +262,7 @@ bool TImporta_spese_app::transfer()
 | 
				
			|||||||
      tot_doc -= importo;
 | 
					      tot_doc -= importo;
 | 
				
			||||||
		  
 | 
							  
 | 
				
			||||||
	    TString8 paragraph;
 | 
						    TString8 paragraph;
 | 
				
			||||||
      paragraph.format("%d,%d",LF_RMOV,nriga++);
 | 
					      paragraph.format("%d,%d", LF_RMOV, nriga++);
 | 
				
			||||||
      configfile.set_paragraph(paragraph);
 | 
					      configfile.set_paragraph(paragraph);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      configfile.set(RMV_IMPORTO, importo.valore().string());
 | 
					      configfile.set(RMV_IMPORTO, importo.valore().string());
 | 
				
			||||||
 | 
				
			|||||||
@ -202,6 +202,7 @@ long TImporta_fat_for_app::genera_movcg()
 | 
				
			|||||||
  mov.put(MOV_NUMREG,   numreg);
 | 
					  mov.put(MOV_NUMREG,   numreg);
 | 
				
			||||||
  mov.put(MOV_DATACOMP, _msk->get_date(F_DATAREG));
 | 
					  mov.put(MOV_DATACOMP, _msk->get_date(F_DATAREG));
 | 
				
			||||||
  mov.put(MOV_DATAREG,  _msk->get_date(F_DATAREG));
 | 
					  mov.put(MOV_DATAREG,  _msk->get_date(F_DATAREG));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  mov.write();
 | 
					  mov.write();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return numreg;
 | 
					  return numreg;
 | 
				
			||||||
@ -374,10 +375,16 @@ void TImporta_fat_for_app::importa_fat(TAssoc_array& righecg, TCommessa_string&
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      real rimposta = imp * iva / CENTO;  rimposta.round(2);
 | 
					      real rimposta = imp * iva / CENTO;  rimposta.round(2);
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
 | 
					      TCommessa comm(idlav);
 | 
				
			||||||
 | 
					      TCommessa_string cmsstr = comm.cmsstr();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      configfile->set(RMI_ANNOES,     anno);
 | 
					      configfile->set(RMI_ANNOES,     anno);
 | 
				
			||||||
      configfile->set(RMI_IMPONIBILE, importo.valore().string());
 | 
					      configfile->set(RMI_IMPONIBILE, importo.valore().string());
 | 
				
			||||||
      configfile->set(RMI_CODIVA,     codiva);
 | 
					      configfile->set(RMI_CODIVA,     codiva);
 | 
				
			||||||
      configfile->set(RMI_IMPOSTA,    rimposta.string());      
 | 
					      configfile->set(RMI_IMPOSTA,    rimposta.string());
 | 
				
			||||||
 | 
					      configfile->set(RMI_GRUPPO,     cmsstr.gruppo());
 | 
				
			||||||
 | 
					      configfile->set(RMI_CONTO,      cmsstr.conto());
 | 
				
			||||||
 | 
					      configfile->set(RMI_SOTTOCONTO, cmsstr.sotco());
 | 
				
			||||||
      configfile->set(RMI_TIPOATT,    1);
 | 
					      configfile->set(RMI_TIPOATT,    1);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@ -398,6 +405,9 @@ void TImporta_fat_for_app::importa_fat(TAssoc_array& righecg, TCommessa_string&
 | 
				
			|||||||
    configfile->set(RMI_IMPONIBILE, importo.valore().string());
 | 
					    configfile->set(RMI_IMPONIBILE, importo.valore().string());
 | 
				
			||||||
    configfile->set(RMI_CODIVA,     codiva);
 | 
					    configfile->set(RMI_CODIVA,     codiva);
 | 
				
			||||||
    configfile->set(RMI_IMPOSTA,    rimposta.string());
 | 
					    configfile->set(RMI_IMPOSTA,    rimposta.string());
 | 
				
			||||||
 | 
					    configfile->set(RMI_GRUPPO,     kmax.gruppo());
 | 
				
			||||||
 | 
					    configfile->set(RMI_CONTO,      kmax.conto());
 | 
				
			||||||
 | 
					    configfile->set(RMI_SOTTOCONTO, kmax.sotco());
 | 
				
			||||||
    configfile->set(RMI_TIPOATT,    1);
 | 
					    configfile->set(RMI_TIPOATT,    1);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -444,10 +454,15 @@ void TImporta_fat_for_app::importa_fat_ric(TAssoc_array& righecg, TCommessa_stri
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  TImporto importo(causale.get("SEZIONE")[0], totdoc);  
 | 
					  TImporto importo(causale.get("SEZIONE")[0], totdoc);  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  configfile->set(RMV_ANNOES,  anno);
 | 
					  configfile->set(RMV_ANNOES,     anno);
 | 
				
			||||||
  configfile->set(RMV_SEZIONE, causale.get("SEZIONE"));
 | 
					  configfile->set(RMV_SEZIONE,    causale.get("SEZIONE"));
 | 
				
			||||||
  configfile->set(RMV_IMPORTO, importo.valore().string());  
 | 
					  configfile->set(RMV_IMPORTO,    importo.valore().string());  
 | 
				
			||||||
  configfile->set(RMV_TIPOC,   causale.get("TIPOCF"));
 | 
					  configfile->set(RMV_TIPOC,      causale.get("TIPOCF"));
 | 
				
			||||||
 | 
					  configfile->set(RMV_GRUPPO,     causale.get("GRUPPO"));
 | 
				
			||||||
 | 
					  configfile->set(RMV_CONTO,      causale.get("CONTO"));
 | 
				
			||||||
 | 
					  configfile->set(RMV_SOTTOCONTO, _msk->get_long(F_CODFOR));
 | 
				
			||||||
 | 
					  configfile->set(RMV_TIPOC,      "F");
 | 
				
			||||||
 | 
					  configfile->set(RMV_ROWTYPE,    "T");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  key.add(2,1);
 | 
					  key.add(2,1);
 | 
				
			||||||
  const TRectype& causale2 = cache().get(LF_RCAUSALI, key);
 | 
					  const TRectype& causale2 = cache().get(LF_RCAUSALI, key);
 | 
				
			||||||
@ -500,7 +515,11 @@ void TImporta_fat_for_app::importa_fat_ric(TAssoc_array& righecg, TCommessa_stri
 | 
				
			|||||||
//GESTIONE_INI: metodo che si occupa di generare il file ini e di importarlo effettivamente
 | 
					//GESTIONE_INI: metodo che si occupa di generare il file ini e di importarlo effettivamente
 | 
				
			||||||
void TImporta_fat_for_app::gestione_ini(TAssoc_array& righe, TCommessa_string& kmax, const real& quad, const long numregcg)
 | 
					void TImporta_fat_for_app::gestione_ini(TAssoc_array& righe, TCommessa_string& kmax, const real& quad, const long numregcg)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	TConfig* configfile = NULL;
 | 
						TLocalisamfile mov(LF_MOV);
 | 
				
			||||||
 | 
					  mov.put(MOV_NUMREG, numregcg);
 | 
				
			||||||
 | 
					  mov.remove();
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  TConfig* configfile = NULL;
 | 
				
			||||||
  TFilename tmpdir;  tmpdir.tempdir();
 | 
					  TFilename tmpdir;  tmpdir.tempdir();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  TFilename filename = tmpdir;  
 | 
					  TFilename filename = tmpdir;  
 | 
				
			||||||
@ -509,7 +528,7 @@ void TImporta_fat_for_app::gestione_ini(TAssoc_array& righe, TCommessa_string& k
 | 
				
			|||||||
	configfile = new TConfig(filename, "Transaction");  //setto il paragrafo [Transaction] del file ini 
 | 
						configfile = new TConfig(filename, "Transaction");  //setto il paragrafo [Transaction] del file ini 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	configfile->set_paragraph("Transaction");
 | 
						configfile->set_paragraph("Transaction");
 | 
				
			||||||
	configfile->set("Action","MODIFY");
 | 
						configfile->set("Action","INSERT");
 | 
				
			||||||
	configfile->set("Mode","AUTO");
 | 
						configfile->set("Mode","AUTO");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const int tipofat = _msk->get_int(F_TIPOFAT);
 | 
					  const int tipofat = _msk->get_int(F_TIPOFAT);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user