Add price_after_discount explicitly for showing in template
This commit is contained in:
		
					parent
					
						
							
								112f3e17a9
							
						
					
				
			
			
				commit
				
					
						156930ab26
					
				
			
		
					 2 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -138,7 +138,7 @@
 | 
			
		|||
                                            {% endif %}
 | 
			
		||||
                                            <p>
 | 
			
		||||
                                                <strong class="text-lg">{% trans "Subtotal" %} </strong>
 | 
			
		||||
                                                <strong class="pull-right">{{vm.price - vm.discount.amount|floatformat:2|intcomma}} CHF</strong>
 | 
			
		||||
                                                <strong class="pull-right">{{vm.price_after_discount}} CHF</strong>
 | 
			
		||||
                                            </p>
 | 
			
		||||
                                            <p>
 | 
			
		||||
                                                <small>{% trans "VAT for" %} {{vm.vat_country}} ({{vm.vat_percent}}%) : </small>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -642,6 +642,7 @@ class OrderConfirmationView(DetailView, FormView):
 | 
			
		|||
                vat_rate=user_country_vat_rate * 100
 | 
			
		||||
            )
 | 
			
		||||
            vm_specs["price"] = price
 | 
			
		||||
            vm_specs["price_after_discount"] = price - discount
 | 
			
		||||
 | 
			
		||||
            vat_number = request.session.get('billing_address_data').get("vat_number")
 | 
			
		||||
            billing_address = BillingAddress.objects.get(id=request.session["billing_address_id"])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue