Round total_price also to 2 decimal places
This commit is contained in:
		
					parent
					
						
							
								270c610111
							
						
					
				
			
			
				commit
				
					
						c36554b4d1
					
				
			
		
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -197,7 +197,7 @@ class IndexView(CreateView):
 | 
				
			||||||
            'vat': vat,
 | 
					            'vat': vat,
 | 
				
			||||||
            'vat_percent': vat_percent,
 | 
					            'vat_percent': vat_percent,
 | 
				
			||||||
            'discount': discount,
 | 
					            'discount': discount,
 | 
				
			||||||
            'total_price': price + vat - discount['amount'],
 | 
					            'total_price': round(price + vat - discount['amount'], 2),
 | 
				
			||||||
            'pricing_name': vm_pricing_name
 | 
					            'pricing_name': vm_pricing_name
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        request.session['specs'] = specs
 | 
					        request.session['specs'] = specs
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1305,7 +1305,7 @@ class CreateVirtualMachinesView(LoginRequiredMixin, View):
 | 
				
			||||||
            'price': price,
 | 
					            'price': price,
 | 
				
			||||||
            'vat': vat,
 | 
					            'vat': vat,
 | 
				
			||||||
            'vat_percent': vat_percent,
 | 
					            'vat_percent': vat_percent,
 | 
				
			||||||
            'total_price': price + vat - discount['amount'],
 | 
					            'total_price': round(price + vat - discount['amount'], 2),
 | 
				
			||||||
            'pricing_name': vm_pricing_name
 | 
					            'pricing_name': vm_pricing_name
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue