brotherton-erpnext/erpnext/templates/includes/order/order_taxes.html

99 lines
2.2 KiB
HTML
Raw Normal View History

2015-09-16 13:22:52 +00:00
{% if doc.taxes %}
<tr>
<td class="text-right" colspan="2">
{{ _("Net Total") }}
</td>
<td class="text-right">
{{ doc.get_formatted("net_total") }}
</td>
</tr>
2015-09-16 13:22:52 +00:00
{% endif %}
2015-09-16 13:22:52 +00:00
{% for d in doc.taxes %}
{% if d.base_tax_amount %}
<tr>
<td class="text-right" colspan="2">
{{ d.description }}
</td>
<td class="text-right">
{{ d.get_formatted("base_tax_amount") }}
</td>
</tr>
{% endif %}
2015-09-16 13:22:52 +00:00
{% endfor %}
{% if doc.doctype == 'Quotation' %}
{% if doc.coupon_code %}
<tr>
<th class="text-right" colspan="2">
{{ _("Discount") }}
</th>
<th class="text-right tot_quotation_discount">
2021-01-20 12:22:54 +00:00
{% 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) }}
</th>
</tr>
{% endif %}
{% endif %}
{% if doc.doctype == 'Sales Order' %}
{% if doc.coupon_code %}
<tr>
<th class="text-right" colspan="2">
{{ _("Total Amount") }}
</th>
<th class="text-right">
2021-01-20 12:22:54 +00:00
<span>
{% 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) }}
</span>
</th>
</tr>
<tr>
2021-01-20 12:22:54 +00:00
<th class="text-right" colspan="2">
{{ _("Applied Coupon Code") }}
</th>
<th class="text-right">
<span>
{%- for row in frappe.get_all(doctype="Coupon Code",
fields=["coupon_code"], filters={ "name":doc.coupon_code}) -%}
<span>{{ row.coupon_code }}</span>
{% endfor %}
</span>
</th>
</tr>
<tr>
2021-01-20 12:22:54 +00:00
<th class="text-right" colspan="2">
{{ _("Discount") }}
</th>
<th class="text-right">
<span>
{% 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) }}
</span>
</th>
</tr>
{% endif %}
{% endif %}
<tr>
2021-01-20 12:22:54 +00:00
<th></th>
<th class="item-grand-total">
{{ _("Grand Total") }}
</th>
2021-01-20 12:22:54 +00:00
<th class="text-right item-grand-total">
{{ doc.get_formatted("grand_total") }}
</th>
</tr>