From a11b08c9e42d280db299f55e665489b666e60cf4 Mon Sep 17 00:00:00 2001 From: Vaidas Lungis Date: Thu, 29 Jan 2015 10:38:57 +0200 Subject: [PATCH] add tax row at checkout summary --- .../html_client/mod_orderbutton_checkout.phtml | 11 ++++++++++- src/bb-themes/boxbilling/html/mod_cart_index.phtml | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/bb-modules/Orderbutton/html_client/mod_orderbutton_checkout.phtml b/src/bb-modules/Orderbutton/html_client/mod_orderbutton_checkout.phtml index 900e2f7cb..13d92c014 100644 --- a/src/bb-modules/Orderbutton/html_client/mod_orderbutton_checkout.phtml +++ b/src/bb-modules/Orderbutton/html_client/mod_orderbutton_checkout.phtml @@ -145,9 +145,18 @@ {% 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 %} + + {% trans 'VAT'%} ({{ tax_rate }}%) : + {{ tax_amount | money_convert }} + + {% endif %} {% trans 'Total:' %} - {{ cart.total | money_convert }} + {{ (cart.total + tax_amount) | money_convert }} diff --git a/src/bb-themes/boxbilling/html/mod_cart_index.phtml b/src/bb-themes/boxbilling/html/mod_cart_index.phtml index c70322d90..7f5861afd 100644 --- a/src/bb-themes/boxbilling/html/mod_cart_index.phtml +++ b/src/bb-themes/boxbilling/html/mod_cart_index.phtml @@ -86,8 +86,17 @@
+ {% 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 %} + +

{% trans 'VAT'%} ({{ tax_rate }}%) :

+ +
{{ tax_amount | money_convert }}
+ {% endif %}

{% trans 'Total:' %}

-
{{ cart.total | money_convert }}
+
{{ (cart.total + tax_amount) | money_convert }}
{% set enough_in_balance = client.client_balance_get_total >= cart.total %} {% if cart.total and not enough_in_balance %}