From b8eca59e0dbfdae39daf2b6f0420735eda832116 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 29 Jan 2020 16:04:03 +0530 Subject: [PATCH] Fix design for showing prices excl and incl vat and discount --- .../datacenterlight/order_detail.html | 127 +++++++++++++----- 1 file changed, 94 insertions(+), 33 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/order_detail.html b/datacenterlight/templates/datacenterlight/order_detail.html index c2b97556..f62fd063 100644 --- a/datacenterlight/templates/datacenterlight/order_detail.html +++ b/datacenterlight/templates/datacenterlight/order_detail.html @@ -121,40 +121,101 @@

- {% if vm.vat > 0 or vm.discount.amount > 0 %} -
-
- {% if vm.vat > 0 %} -

- {% trans "Price" %} - {{vm.price|floatformat:2|intcomma}} CHF -

- {% if vm.discount.amount > 0 %} -

- {%trans "Discount" as discount_name %} - {{ vm.discount.name|default:discount_name }} - - {{ vm.discount.amount }} CHF -

- {% endif %} -

- {% trans "Subtotal" %} - {{vm.price_after_discount}} CHF -

-

- {% trans "VAT for" %} {{vm.vat_country}} ({{vm.vat_percent}}%) : - {{vm.vat|floatformat:2|intcomma}} CHF -

- {% endif %} -
-
-
-
-
- {% endif %}
-

- {% trans "Total" %} - {{vm.total_price|floatformat:2|intcomma}} CHF +

+ {% trans "Price Before VAT" %} + {{vm.price|intcomma}} CHF +

+
+
+
+
+
+ +
+
+

+
+
+

Pre VAT

+
+
+

VAT for {{vm.vat_country}} ({{vm.vat_percent}}%)

+
+
+
+
+

Price

+
+
+

{{vm.price|intcomma}} CHF

+
+
+

{{vm.price_with_vat|intcomma}} CHF

+
+
+ {% if vm.discount.amount > 0 %} +
+
+

{{vm.discount.name}}

+
+
+

-{{vm.discount.amount|intcomma}} CHF

+
+
+

-{{vm.discount.amount_with_vat|intcomma}} CHF

+
+
+ {% endif %} +
+
+
+
+
+
+
+

Total

+
+
+

{{vm.price_after_discount|intcomma}} CHF

+
+
+

{{vm.price_after_discount_with_vat|intcomma}} CHF

+
+
+
+
+
+
+
+

+ {% trans "Your Price in Total" %} + {{vm.total_price|floatformat:2|intcomma}} CHF