corretto arrotondamento delle percentuali
git-svn-id: svn://10.65.10.50/trunk@2427 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									d2a30e713a
								
							
						
					
					
						commit
						fe7584f45b
					
				@ -1053,7 +1053,7 @@ word TPagamento::change_value_uguali(int row, real user_val, bool is_perc)
 | 
				
			|||||||
     else  // n. rate > 1, modificata la rata 0: _tpr e' per forza < 4
 | 
					     else  // n. rate > 1, modificata la rata 0: _tpr e' per forza < 4
 | 
				
			||||||
     {             
 | 
					     {             
 | 
				
			||||||
       real div = remainder / real(n_rate() - 1);
 | 
					       real div = remainder / real(n_rate() - 1);
 | 
				
			||||||
       div.round(is_perc ? 3 : _round); 
 | 
					       div.round(is_perc ? 2 : _round); 
 | 
				
			||||||
       real delta = remainder - (div * real(n_rate() - 1));
 | 
					       real delta = remainder - (div * real(n_rate() - 1));
 | 
				
			||||||
       
 | 
					       
 | 
				
			||||||
       rata(0).add(user_val.string(), tok_ind); 
 | 
					       rata(0).add(user_val.string(), tok_ind); 
 | 
				
			||||||
@ -1239,7 +1239,7 @@ void TPagamento::adjust_perc_imp(bool is_perc, int rdiff)
 | 
				
			|||||||
   else
 | 
					   else
 | 
				
			||||||
     other = (_tpr < 4 ? _firstr : _secndr);
 | 
					     other = (_tpr < 4 ? _firstr : _secndr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   TDistrib dt(toshare, is_perc ? _round : 3);                 
 | 
					   TDistrib dt(toshare, is_perc ? _round : 2);                 
 | 
				
			||||||
   const int first = _tpr > 3 ? 1 : 0;               
 | 
					   const int first = _tpr > 3 ? 1 : 0;               
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   for (int j = first; j < _rate.items(); j++)
 | 
					   for (int j = first; j < _rate.items(); j++)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user