Round discount to 2 decimal points also
This commit is contained in:
		
					parent
					
						
							
								642153345c
							
						
					
				
			
			
				commit
				
					
						d8a532e7b0
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -127,7 +127,7 @@ def get_vm_price_with_vat(cpu, memory, ssd_size, hdd_size=0,
 | 
				
			||||||
    vat = vat.quantize(cents, decimal.ROUND_HALF_UP)
 | 
					    vat = vat.quantize(cents, decimal.ROUND_HALF_UP)
 | 
				
			||||||
    discount = {
 | 
					    discount = {
 | 
				
			||||||
        'name': pricing.discount_name,
 | 
					        'name': pricing.discount_name,
 | 
				
			||||||
        'amount': float(pricing.discount_amount),
 | 
					        'amount': round(float(pricing.discount_amount),2)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return (round(float(price), 2), round(float(vat), 2),
 | 
					    return (round(float(price), 2), round(float(vat), 2),
 | 
				
			||||||
            round(float(vat_percent)), discount)
 | 
					            round(float(vat_percent)), discount)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue