From 46af475072c02072d0d0083ceccaeceae559aa63 Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Sun, 28 Dec 2025 12:43:19 +0330 Subject: [PATCH] format invocies --- backend/templates/order/invoice_order.html | 19 +++++++++-------- .../templates/order/invoice_shop_order.html | 21 ++++++++++--------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/backend/templates/order/invoice_order.html b/backend/templates/order/invoice_order.html index f2bc8aa..834baeb 100644 --- a/backend/templates/order/invoice_order.html +++ b/backend/templates/order/invoice_order.html @@ -1,3 +1,4 @@ +{% load humanize %} @@ -276,22 +277,22 @@ {{ item_data.item.product.product.name }} {{ item_data.item.product.title }} {{ item_data.item.quantity }} - {{ item_data.price_before_discount|floatformat:0 }} تومان + {{ item_data.price_before_discount|floatformat:0|intcomma }} تومان {% if item_data.item.discount_percent > 0 %} - {{ item_data.item.discount_percent }}% ({{ item_data.discount_amount|floatformat:0 }} تومان) + {{ item_data.item.discount_percent }}% ({{ item_data.discount_amount|floatformat:0|intcomma }} تومان) {% else %} --- {% endif %} {% if item_data.item.special_discount_amount > 0 %} - {{ item_data.item.special_discount_amount|floatformat:0 }} تومان + {{ item_data.item.special_discount_amount|floatformat:0|intcomma }} تومان {% else %} --- {% endif %} - {{ item_data.item.price|floatformat:0 }} تومان + {{ item_data.item.price|floatformat:0|intcomma }} تومان {% endfor %} @@ -305,27 +306,27 @@
جمع کل: - {{ subtotal|floatformat:0 }} تومان + {{ subtotal|floatformat:0|intcomma }} تومان
{% if discount_amount > 0 %}
تخفیف کد: - {{ discount_amount|floatformat:0 }} تومان + {{ discount_amount|floatformat:0|intcomma }} تومان
{% endif %} {% if special_discount_total > 0 %}
تخفیف ویژه: - {{ special_discount_total|floatformat:0 }} تومان + {{ special_discount_total|floatformat:0|intcomma }} تومان
{% endif %}
مالیات: - {{ tax|floatformat:0 }} تومان + {{ tax|floatformat:0|intcomma }} تومان
مبلغ قابل پرداخت: - {{ final_price|floatformat:0 }} تومان + {{ final_price|floatformat:0|intcomma }} تومان
diff --git a/backend/templates/order/invoice_shop_order.html b/backend/templates/order/invoice_shop_order.html index 1332cc1..4891106 100644 --- a/backend/templates/order/invoice_shop_order.html +++ b/backend/templates/order/invoice_shop_order.html @@ -1,3 +1,4 @@ +{% load humanize %} @@ -353,22 +354,22 @@ {{ item.order_item.product.product.name }} {{ item.order_item.product.title }} {{ item.quantity }} - {{ item.unit_price|floatformat:0 }} تومان + {{ item.unit_price|floatformat:0|intcomma }} تومان {% if item.discount_amount > 0 %} - {{ item.order_item.discount_percent }}% ({{ item.discount_amount|floatformat:0 }} تومان) + {{ item.order_item.discount_percent }}% ({{ item.discount_amount|floatformat:0|intcomma }} تومان) {% else %} --- {% endif %} {% if item.special_discount_amount > 0 %} - {{ item.special_discount_amount|floatformat:0 }} تومان + {{ item.special_discount_amount|floatformat:0|intcomma }} تومان {% else %} --- {% endif %} - {{ item.total_price|floatformat:0 }} تومان + {{ item.total_price|floatformat:0|intcomma }} تومان {% endfor %} @@ -383,23 +384,23 @@
جمع کل (Subtotal): - {{ subtotal|floatformat:0 }} تومان + {{ subtotal|floatformat:0|intcomma }} تومان
{% if discount_amount > 0 %}
تخفیف معمولی: - {{ discount_amount|floatformat:0 }} تومان + {{ discount_amount|floatformat:0|intcomma }} تومان
{% endif %} {% if special_discount_amount > 0 %}
تخفیف ویژه: - {{ special_discount_amount|floatformat:0 }} تومان + {{ special_discount_amount|floatformat:0|intcomma }} تومان
{% endif %}
مالیات: - {{ tax_amount|floatformat:0 }} تومان + {{ tax_amount|floatformat:0|intcomma }} تومان
@@ -411,7 +412,7 @@
مبلغ کمیسیون: - {{ commission_amount|floatformat:0 }} تومان + {{ commission_amount|floatformat:0|intcomma }} تومان
@@ -419,7 +420,7 @@

مبلغ نهایی

مبلغ قابل پرداخت به فروشگاه: - {{ payable_amount|floatformat:0 }} تومان + {{ payable_amount|floatformat:0|intcomma }} تومان