2014-07-18 12:35:26 +00:00
|
|
|
{%
|
2018-07-18 03:58:44 +00:00
|
|
|
var report_columns = report.get_columns_for_print();
|
2019-12-12 07:36:17 +00:00
|
|
|
report_columns = report_columns.filter(col => !col.hidden);
|
2018-07-18 03:58:44 +00:00
|
|
|
|
|
|
|
if (report_columns.length > 8) {
|
2014-07-18 12:35:26 +00:00
|
|
|
frappe.throw(__("Too many columns. Export the report and print it using a spreadsheet application."));
|
|
|
|
}
|
|
|
|
%}
|
|
|
|
|
2014-07-17 13:42:28 +00:00
|
|
|
<style>
|
2014-07-18 12:35:26 +00:00
|
|
|
.financial-statements-important td {
|
2014-07-17 13:42:28 +00:00
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
2014-07-18 12:35:26 +00:00
|
|
|
.financial-statements-blank-row td {
|
2014-07-17 13:42:28 +00:00
|
|
|
height: 37px;
|
|
|
|
}
|
|
|
|
</style>
|
2019-12-12 07:36:17 +00:00
|
|
|
|
2014-07-18 12:35:26 +00:00
|
|
|
<h2 class="text-center">{%= __(report.report_name) %}</h2>
|
2017-04-24 11:01:51 +00:00
|
|
|
<h3 class="text-center">{%= filters.company %}</h3>
|
2019-12-12 07:36:17 +00:00
|
|
|
|
2019-06-11 05:42:28 +00:00
|
|
|
{% if 'cost_center' in filters %}
|
|
|
|
<h3 class="text-center">{%= filters.cost_center %}</h3>
|
|
|
|
{% endif %}
|
2019-12-12 07:36:17 +00:00
|
|
|
|
2017-04-24 11:01:51 +00:00
|
|
|
<h3 class="text-center">{%= filters.fiscal_year %}</h3>
|
2019-12-12 07:36:17 +00:00
|
|
|
<h5 class="text-center">
|
|
|
|
{%= __("Currency") %} : {%= filters.presentation_currency || erpnext.get_currency(filters.company) %}
|
|
|
|
</h5>
|
2014-07-22 13:32:11 +00:00
|
|
|
{% if (filters.from_date) { %}
|
2019-12-12 07:36:17 +00:00
|
|
|
<h5 class="text-center">
|
|
|
|
{%= frappe.datetime.str_to_user(filters.from_date) %} - {%= frappe.datetime.str_to_user(filters.to_date) %}
|
|
|
|
</h5>
|
2014-07-22 13:32:11 +00:00
|
|
|
{% } %}
|
2014-07-17 13:42:28 +00:00
|
|
|
<hr>
|
|
|
|
<table class="table table-bordered">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2019-12-12 07:36:17 +00:00
|
|
|
<th style="width: {%= 100 - (report_columns.length - 1) * 13 %}%"></th>
|
|
|
|
{% for (let i=1, l=report_columns.length; i<l; i++) { %}
|
2018-07-18 03:58:44 +00:00
|
|
|
<th class="text-right">{%= report_columns[i].label %}</th>
|
2014-07-17 13:42:28 +00:00
|
|
|
{% } %}
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2019-12-12 07:36:17 +00:00
|
|
|
{% for(let j=0, k=data.length-1; j<k; j++) { %}
|
2014-07-17 13:42:28 +00:00
|
|
|
{%
|
|
|
|
var row = data[j];
|
2014-07-18 12:35:26 +00:00
|
|
|
var row_class = data[j].parent_account ? "" : "financial-statements-important";
|
|
|
|
row_class += data[j].account_name ? "" : " financial-statements-blank-row";
|
2014-07-17 13:42:28 +00:00
|
|
|
%}
|
|
|
|
<tr class="{%= row_class %}">
|
|
|
|
<td>
|
2014-07-18 12:35:26 +00:00
|
|
|
<span style="padding-left: {%= cint(data[j].indent) * 2 %}em">{%= row.account_name %}</span>
|
2014-07-17 13:42:28 +00:00
|
|
|
</td>
|
2019-12-12 07:36:17 +00:00
|
|
|
{% for(let i=1, l=report_columns.length; i<l; i++) { %}
|
2014-07-17 13:42:28 +00:00
|
|
|
<td class="text-right">
|
2019-12-12 07:36:17 +00:00
|
|
|
{% const fieldname = report_columns[i].fieldname; %}
|
2014-07-17 13:42:28 +00:00
|
|
|
{% if (!is_null(row[fieldname])) { %}
|
2019-12-12 07:36:17 +00:00
|
|
|
{%= frappe.format(row[fieldname], report_columns[i], {}, row) %}
|
2014-07-17 13:42:28 +00:00
|
|
|
{% } %}
|
|
|
|
</td>
|
|
|
|
{% } %}
|
|
|
|
</tr>
|
|
|
|
{% } %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2019-12-12 07:36:17 +00:00
|
|
|
<p class="text-right text-muted">
|
|
|
|
Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}
|
|
|
|
</p>
|