add tax row at checkout summary

This commit is contained in:
Vaidas Lungis committed 2015-01-29 10:38:57 +02:00
1 parent 7b5b94a8d8
commit a11b08c9e4
2 files changed
+20 -2

No files matched your search

@@ -145,9 +145,18 @@
</tr>
{% endif %}
{% set tax_amount = 0 %}
{% if client.client_is_taxable %}
{% set tax_rate = client.invoice_get_tax_rate %}
{% set tax_amount = cart.total * tax_rate / 100 %}
<tr>
<td><strong>{% trans 'VAT'%} ({{ tax_rate }}%) :</strong></td>
<td><strong>{{ tax_amount | money_convert }}</strong></td>
</tr>
{% endif %}
<tr>
<td><strong>{% trans 'Total:' %}</strong></td>
<td><strong>{{ cart.total | money_convert }}</strong></td>
<td><strong>{{ (cart.total + tax_amount) | money_convert }}</strong></td>
</tr>
</table>
@@ -86,8 +86,17 @@
<div class="grid_5 omega">
<div class="box">
<div class="block pricing">
{% set tax_amount = 0 %}
{% if client.client_is_taxable %}
{% set tax_rate = client.invoice_get_tax_rate %}
{% set tax_amount = cart.total * tax_rate / 100 %}
<p>{% trans 'VAT'%} ({{ tax_rate }}%) :</p>
<div class="currency">{{ tax_amount | money_convert }}</div>
{% endif %}
<p>{% trans 'Total:' %}</p>
<div class="currency">{{ cart.total | money_convert }}</div>
<div class="currency">{{ (cart.total + tax_amount) | money_convert }}</div>
<form method="post" action="{{ 'api/client/cart/checkout'|link }}" class="api-form" data-api-jsonp="onAfterCartCheckout">
{% set enough_in_balance = client.client_balance_get_total >= cart.total %}
{% if cart.total and not enough_in_balance %}