diff --git a/erpnext/accounts/print_format/balance_sheet_standard/__init__.py b/erpnext/accounts/print_format/balance_sheet_standard/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/print_format/balance_sheet_standard/balance_sheet_standard.json b/erpnext/accounts/print_format/balance_sheet_standard/balance_sheet_standard.json new file mode 100644 index 00000000000..9529a0cb45d --- /dev/null +++ b/erpnext/accounts/print_format/balance_sheet_standard/balance_sheet_standard.json @@ -0,0 +1,33 @@ +{ + "absolute_value": 0, + "align_labels_right": 0, + "creation": "2026-03-30 20:20:56.195531", + "custom_format": 1, + "default_print_language": "en", + "disabled": 0, + "docstatus": 0, + "doctype": "Print Format", + "font_size": 14, + "html": "{%\n\tconst report_columns = report\n\t\t.get_columns_for_print()\n\t\t.filter(col => !col.hidden);\n\n\tif (report_columns.length > 8) {\n\t\tfrappe.throw(\n\t\t\t__(\"Too many columns. Export the report and print it using a spreadsheet application.\")\n\t\t);\n\t}\n%}\n\n\n\n
\n\n\t
\n\t\t
\n\t\t\t{%= __(report.report_name) %}\n\t\t
\n\t
\n\n\t{% if (subtitle && subtitle.trim()) { %}\n
\n {{ subtitle }}\n
\n {% } else { %}\n
\n
\n
\n {%= __(\"Company\") %}: {%= filters.company %}\n
\n
\n {%= __(\"Currency\") %}:\n {%= filters.presentation_currency || erpnext.get_currency(filters.company) %}\n
\n
\n\n
\n
\n {%= __(\"Period Based On\") %}:\n {%= filters.filter_based_on %}\n
\n\n {% if (filters.filter_based_on === \"Fiscal Year\") { %}\n
\n {%= __(\"Start Year\") %}: {%= filters.from_fiscal_year %}\n
\n
\n {%= __(\"End Year\") %}: {%= filters.to_fiscal_year %}\n
\n\n {% } else if (filters.filter_based_on === \"Date Range\") { %}\n
\n {%= __(\"Start Date\") %}:\n {%= frappe.datetime.str_to_user(filters.period_start_date) %}\n
\n
\n {%= __(\"End Date\") %}:\n {%= frappe.datetime.str_to_user(filters.period_end_date) %}\n
\n {% } %}\n
\n
\n {% } %}\n\n\t
\n \t\n \t\t\n \t\t\t\n \t\t\t\t{% for (let i = 0, l = report_columns.length; i < l; i++) { %}\n \t\t\t\t\t{%\n \t\t\t\t\t\tconst col = report_columns[i];\n \t\t\t\t\t\tconst align = i === 0 ? \"text-left\" : \"text-right\";\n \t\t\t\t\t%}\n \t\t\t\t\t\n \t\t\t\t{% } %}\n \t\t\t\n \t\t\n \n \t\t\n \t\t\t{% for (let j = 0, k = data.length; j < k; j++) { %}\n \t\t\t\t{%\n \t\t\t\t\tconst row = data[j];\n \n \t\t\t\t\tlet row_class = \"\";\n \t\t\t\t\tif (!(row.parent_account || row.parent_section)) {\n \t\t\t\t\t\trow_class = \"financial-statements-important\";\n \t\t\t\t\t}\n \t\t\t\t\tif (!(row.account_name || row.section)) {\n \t\t\t\t\t\trow_class += \" financial-statements-blank-row\";\n \t\t\t\t\t}\n \t\t\t\t%}\n \n \t\t\t\t\n \t\t\t\t\t{% for (let i = 0, l = report_columns.length; i < l; i++) { %}\n \t\t\t\t\t\t{%\n \t\t\t\t\t\t\tconst col = report_columns[i];\n \t\t\t\t\t\t\tconst value = row[col.fieldname];\n \t\t\t\t\t\t\tconst align = i === 0 ? \"text-left\" : \"text-right\";\n \t\t\t\t\t\t%}\n \n \t\t\t\t\t\t\n \t\t\t\t\t{% } %}\n \t\t\t\t\n \t\t\t{% } %}\n \t\t\n \t
\n \t\t\t\t\t\t{%= col.label %}\n \t\t\t\t\t
\n \t\t\t\t\t\t\t{% if (i === 0) { %}\n \t\t\t\t\t\t\t\t\n\t {%= String(row.account_name || row.section || \"\").replace(/^['\"]|['\"]$/g, \"\") %}\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t{% } else if (!is_null(value)) { %}\n \t\t\t\t\t\t\t\t{%= frappe.format(value, col, {}, row) %}\n \t\t\t\t\t\t\t{% } %}\n \t\t\t\t\t\t
\n
\n\n\t

\n\t\t{%= __(\"Printed on {0}\", [\n\t\t\tfrappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())\n\t\t]) %}\n\t

\n\n
", + "idx": 0, + "line_breaks": 0, + "margin_bottom": 15.0, + "margin_left": 15.0, + "margin_right": 15.0, + "margin_top": 15.0, + "modified": "2026-05-06 17:40:39.605807", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Balance Sheet Standard", + "owner": "Administrator", + "page_number": "Hide", + "pdf_generator": "chrome", + "print_format_builder": 0, + "print_format_builder_beta": 0, + "print_format_for": "Report", + "print_format_type": "JS", + "raw_printing": 0, + "report": "Balance Sheet", + "show_section_headings": 0, + "standard": "Yes" +} diff --git a/erpnext/accounts/print_format/cash_flow_statement_standard/__init__.py b/erpnext/accounts/print_format/cash_flow_statement_standard/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/print_format/cash_flow_statement_standard/cash_flow_statement_standard.json b/erpnext/accounts/print_format/cash_flow_statement_standard/cash_flow_statement_standard.json new file mode 100644 index 00000000000..fd95794a0f9 --- /dev/null +++ b/erpnext/accounts/print_format/cash_flow_statement_standard/cash_flow_statement_standard.json @@ -0,0 +1,33 @@ +{ + "absolute_value": 0, + "align_labels_right": 0, + "creation": "2026-03-31 00:46:27.932456", + "custom_format": 1, + "default_print_language": "en", + "disabled": 0, + "docstatus": 0, + "doctype": "Print Format", + "font_size": 14, + "html": "{%\n\tconst report_columns = report\n\t\t.get_columns_for_print()\n\t\t.filter(col => !col.hidden);\n\n\tif (report_columns.length > 8) {\n\t\tfrappe.throw(\n\t\t\t__(\"Too many columns. Export the report and print it using a spreadsheet application.\")\n\t\t);\n\t}\n%}\n\n\n\n
\n\n\t
\n\t\t
\n\t\t\t{%= __(report.report_name) %}\n\t\t
\n\t
\n\n {% if (subtitle && subtitle.trim()) { %}\n
\n {{ subtitle }}\n
\n {% } else { %}\n
\n
\n
\n {%= __(\"Company\") %}: {%= filters.company %}\n
\n
\n {%= __(\"Currency\") %}:\n {%= filters.presentation_currency || erpnext.get_currency(filters.company) %}\n
\n
\n\n
\n
\n {%= __(\"Period Based On\") %}:\n {%= filters.filter_based_on %}\n
\n\n {% if (filters.filter_based_on === \"Fiscal Year\") { %}\n
\n {%= __(\"Start Year\") %}: {%= filters.from_fiscal_year %}\n
\n
\n {%= __(\"End Year\") %}: {%= filters.to_fiscal_year %}\n
\n\n {% } else if (filters.filter_based_on === \"Date Range\") { %}\n
\n {%= __(\"Start Date\") %}:\n {%= frappe.datetime.str_to_user(filters.period_start_date) %}\n
\n
\n {%= __(\"End Date\") %}:\n {%= frappe.datetime.str_to_user(filters.period_end_date) %}\n
\n {% } %}\n
\n
\n {% } %}\n\n\t
\n \t\n \t\t\n \t\t\t\n \t\t\t\t{% for (let i = 0, l = report_columns.length; i < l; i++) { %}\n \t\t\t\t\t{%\n \t\t\t\t\t\tconst col = report_columns[i];\n \t\t\t\t\t\tconst align = i === 0 ? \"text-left\" : \"text-right\";\n \t\t\t\t\t%}\n \t\t\t\t\t\n \t\t\t\t{% } %}\n \t\t\t\n \t\t\n \n \t\t\n \t\t\t{% for (let j = 0, k = data.length; j < k; j++) { %}\n \t\t\t\t{%\n \t\t\t\t\tconst row = data[j];\n \n \t\t\t\t\tlet row_class = \"\";\n \t\t\t\t\tif (!(row.parent_account || row.parent_section)) {\n \t\t\t\t\t\trow_class = \"financial-statements-important\";\n \t\t\t\t\t}\n \t\t\t\t\tif (!(row.account_name || row.section)) {\n \t\t\t\t\t\trow_class += \" financial-statements-blank-row\";\n \t\t\t\t\t}\n \t\t\t\t%}\n \n \t\t\t\t\n \t\t\t\t\t{% for (let i = 0, l = report_columns.length; i < l; i++) { %}\n \t\t\t\t\t\t{%\n \t\t\t\t\t\t\tconst col = report_columns[i];\n \t\t\t\t\t\t\tconst value = row[col.fieldname];\n \t\t\t\t\t\t\tconst align = i === 0 ? \"text-left\" : \"text-right\";\n \t\t\t\t\t\t%}\n \n \t\t\t\t\t\t\n \t\t\t\t\t{% } %}\n \t\t\t\t\n \t\t\t{% } %}\n \t\t\n \t
\n \t\t\t\t\t\t{%= col.label %}\n \t\t\t\t\t
\n \t\t\t\t\t\t\t{% if (i === 0) { %}\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t{%= String(row.account_name || row.section || \"\").replace(/^['\"]|['\"]$/g, \"\") %}\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t{% } else if (!is_null(value)) { %}\n \t\t\t\t\t\t\t\t{%= frappe.format(value, col, {}, row) %}\n \t\t\t\t\t\t\t{% } %}\n \t\t\t\t\t\t
\n
\n\n\t

\n\t\t{%= __(\"Printed on {0}\", [\n\t\t\tfrappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())\n\t\t]) %}\n\t

\n\n
", + "idx": 0, + "line_breaks": 0, + "margin_bottom": 15.0, + "margin_left": 15.0, + "margin_right": 15.0, + "margin_top": 15.0, + "modified": "2026-05-06 17:42:07.113775", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Cash Flow Statement Standard", + "owner": "Administrator", + "page_number": "Hide", + "pdf_generator": "chrome", + "print_format_builder": 0, + "print_format_builder_beta": 0, + "print_format_for": "Report", + "print_format_type": "JS", + "raw_printing": 0, + "report": "Cash Flow", + "show_section_headings": 0, + "standard": "Yes" +} diff --git a/erpnext/accounts/print_format/p&l_statement_standard/__init__.py b/erpnext/accounts/print_format/p&l_statement_standard/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/print_format/p&l_statement_standard/p&l_statement_standard.json b/erpnext/accounts/print_format/p&l_statement_standard/p&l_statement_standard.json new file mode 100644 index 00000000000..b1a379b0b47 --- /dev/null +++ b/erpnext/accounts/print_format/p&l_statement_standard/p&l_statement_standard.json @@ -0,0 +1,33 @@ +{ + "absolute_value": 0, + "align_labels_right": 0, + "creation": "2026-03-31 00:39:51.067431", + "custom_format": 1, + "default_print_language": "en", + "disabled": 0, + "docstatus": 0, + "doctype": "Print Format", + "font_size": 14, + "html": "{%\n\tconst report_columns = report\n\t\t.get_columns_for_print()\n\t\t.filter(col => !col.hidden);\n\n\tif (report_columns.length > 8) {\n\t\tfrappe.throw(\n\t\t\t__(\"Too many columns. Export the report and print it using a spreadsheet application.\")\n\t\t);\n\t}\n%}\n\n\n\n
\n\n\t
\n\t\t
\n\t\t\t{%= __(report.report_name) %}\n\t\t
\n\t
\n\n {% if (subtitle && subtitle.trim()) { %}\n
\n {{ subtitle }}\n
\n {% } else { %}\n
\n
\n
\n {%= __(\"Company\") %}: {%= filters.company %}\n
\n
\n {%= __(\"Currency\") %}:\n {%= filters.presentation_currency || erpnext.get_currency(filters.company) %}\n
\n
\n\n
\n
\n {%= __(\"Period Based On\") %}:\n {%= filters.filter_based_on %}\n
\n\n {% if (filters.filter_based_on === \"Fiscal Year\") { %}\n
\n {%= __(\"Start Year\") %}: {%= filters.from_fiscal_year %}\n
\n
\n {%= __(\"End Year\") %}: {%= filters.to_fiscal_year %}\n
\n\n {% } else if (filters.filter_based_on === \"Date Range\") { %}\n
\n {%= __(\"Start Date\") %}:\n {%= frappe.datetime.str_to_user(filters.period_start_date) %}\n
\n
\n {%= __(\"End Date\") %}:\n {%= frappe.datetime.str_to_user(filters.period_end_date) %}\n
\n {% } %}\n
\n
\n {% } %}\n\n\t
\n \t\n \t\t\n \t\t\t\n \t\t\t\t{% for (let i = 0, l = report_columns.length; i < l; i++) { %}\n \t\t\t\t\t{%\n \t\t\t\t\t\tconst col = report_columns[i];\n \t\t\t\t\t\tconst align = i === 0 ? \"text-left\" : \"text-right\";\n \t\t\t\t\t%}\n \t\t\t\t\t\n \t\t\t\t{% } %}\n \t\t\t\n \t\t\n \n \t\t\n \t\t\t{% for (let j = 0, k = data.length; j < k; j++) { %}\n \t\t\t\t{%\n \t\t\t\t\tconst row = data[j];\n \n \t\t\t\t\tlet row_class = \"\";\n \t\t\t\t\tif (!(row.parent_account || row.parent_section)) {\n \t\t\t\t\t\trow_class = \"financial-statements-important\";\n \t\t\t\t\t}\n \t\t\t\t\tif (!(row.account_name || row.section)) {\n \t\t\t\t\t\trow_class += \" financial-statements-blank-row\";\n \t\t\t\t\t}\n \t\t\t\t%}\n \n \t\t\t\t\n \t\t\t\t\t{% for (let i = 0, l = report_columns.length; i < l; i++) { %}\n \t\t\t\t\t\t{%\n \t\t\t\t\t\t\tconst col = report_columns[i];\n \t\t\t\t\t\t\tconst value = row[col.fieldname];\n \t\t\t\t\t\t\tconst align = i === 0 ? \"text-left\" : \"text-right\";\n \t\t\t\t\t\t%}\n \n \t\t\t\t\t\t\n \t\t\t\t\t{% } %}\n \t\t\t\t\n \t\t\t{% } %}\n \t\t\n \t
\n \t\t\t\t\t\t{%= col.label %}\n \t\t\t\t\t
\n \t\t\t\t\t\t\t{% if (i === 0) { %}\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t{%= String(row.account_name || row.section || \"\").replace(/^['\"]|['\"]$/g, \"\") %}\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t{% } else if (!is_null(value)) { %}\n \t\t\t\t\t\t\t\t{%= frappe.format(value, col, {}, row) %}\n \t\t\t\t\t\t\t{% } %}\n \t\t\t\t\t\t
\n
\n\n\t

\n\t\t{%= __(\"Printed on {0}\", [\n\t\t\tfrappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())\n\t\t]) %}\n\t

\n\n
", + "idx": 0, + "line_breaks": 0, + "margin_bottom": 15.0, + "margin_left": 15.0, + "margin_right": 15.0, + "margin_top": 15.0, + "modified": "2026-05-06 17:42:47.344321", + "modified_by": "Administrator", + "module": "Accounts", + "name": "P&L Statement Standard", + "owner": "Administrator", + "page_number": "Hide", + "pdf_generator": "chrome", + "print_format_builder": 0, + "print_format_builder_beta": 0, + "print_format_for": "Report", + "print_format_type": "JS", + "raw_printing": 0, + "report": "Profit and Loss Statement", + "show_section_headings": 0, + "standard": "Yes" +} diff --git a/erpnext/accounts/print_format/trial_balance_standard/__init__.py b/erpnext/accounts/print_format/trial_balance_standard/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/print_format/trial_balance_standard/trial_balance_standard.json b/erpnext/accounts/print_format/trial_balance_standard/trial_balance_standard.json new file mode 100644 index 00000000000..019f59be876 --- /dev/null +++ b/erpnext/accounts/print_format/trial_balance_standard/trial_balance_standard.json @@ -0,0 +1,33 @@ +{ + "absolute_value": 0, + "align_labels_right": 0, + "creation": "2026-03-31 01:22:21.137577", + "custom_format": 1, + "default_print_language": "en", + "disabled": 0, + "docstatus": 0, + "doctype": "Print Format", + "font_size": 14, + "html": "{%\n\tconst report_columns = report\n\t\t.get_columns_for_print()\n\t\t.filter(col => !col.hidden);\n\n\tif (report_columns.length > 8) {\n\t\tfrappe.throw(\n\t\t\t__(\"Too many columns. Export the report and print it using a spreadsheet application.\")\n\t\t);\n\t}\n%}\n\n\n\n
\n\n\t
\n\t\t
\n\t\t\t{%= __(report.report_name) %}\n\t\t
\n\t
\n\n {% if (subtitle && subtitle.trim()) { %}\n
\n {{ subtitle }}\n
\n {% } else { %}\n
\n
\n
\n {%= __(\"Company\") %}: {%= filters.company %}\n
\n
\n {%= __(\"Currency\") %}:\n {%= filters.presentation_currency || erpnext.get_currency(filters.company) %}\n
\n
\n\n
\n
\n {%= __(\"From Date\") %}:\n {%= frappe.datetime.str_to_user(filters.from_date) %}\n
\n
\n {%= __(\"To Date\") %}:\n {%= frappe.datetime.str_to_user(filters.to_date) %}\n
\n
\n
\n {% } %}\n\n\t
\n \t\n \t\t\n \t\t\t\n \t\t\t\t{% for (let i = 0, l = report_columns.length; i < l; i++) { %}\n \t\t\t\t\t{%\n \t\t\t\t\t\tconst col = report_columns[i];\n \t\t\t\t\t\tconst align = i === 0 ? \"text-left\" : \"text-right\";\n \t\t\t\t\t\tconst styling = i === 0 ? \"\" : \"width: 9em\";\n \t\t\t\t\t%}\n \t\t\t\t\t\n \t\t\t\t{% } %}\n \t\t\t\n \t\t\n\n \t\t\n \t\t\t{% for (let j = 0, k = data.length; j < k; j++) { %}\n \t\t\t\t{%\n \t\t\t\t\tconst row = data[j];\n\n \t\t\t\t\tlet row_class = \"\";\n \t\t\t\t\tif (!(row.parent_account || row.parent_section)) {\n \t\t\t\t\t\trow_class = \"financial-statements-important\";\n \t\t\t\t\t}\n \t\t\t\t\tif (!(row.account_name || row.section)) {\n \t\t\t\t\t\trow_class += \" financial-statements-blank-row\";\n \t\t\t\t\t}\n \t\t\t\t%}\n\n \t\t\t\t\n \t\t\t\t\t{% for (let i = 0, l = report_columns.length; i < l; i++) { %}\n \t\t\t\t\t\t{%\n \t\t\t\t\t\t\tconst col = report_columns[i];\n \t\t\t\t\t\t\tconst value = row[col.fieldname];\n \t\t\t\t\t\t\tconst align = i === 0 ? \"text-left\" : \"text-right\";\n \t\t\t\t\t\t%}\n\n \t\t\t\t\t\t\n \t\t\t\t\t{% } %}\n \t\t\t\t\n \t\t\t{% } %}\n \t\t\n \t
\n \t\t\t\t\t\t{%= col.label %}\n \t\t\t\t\t
\n \t\t\t\t\t\t\t{% if (i === 0) { %}\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t{%= String(row.account_name || row.section || \"\").replace(/^['\"]|['\"]$/g, \"\") %}\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t{% } else if (!is_null(value)) { %}\n \t\t\t\t\t\t\t\t{%= frappe.format(value, col, {}, row) %}\n \t\t\t\t\t\t\t{% } %}\n \t\t\t\t\t\t
\n
\n\n\t

\n\t\t{%= __(\"Printed on {0}\", [\n\t\t\tfrappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())\n\t\t]) %}\n\t

\n\n
", + "idx": 0, + "line_breaks": 0, + "margin_bottom": 15.0, + "margin_left": 15.0, + "margin_right": 15.0, + "margin_top": 15.0, + "modified": "2026-04-24 12:40:37.484173", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Trial Balance Standard", + "owner": "Administrator", + "page_number": "Hide", + "pdf_generator": "chrome", + "print_format_builder": 0, + "print_format_builder_beta": 0, + "print_format_for": "Report", + "print_format_type": "JS", + "raw_printing": 0, + "report": "Trial Balance", + "show_section_headings": 0, + "standard": "Yes" +} 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.") + ); + } +%} + + + +
+ +
+
+ {%= __(report.report_name) %} +
+
+ + {% if (subtitle && subtitle.trim()) { %} +
+ {{ subtitle }} +
+ {% } else { %} +
+
+
+ {%= __("Company") %}: {%= filters.company %} +
+
+ {%= __("Currency") %}: + {%= filters.presentation_currency || erpnext.get_currency(filters.company) %} +
+
+ +
+
+ {%= __("Period Based On") %}: + {%= filters.filter_based_on %} +
+ + {% if (filters.filter_based_on === "Fiscal Year") { %} +
+ {%= __("Start Year") %}: {%= filters.from_fiscal_year %} +
+
+ {%= __("End Year") %}: {%= filters.to_fiscal_year %} +
+ + {% } else if (filters.filter_based_on === "Date Range") { %} +
+ {%= __("Start Date") %}: + {%= frappe.datetime.str_to_user(filters.period_start_date) %} +
+
+ {%= __("End Date") %}: + {%= frappe.datetime.str_to_user(filters.period_end_date) %} +
+ {% } %} +
+
+ {% } %} + +
+ + + + {% for (let i = 0, l = report_columns.length; i < l; i++) { %} + {% + const col = report_columns[i]; + const align = i === 0 ? "text-left" : "text-right"; + %} + + {% } %} + + + + + {% for (let j = 0, k = data.length; j < k; j++) { %} + {% + const row = data[j]; + + let row_class = ""; + if (!(row.parent_account || row.parent_section)) { + row_class = "financial-statements-important"; + } + if (!(row.account_name || row.section)) { + row_class += " financial-statements-blank-row"; + } + %} + + + {% for (let i = 0, l = report_columns.length; i < l; i++) { %} + {% + const col = report_columns[i]; + const value = row[col.fieldname]; + const align = i === 0 ? "text-left" : "text-right"; + %} + + + {% } %} + + {% } %} + +
+ {%= 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()) + ]) %} +

+ +
\ No newline at end of file diff --git a/erpnext/accounts/report/cash_flow/cash_flow.html b/erpnext/accounts/report/cash_flow/cash_flow.html index d4ae54d4f38..6b11aea5e54 100644 --- a/erpnext/accounts/report/cash_flow/cash_flow.html +++ b/erpnext/accounts/report/cash_flow/cash_flow.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.") + ); + } +%} + + + +
+ +
+
+ {%= __(report.report_name) %} +
+
+ + {% if (subtitle && subtitle.trim()) { %} +
+ {{ subtitle }} +
+ {% } else { %} +
+
+
+ {%= __("Company") %}: {%= filters.company %} +
+
+ {%= __("Currency") %}: + {%= filters.presentation_currency || erpnext.get_currency(filters.company) %} +
+
+ +
+
+ {%= __("Period Based On") %}: + {%= filters.filter_based_on %} +
+ + {% if (filters.filter_based_on === "Fiscal Year") { %} +
+ {%= __("Start Year") %}: {%= filters.from_fiscal_year %} +
+
+ {%= __("End Year") %}: {%= filters.to_fiscal_year %} +
+ + {% } else if (filters.filter_based_on === "Date Range") { %} +
+ {%= __("Start Date") %}: + {%= frappe.datetime.str_to_user(filters.period_start_date) %} +
+
+ {%= __("End Date") %}: + {%= frappe.datetime.str_to_user(filters.period_end_date) %} +
+ {% } %} +
+
+ {% } %} + +
+ + + + {% for (let i = 0, l = report_columns.length; i < l; i++) { %} + {% + const col = report_columns[i]; + const align = i === 0 ? "text-left" : "text-right"; + %} + + {% } %} + + + + + {% for (let j = 0, k = data.length; j < k; j++) { %} + {% + const row = data[j]; + + let row_class = ""; + if (!(row.parent_account || row.parent_section)) { + row_class = "financial-statements-important"; + } + if (!(row.account_name || row.section)) { + row_class += " financial-statements-blank-row"; + } + %} + + + {% for (let i = 0, l = report_columns.length; i < l; i++) { %} + {% + const col = report_columns[i]; + const value = row[col.fieldname]; + const align = i === 0 ? "text-left" : "text-right"; + %} + + + {% } %} + + {% } %} + +
+ {%= 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()) + ]) %} +

+ +
\ No newline at end of file diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.html b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.html index d4ae54d4f38..6b11aea5e54 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.html +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.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.") + ); + } +%} + + + +
+ +
+
+ {%= __(report.report_name) %} +
+
+ + {% if (subtitle && subtitle.trim()) { %} +
+ {{ subtitle }} +
+ {% } else { %} +
+
+
+ {%= __("Company") %}: {%= filters.company %} +
+
+ {%= __("Currency") %}: + {%= filters.presentation_currency || erpnext.get_currency(filters.company) %} +
+
+ +
+
+ {%= __("Period Based On") %}: + {%= filters.filter_based_on %} +
+ + {% if (filters.filter_based_on === "Fiscal Year") { %} +
+ {%= __("Start Year") %}: {%= filters.from_fiscal_year %} +
+
+ {%= __("End Year") %}: {%= filters.to_fiscal_year %} +
+ + {% } else if (filters.filter_based_on === "Date Range") { %} +
+ {%= __("Start Date") %}: + {%= frappe.datetime.str_to_user(filters.period_start_date) %} +
+
+ {%= __("End Date") %}: + {%= frappe.datetime.str_to_user(filters.period_end_date) %} +
+ {% } %} +
+
+ {% } %} + +
+ + + + {% for (let i = 0, l = report_columns.length; i < l; i++) { %} + {% + const col = report_columns[i]; + const align = i === 0 ? "text-left" : "text-right"; + %} + + {% } %} + + + + + {% for (let j = 0, k = data.length; j < k; j++) { %} + {% + const row = data[j]; + + let row_class = ""; + if (!(row.parent_account || row.parent_section)) { + row_class = "financial-statements-important"; + } + if (!(row.account_name || row.section)) { + row_class += " financial-statements-blank-row"; + } + %} + + + {% for (let i = 0, l = report_columns.length; i < l; i++) { %} + {% + const col = report_columns[i]; + const value = row[col.fieldname]; + const align = i === 0 ? "text-left" : "text-right"; + %} + + + {% } %} + + {% } %} + +
+ {%= 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()) + ]) %} +

+ +
\ No newline at end of file diff --git a/erpnext/accounts/report/trial_balance/trial_balance.html b/erpnext/accounts/report/trial_balance/trial_balance.html index d4ae54d4f38..f3f029abcdd 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.html +++ b/erpnext/accounts/report/trial_balance/trial_balance.html @@ -1 +1,215 @@ -{% 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.") + ); + } +%} + + + +
+ +
+
+ {%= __(report.report_name) %} +
+
+ + {% if (subtitle && subtitle.trim()) { %} +
+ {{ subtitle }} +
+ {% } else { %} +
+
+
+ {%= __("Company") %}: {%= filters.company %} +
+
+ {%= __("Currency") %}: + {%= filters.presentation_currency || erpnext.get_currency(filters.company) %} +
+
+ +
+
+ {%= __("From Date") %}: + {%= frappe.datetime.str_to_user(filters.from_date) %} +
+
+ {%= __("To Date") %}: + {%= frappe.datetime.str_to_user(filters.to_date) %} +
+
+
+ {% } %} + +
+ + + + {% for (let i = 0, l = report_columns.length; i < l; i++) { %} + {% + const col = report_columns[i]; + const align = i === 0 ? "text-left" : "text-right"; + const styling = i === 0 ? "" : "width: 9em"; + %} + + {% } %} + + + + + {% for (let j = 0, k = data.length; j < k; j++) { %} + {% + const row = data[j]; + + let row_class = ""; + if (!(row.parent_account || row.parent_section)) { + row_class = "financial-statements-important"; + } + if (!(row.account_name || row.section)) { + row_class += " financial-statements-blank-row"; + } + %} + + + {% for (let i = 0, l = report_columns.length; i < l; i++) { %} + {% + const col = report_columns[i]; + const value = row[col.fieldname]; + const align = i === 0 ? "text-left" : "text-right"; + %} + + + {% } %} + + {% } %} + +
+ {%= 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()) + ]) %} +

+ +
\ No newline at end of file