2015-09-16 13:22:52 +00:00
|
|
|
{% if doc.taxes %}
|
2019-03-19 06:18:32 +00:00
|
|
|
<tr>
|
2021-05-27 13:23:11 +00:00
|
|
|
<td class="text-left" colspan="1">
|
2019-03-19 06:18:32 +00:00
|
|
|
{{ _("Net Total") }}
|
|
|
|
</td>
|
2021-05-27 13:23:11 +00:00
|
|
|
<td class="text-right totals" colspan="3">
|
2019-03-19 06:18:32 +00:00
|
|
|
{{ doc.get_formatted("net_total") }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2015-09-16 13:22:52 +00:00
|
|
|
{% endif %}
|
2019-03-19 06:18:32 +00:00
|
|
|
|
2015-09-16 13:22:52 +00:00
|
|
|
{% for d in doc.taxes %}
|
2020-04-07 06:48:47 +00:00
|
|
|
{% if d.base_tax_amount %}
|
|
|
|
<tr>
|
2021-05-27 13:23:11 +00:00
|
|
|
<td class="text-left" colspan="1">
|
2020-04-07 06:48:47 +00:00
|
|
|
{{ d.description }}
|
|
|
|
</td>
|
2021-05-27 13:23:11 +00:00
|
|
|
<td class="text-right totals" colspan="3">
|
2020-04-07 06:48:47 +00:00
|
|
|
{{ d.get_formatted("base_tax_amount") }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
2015-09-16 13:22:52 +00:00
|
|
|
{% endfor %}
|
2019-03-19 06:18:32 +00:00
|
|
|
|
2019-08-12 08:09:25 +00:00
|
|
|
{% if doc.doctype == 'Quotation' %}
|
2021-05-27 13:23:11 +00:00
|
|
|
{% if doc.coupon_code %}
|
|
|
|
<tr>
|
|
|
|
<td class="text-left total-discount" colspan="1">
|
|
|
|
{{ _("Savings") }}
|
|
|
|
</td>
|
|
|
|
<td class="text-right tot_quotation_discount total-discount totals" colspan="3">
|
|
|
|
{% 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) }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
2019-08-12 08:09:25 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if doc.doctype == 'Sales Order' %}
|
2021-05-27 13:23:11 +00:00
|
|
|
{% if doc.coupon_code %}
|
|
|
|
<tr>
|
|
|
|
<td class="text-left total-discount" colspan="2" style="padding-right: 2rem;">
|
|
|
|
{{ _("Applied Coupon Code") }}
|
|
|
|
</td>
|
|
|
|
<td class="text-right total-discount">
|
|
|
|
<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>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-left total-discount" colspan="2">
|
|
|
|
{{ _("Savings") }}
|
|
|
|
</td>
|
|
|
|
<td class="text-right total-discount">
|
|
|
|
<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>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
2019-08-12 08:09:25 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2019-03-19 06:18:32 +00:00
|
|
|
<tr>
|
2021-05-27 13:23:11 +00:00
|
|
|
<th class="text-left item-grand-total" colspan="1">
|
2019-03-19 06:18:32 +00:00
|
|
|
{{ _("Grand Total") }}
|
|
|
|
</th>
|
2021-05-27 13:23:11 +00:00
|
|
|
<th class="text-right item-grand-total totals" colspan="3">
|
2019-03-19 06:18:32 +00:00
|
|
|
{{ doc.get_formatted("grand_total") }}
|
|
|
|
</th>
|
|
|
|
</tr>
|