brotherton-erpnext/erpnext/accounts/report/financial_statements.html

65 lines
2.2 KiB
HTML
Raw Normal View History

{%
var report_columns = report.get_columns_for_print();
if (report_columns.length > 8) {
frappe.throw(__("Too many columns. Export the report and print it using a spreadsheet application."));
}
%}
2014-07-17 13:42:28 +00:00
<style>
.financial-statements-important td {
2014-07-17 13:42:28 +00:00
font-weight: bold;
}
.financial-statements-blank-row td {
2014-07-17 13:42:28 +00:00
height: 37px;
}
</style>
{% var letterhead= filters.letter_head || (frappe.get_doc(":Company", filters.company) && frappe.get_doc(":Company", filters.company).default_letter_head) %}
{% if(letterhead) { %}
<div style="margin-bottom: 7px;" class="text-center">
{%= frappe.boot.letter_heads[letterhead].header %}
</div>
{% } %}
<h2 class="text-center">{%= __(report.report_name) %}</h2>
<h3 class="text-center">{%= filters.company %}</h3>
<h3 class="text-center">{%= filters.fiscal_year %}</h3>
<h5 class="text-center">{%= __("Currency") %} : {%= filters.presentation_currency || erpnext.get_currency(filters.company) %} </h4>
2014-07-22 13:32:11 +00:00
{% if (filters.from_date) { %}
<h4 class="text-center">{%= frappe.datetime.str_to_user(filters.from_date) %} - {%= frappe.datetime.str_to_user(filters.to_date) %}</h3>
2014-07-22 13:32:11 +00:00
{% } %}
2014-07-17 13:42:28 +00:00
<hr>
<table class="table table-bordered">
<thead>
<tr>
<th style="width: {%= 100 - (report_columns.length - 2) * 13 %}%"></th>
{% for(var i=2, l=report_columns.length; i<l; i++) { %}
<th class="text-right">{%= report_columns[i].label %}</th>
2014-07-17 13:42:28 +00:00
{% } %}
</tr>
</thead>
<tbody>
{% for(var j=0, k=data.length; j<k; j++) { %}
{%
var row = data[j];
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>
<span style="padding-left: {%= cint(data[j].indent) * 2 %}em">{%= row.account_name %}</span>
2014-07-17 13:42:28 +00:00
</td>
{% for(var i=2, l=report_columns.length; i<l; i++) { %}
2014-07-17 13:42:28 +00:00
<td class="text-right">
{% var fieldname = report_columns[i].fieldname; %}
2014-07-17 13:42:28 +00:00
{% if (!is_null(row[fieldname])) { %}
{%= format_currency(row[fieldname], filters.presentation_currency) %}
2014-07-17 13:42:28 +00:00
{% } %}
</td>
{% } %}
</tr>
{% } %}
</tbody>
</table>
<p class="text-right text-muted">Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p>