Nuovo calcolo rate uguali se sono uguali tutte quante
git-svn-id: svn://10.65.10.50/trunk@2636 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									3ea8c74b38
								
							
						
					
					
						commit
						fd2a2c2303
					
				@ -1605,6 +1605,15 @@ void TPagamento::set_rate_auto()
 | 
			
		||||
    {                         
 | 
			
		||||
      const int rut = _tpr > 3 ? n_rate() - 1 : n_rate();
 | 
			
		||||
      if (rut > 1)  // Guy was here! Don't kill me for this
 | 
			
		||||
      {
 | 
			
		||||
        real refrata = real(100.0)/real(rut); refrata.round(2);
 | 
			
		||||
        if (perc_rata(first+1) == refrata) // tutte uguali nonostante perc arrotondate
 | 
			
		||||
        {
 | 
			
		||||
          ro = toslice / real(rut);
 | 
			
		||||
          ro.round(round(v)); 
 | 
			
		||||
          r1 = toslice - (ro * real(rut-1));
 | 
			
		||||
        } 
 | 
			
		||||
        else // la prima e' diversa
 | 
			
		||||
        {
 | 
			
		||||
          // usa la percentuale per la prima rata
 | 
			
		||||
          r1 = (toslice * perc_rata(first))/real(100.0); 
 | 
			
		||||
@ -1616,6 +1625,7 @@ void TPagamento::set_rate_auto()
 | 
			
		||||
            r1 = (toslice - (ro*real(rut-1)));
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }  
 | 
			
		||||
      else
 | 
			
		||||
        r1 = toslice;  
 | 
			
		||||
      r1.round(round(v));
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user