Back to Erpnext

Order Taxes

erpnext/templates/includes/order/order_taxes.html

16.20.11.5 KB
Original Source

{% if doc.taxes %}

{{ _("Net Total") }}

{{ doc.get_formatted("net_total") }}

{% endif %} {% for d in doc.taxes %} {% if d.tax_amount %}

{{ d.description }}

{{ d.get_formatted("tax_amount") }}

{% endif %} {% endfor %} {% if doc.doctype == 'Quotation' %} {% if doc.coupon_code %}

{{ _("Savings") }}

{% set tot_quotation_discount = [] %} {%- for item in doc.items -%} {% if tot_quotation_discount.append((((item.price_list_rate * item.qty) * item.discount_percentage) / 100)) %} {% endif %} {% endfor %} {{ frappe.utils.fmt_money((tot_quotation_discount | sum),currency=doc.currency) }}

{% endif %} {% endif %} {% if doc.doctype == 'Sales Order' %} {% if doc.coupon_code %}

{{ _("Total Amount") }}

{% set total_amount = [] %} {%- for item in doc.items -%} {% if total_amount.append((item.price_list_rate * item.qty)) %}{% endif %} {% endfor %} {{ frappe.utils.fmt_money((total_amount | sum),currency=doc.currency) }}

{{ _("Applied Coupon Code") }}

{%- for row in frappe.get_all(doctype="Coupon Code", fields=["coupon_code"], filters={ "name":doc.coupon_code}) -%} {{ row.coupon_code }} {% endfor %}

{{ _("Savings") }}

{% set tot_SO_discount = [] %} {%- for item in doc.items -%} {% if tot_SO_discount.append((((item.price_list_rate * item.qty) * item.discount_percentage) / 100)) %}{% endif %} {% endfor %} {{ frappe.utils.fmt_money((tot_SO_discount | sum),currency=doc.currency) }}

{% endif %} {% endif %}

{{ _("Grand Total") }}

{{ doc.get_formatted("grand_total") }}