mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
fix: show tax breakup in print format
This commit is contained in:
@@ -285,8 +285,8 @@ print_heading_template=None) -%}
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="highlight-bg" style="border-radius: 12px; clear: both">
|
<div style="border-bottom: 1px solid #ededed;">
|
||||||
<table style="width: 100%; border-collapse: collapse">
|
<table class="highlight-bg" style="width: 100%; border-collapse: collapse; border-radius: 12px; margin-bottom: 10px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-left mw-400">
|
<td class="text-left mw-400">
|
||||||
<div class="text-capitalize">
|
<div class="text-capitalize">
|
||||||
|
|||||||
@@ -118,6 +118,9 @@ print_heading_template=None) -%}
|
|||||||
.pb-8 {
|
.pb-8 {
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
.amount-width {
|
||||||
|
width: 110px;
|
||||||
|
}
|
||||||
|
|
||||||
.totals-table {
|
.totals-table {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
@@ -216,8 +219,8 @@ print_heading_template=None) -%}
|
|||||||
<table class="items-table mt-15" style="width: 100%">
|
<table class="items-table mt-15" style="width: 100%">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width: 5%" />
|
<col style="width: 5%" />
|
||||||
<col style="width: 45%" />
|
<col style="width: 40%" />
|
||||||
<col style="width: 10%" />
|
<col style="width: 15%" />
|
||||||
<col style="width: 20%" />
|
<col style="width: 20%" />
|
||||||
<col style="width: 20%" />
|
<col style="width: 20%" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
@@ -246,47 +249,57 @@ print_heading_template=None) -%}
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- Totals Section -->
|
<!-- Totals Section -->
|
||||||
<div class="row section-break mt-20">
|
<table style="width:100%; margin-top: 15px">
|
||||||
<div class="col-xs-7">
|
<td style="vertical-align: bottom !important;">
|
||||||
<div class="mt-80">
|
<p class="title">{{ _("Total in words") }}</p>
|
||||||
<p class="title">{{ _("Total in words") }}</p>
|
<div class="words-box text-uppercase">{{ doc.in_words }}</div>
|
||||||
<div class="words-box text-uppercase">{{ doc.in_words }}</div>
|
</td>
|
||||||
</div>
|
<td>
|
||||||
</div>
|
|
||||||
<div class="col-xs-5">
|
|
||||||
<table class="totals-table">
|
<table class="totals-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-right text-muted">{{ _("Sub Total:") }}</td>
|
<td class="text-right text-muted">{{ _("Sub Total:") }}</td>
|
||||||
<td class="text-right">{{ doc.get_formatted("total", doc) }}</td>
|
<td class="text-right amount-width">{{ doc.get_formatted("total", doc) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
{%- if doc.apply_discount_on == "Net Total" -%}
|
||||||
<td class="text-right text-muted">
|
<tr>
|
||||||
{{ _("Discount") }} ({{ doc.additional_discount_percentage }}%):
|
<td class="text-right text-muted">
|
||||||
</td>
|
{{ _("Discount") }} ({{ doc.additional_discount_percentage }}%):
|
||||||
<td class="text-right">{{ doc.get_formatted("discount_amount", doc) }}</td>
|
</td>
|
||||||
</tr>
|
<td class="text-right amount-width">{{ doc.get_formatted("discount_amount", doc) }}</td>
|
||||||
{% set tax_rate = doc.taxes | selectattr("tax_amount") | sum(attribute="rate") %} {% if
|
</tr>
|
||||||
tax_rate > 0 %}
|
{%- endif -%}
|
||||||
<tr>
|
{%- for tax in doc.taxes -%}
|
||||||
<td class="text-right text-muted">{{ _("Tax") }} ({{ tax_rate }}%):</td>
|
{%- if (tax.tax_amount or print_settings.print_taxes_with_zero_amount) and (not tax.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%}
|
||||||
<td class="text-right">{{ doc.get_formatted("total_taxes_and_charges", doc) }}</td>
|
<tr>
|
||||||
</tr>
|
<td class="text-right text-muted">{{ tax.get_formatted("description") }} ({{ tax.get_formatted("rate") }}%):</td>
|
||||||
{% endif %}
|
<td class="text-right amount-width">{{ tax.get_formatted("tax_amount") }}</td>
|
||||||
|
</tr>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- if doc.apply_discount_on == "Grand Total" -%}
|
||||||
|
<tr>
|
||||||
|
<td class="text-right text-muted">
|
||||||
|
{{ _("Discount") }} ({{ doc.additional_discount_percentage }}%):
|
||||||
|
</td>
|
||||||
|
<td class="text-right amount-width">{{ doc.get_formatted("discount_amount", doc) }}</td>
|
||||||
|
</tr>
|
||||||
|
{%- endif -%}
|
||||||
<tr class="grand-total">
|
<tr class="grand-total">
|
||||||
<td class="text-right">{{ _("Grand Total:") }}</td>
|
<td class="text-right">{{ _("Grand Total:") }}</td>
|
||||||
<td class="text-right">{{ doc.get_formatted("grand_total", doc) }}</td>
|
<td class="text-right amount-width">{{ doc.get_formatted("grand_total", doc) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</table>
|
||||||
|
|
||||||
<!-- Terms -->
|
<!-- Terms -->
|
||||||
{% if doc.terms %}
|
<div class="terms-section">
|
||||||
<div class="info-card mt-40">
|
{% if doc.terms %}
|
||||||
<div>{{ _("Terms and Conditions") }}</div>
|
<div class="info-card mt-40">
|
||||||
{{ doc.terms}}
|
<div>{{ _("Terms and Conditions") }}</div>
|
||||||
</div>
|
{{ doc.terms}}
|
||||||
{% endif %}
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
Reference in New Issue
Block a user