Merge branch 'R_10_00' of http://10.65.20.33/sirio/CAMPO/campo into R_10_00
This commit is contained in:
		
						commit
						2bb97a4e18
					
				| @ -472,7 +472,7 @@ void TMonitor_mask::delete_pack(const bool all) const | ||||
| void TMonitor_mask::fill() const | ||||
| { | ||||
|   TString query; | ||||
|   query << "SELECT * FROM F9DRD00K WHERE " DRD_CODSOC " = '" << F9CONF.get_ambiente() << "' ORDER BY " << DRD_TIME << " DESC;"; | ||||
|   query << "SELECT * FROM " F9_DRD " WHERE " DRD_CODSOC " = '" << F9CONF.get_ambiente() << "' ORDER BY " << DRD_TIME << " DESC;"; | ||||
|   fp_db().sq_set_exec(query, false); | ||||
| 
 | ||||
|   TSheet_field& sf = sfield(S_ELAB); | ||||
|  | ||||
| @ -538,14 +538,14 @@ TString TEstrazione::next_estr_today(char tipo) const | ||||
| { | ||||
|   char estr[] = { 0,0,0,0,0,0,0,0,0 }; | ||||
|   TString query; | ||||
|   query << "SELECT TOP 1 " DRD_ID_EST " AS IDESTR\n" | ||||
|   query << "SELECT TOP 1 SUBSTRING(" DRD_ID_EST ", 11, 8) AS IDESTR\n" | ||||
|     "FROM " F9_DRD "\n" | ||||
|     "WHERE " DRD_CODSOC " = '" << _head.cod_soc << "' AND\n" | ||||
|     DRD_ID_EST " LIKE '" << today.date2ansi() << "%'\n" << | ||||
|     "ORDER BY " DRD_ID_EST " DESC"; | ||||
|     DRD_ID_EST " LIKE '" << today.date2ansi() << "%'\n" | ||||
|     "ORDER BY IDESTR DESC"; | ||||
|   fp_db().sq_set_exec(query); | ||||
| 
 | ||||
|   const int last_estr = fp_db().sq_items() > 0 ? real(fp_db().sq_get("IDESTR").ltrim(10)).integer() : -1; | ||||
|   const int last_estr = fp_db().sq_items() > 0 ? real(fp_db().sq_get("IDESTR")).integer() : -1; | ||||
| 
 | ||||
|   if (last_estr < -1 || last_estr == 99999999) | ||||
|   { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user