diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.html b/erpnext/accounts/report/balance_sheet/balance_sheet.html index d4ae54d4f38..5774bb07a0b 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.html +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.html @@ -1 +1,224 @@ -{% include "accounts/report/financial_statements.html" %} +{% + const report_columns = report + .get_columns_for_print() + .filter(col => !col.hidden); + + if (report_columns.length > 8) { + frappe.throw( + __("Too many columns. Export the report and print it using a spreadsheet application.") + ); + } +%} + + + +
| + {%= col.label %} + | + {% } %} +
|---|
| + {% if (i === 0) { %} + + {%= String(row.account_name || row.section || "").replace(/^['"]|['"]$/g, "") %} + + {% } else if (!is_null(value)) { %} + {%= frappe.format(value, col, {}, row) %} + {% } %} + | + {% } %} +
+ {%= __("Printed on {0}", [ + frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) + ]) %} +
+ +| + {%= col.label %} + | + {% } %} +
|---|
| + {% if (i === 0) { %} + + {%= String(row.account_name || row.section || "").replace(/^['"]|['"]$/g, "") %} + + {% } else if (!is_null(value)) { %} + {%= frappe.format(value, col, {}, row) %} + {% } %} + | + {% } %} +
+ {%= __("Printed on {0}", [ + frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) + ]) %} +
+ +| + {%= col.label %} + | + {% } %} +
|---|
| + {% if (i === 0) { %} + + {%= String(row.account_name || row.section || "").replace(/^['"]|['"]$/g, "") %} + + {% } else if (!is_null(value)) { %} + {%= frappe.format(value, col, {}, row) %} + {% } %} + | + {% } %} +
+ {%= __("Printed on {0}", [ + frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) + ]) %} +
+ +| + {%= col.label %} + | + {% } %} +
|---|
| + {% if (i === 0) { %} + + {%= String(row.account_name || row.section || "").replace(/^['"]|['"]$/g, "") %} + + {% } else if (!is_null(value)) { %} + {%= frappe.format(value, col, {}, row) %} + {% } %} + | + {% } %} +
+ {%= __("Printed on {0}", [ + frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) + ]) %} +
+ +