discount name in templates

This commit is contained in:
Arvind Tiwari 2018-05-07 06:25:50 +05:30
commit eeed9b2e72
5 changed files with 15 additions and 11 deletions

View file

@ -79,8 +79,8 @@
{% if vm.discount > 0 %}
<p class="text-primary">
{%trans "Discount" as discount_name %}
<span>{{ vm_pricing.discount_name|default:discount_name }}: </span>
<span class="pull-right">- {{ vm_pricing.discount_amount }} CHF</span>
<span>{{ vm.discount.name|default:discount_name }}: </span>
<span class="pull-right">- {{ discount.amount }} CHF</span>
</p>
{% endif %}
<p>

View file

@ -172,7 +172,7 @@ class IndexView(CreateView):
'vat': vat,
'vat_percent': vat_percent,
'discount': discount,
'total_price': price + vat - discount,
'total_price': price + vat - discount.amount,
'pricing_name': vm_pricing_name
}
request.session['specs'] = specs