From 3ba36212b01b516b23094d3e267aa8397be181dd Mon Sep 17 00:00:00 2001 From: Shllokkk Date: Tue, 24 Mar 2026 13:16:15 +0530 Subject: [PATCH 1/4] refactor: clean and standardize print template for general ledger report --- .../report/general_ledger/general_ledger.html | 333 ++++++++++-------- 1 file changed, 194 insertions(+), 139 deletions(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.html b/erpnext/accounts/report/general_ledger/general_ledger.html index a3fb35ed576..4d744c4da55 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.html +++ b/erpnext/accounts/report/general_ledger/general_ledger.html @@ -1,51 +1,84 @@ - -
-
-
-
- - {%= __("STATEMENT OF ACCOUNTS") %}
- {% if (filters.party_name) { %} -
{%= filters.party_name %} - {% } else if (filters.party && filters.party.length) { %} -
{%= filters.party %} - {% } else if (filters.account) { %} -
{%= filters.account %} - {% } else { %} -
{%= __("All Parties ") %} - {% } %} -
-
-
- - {%= __("{0} to {1}", [frappe.datetime.str_to_user(filters.from_date), frappe.datetime.str_to_user(filters.to_date)]) %}

-
-
-
-
- {% if subtitle %} - {{ subtitle }} -
- {% endif %} -
- - - - - - {% if(filters.show_remarks) { %} - - {% } %} - - - - - - + +
+ +
+ + +
+ {%= __("STATEMENT OF ACCOUNTS") %} +
+ + +
+ {% if (filters.party_name) { %} + {%= filters.party_name %} + {% } else if (filters.party && filters.party.length) { %} + {%= filters.party %} + {% } else if (filters.account) { %} + {%= filters.account %} + {% } else { %} + {%= __("All Parties") %} + {% } %} +
+ + +
+ {%= __("{0} to {1}", [ + frappe.datetime.str_to_user(filters.from_date), + frappe.datetime.str_to_user(filters.to_date) + ]) %} +
+ +
+ + +
+ {% if subtitle %} + {{ subtitle }} + {% endif %} + +
+ + +
{%= __("Date").toLocaleUpperCase() %}{%= __("Particulars").toLocaleUpperCase() %}{%= __("Remarks").toLocaleUpperCase() %}{%= __("Debit").toLocaleUpperCase() %}{%= __("Credit").toLocaleUpperCase() %}{%= __("Balance").toLocaleUpperCase() %}
+ + + + + + {% if(filters.show_remarks) { %} + + {% } %} + + + + + + + + {% for(var i=0, l=data.length; i - {% if(data[i].posting_date) { %} - - - {% if(filters.show_remarks) { %} - + {% var row = data[i]; %} + + + + + + + - - {% } else { %} - - - {% if(filters.show_remarks) { %} {% } %} - - + + + {% if(filters.show_remarks) { %} + {% } %} - {% if(i == l-1) { %} - - {% } else { %} - + + + + + + + + + + - {% endfor%} - -
{%= __("Date").toLocaleUpperCase() %}{%= __("Particulars").toLocaleUpperCase() %}{%= __("Remarks").toLocaleUpperCase() %}{%= __("Debit").toLocaleUpperCase() %}{%= __("Credit").toLocaleUpperCase() %}{%= __("Balance").toLocaleUpperCase() %}
- {%= frappe.datetime.str_to_user(data[i].posting_date) %} - - {%= data[i].voucher_type %} {%= data[i].voucher_no %} - {% if(!(filters.party || filters.account)) { %} - {%= data[i].party || data[i].account %} - {% } %}
- {% if(data[i].bill_no) { %} - {%= __("Supplier Invoice No") %}: {%= data[i].bill_no %} - {% } %} -
- {% if(data[i].remarks != "No Remarks" && data[i].remarks != "") { %} - {%= __("Remarks") %}: {%= data[i].remarks %}
- {% } %} -
+ {% if(row.posting_date) { %} + {%= frappe.datetime.str_to_user(row.posting_date) %} + {% } else if(i == 0) { %} + {%= frappe.datetime.str_to_user(filters.from_date) %} {% } %} - - {% if data[i].debit != 0 %} - {%= format_currency(data[i].debit, filters.presentation_currency) %} + + {% if(row.posting_date) { %} + {%= row.voucher_type %} {%= row.voucher_no %} + {% if(!(filters.party || filters.account)) { %} + {%= row.party || row.account %} + {% } %}
+ + {% if(row.bill_no) { %} + {%= __("Supplier Invoice No") %}: {%= row.bill_no %} {% } %} -
- {% if data[i].credit != 0 %} - {%= format_currency(data[i].credit, filters.presentation_currency) %} - {% } %} - - {% if(i == 0) { %} - {%= frappe.datetime.str_to_user(filters.from_date) %} - {% } %} - + + {% } else { %} {% if(i == l-2) { %} {%= __("Total") %} + {% } else if(i == l-1) { %} + {%= __("Closing [Opening + Total] ") %} {% } else { %} - {% if(i == l-1) { %} - {%= __("Closing [Opening + Total] ") %} - {% } else { %} - {%= frappe.format(data[i].account, {fieldtype: "Link"}) || " " %} - {% } %} - {% } %} - - {% if(i != 0){ %} - {% if(i != l-1){ %} - {%= data[i].account && format_currency(data[i].debit, filters.presentation_currency) %} - {% } %} + {%= frappe.format(row.account, {fieldtype: "Link"}) || " " %} {% } %} - - {% if(i != 0){ %} - {% if(i != l-1){ %} - {%= data[i].account && format_currency(data[i].credit, filters.presentation_currency) %} - {% } %} + {% } %} + + {% if(row.posting_date && row.remarks != "No Remarks" && row.remarks != "") { %} + {%= row.remarks %} {% } %} - {%= format_currency(data[i].balance, filters.presentation_currency) %} - {% if(data[i].balance < 0){ %}Cr{% } %} - {% if(data[i].balance > 0){ %}Dr{% } %} - - {% if(i != l-2) { %} - {%= format_currency(data[i].balance, filters.presentation_currency) %} - {% } %} - + {% if(row.posting_date) { %} + {% if(row.debit != 0) { %} + {%= format_currency(row.debit, filters.presentation_currency) %} + {% } %} + {% } else if(i != 0 && i != l-1) { %} + {%= row.account && format_currency(row.debit, filters.presentation_currency) %} {% } %} + + {% if(row.posting_date) { %} + {% if(row.credit != 0) { %} + {%= format_currency(row.credit, filters.presentation_currency) %} + {% } %} + {% } else if(i != 0 && i != l-1) { %} + {%= row.account && format_currency(row.credit, filters.presentation_currency) %} + {% } %} + + {% if(i == l-1) { %} + {%= format_currency(row.balance, filters.presentation_currency) %} + {% if(row.balance < 0){ %}Cr{% } %} + {% if(row.balance > 0){ %}Dr{% } %} + {% } else if(i != l-2) { %} + {%= format_currency(row.balance, filters.presentation_currency) %} + {% } %} +
-

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

-
+ {% endfor %} + + + +

+ {%= __("Printed on {0}", [ + frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) + ]) %} +

+ \ No newline at end of file From 9660debe28e0c1fccefe9073b135459cd158268f Mon Sep 17 00:00:00 2001 From: Shllokkk Date: Tue, 24 Mar 2026 15:55:45 +0530 Subject: [PATCH 2/4] fix: improve filter details render logic to avoid showing duplicate information --- .../general_ledger_standard/__init__.py | 0 .../general_ledger_standard.json | 33 ++ .../report/general_ledger/general_ledger.html | 368 ++++++++++-------- 3 files changed, 228 insertions(+), 173 deletions(-) create mode 100644 erpnext/accounts/print_format/general_ledger_standard/__init__.py create mode 100644 erpnext/accounts/print_format/general_ledger_standard/general_ledger_standard.json diff --git a/erpnext/accounts/print_format/general_ledger_standard/__init__.py b/erpnext/accounts/print_format/general_ledger_standard/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/print_format/general_ledger_standard/general_ledger_standard.json b/erpnext/accounts/print_format/general_ledger_standard/general_ledger_standard.json new file mode 100644 index 00000000000..da4fe92a006 --- /dev/null +++ b/erpnext/accounts/print_format/general_ledger_standard/general_ledger_standard.json @@ -0,0 +1,33 @@ +{ + "absolute_value": 0, + "align_labels_right": 0, + "creation": "2026-03-25 00:31:49.971580", + "custom_format": 1, + "default_print_language": "en", + "disabled": 0, + "docstatus": 0, + "doctype": "Print Format", + "font_size": 14, + "html": "\n\n
\n\n
\n\n
\n
\n {%= __(\"STATEMENT OF ACCOUNTS\") %}\n
\n
\n\n {% if (subtitle && subtitle.trim()) { %}\n
\n {{ subtitle }}\n
\n {% } else { %}\n
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{%= __(\"Customer\") %}:\n\t\t\t\t\t{%= \n\t\t\t\t\t\t(filters.party.length && filters.party.join(\", \")) || filters.party_name || \"All Parties\"\n\t\t\t\t\t%}\n\t\t\t\t
\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{%= __(\"Statement Period\") %}:\n\t\t\t\t\t{%= __(\"{0} to {1}\", [\n\t\t\t\t\t\tfrappe.datetime.str_to_user(filters.from_date),\n\t\t\t\t\t\tfrappe.datetime.str_to_user(filters.to_date)\n\t\t\t\t\t]) %}\n\t\t\t\t
\n\t\t\t
\n\t\t
\n {% } %}\n\n
\n \n \n \n \n \n\n {% if(filters.show_remarks) { %}\n \n {% } %}\n\n \n \n \n \n \n\n \n {% for(var i=0, l=data.length; i\n\n \n\n \n\n {% if(filters.show_remarks) { %}\n \n {% } %}\n\n \n\n \n\n \n\n \n {% endfor %}\n \n
{%= __(\"Date\") %}{%= __(\"Voucher Details\") %}{%= __(\"Remarks\") %}{%= __(\"Debit\") %}{%= __(\"Credit\") %}{%= __(\"Balance\") %}
\n {% if(row.posting_date) { %}\n {%= frappe.datetime.str_to_user(row.posting_date) %}\n {% } else if(i == 0) { %}\n {%= frappe.datetime.str_to_user(filters.from_date) %}\n {% } %}\n \n {% if(row.posting_date) { %}\n {%= row.voucher_type %} {%= row.voucher_no %}\n\n {% if(!(filters.party || filters.account)) { %}\n
\n {%= row.party || row.account %}\n
\n {% } %}\n\n {% if(row.bill_no) { %}\n
\n {%= __(\"Supplier Invoice No\") %}: {%= row.bill_no %}\n
\n {% } %}\n\n {% } else { %}\n {% if(i == l-2) { %}\n {%= __(\"Total\") %}\n {% } else if(i == l-1) { %}\n {%= __(\"Closing [Opening + Total] \") %}\n {% } else { %}\n {%= frappe.format(row.account, {fieldtype: \"Link\"}) || \" \" %}\n {% } %}\n {% } %}\n
\n {% if(row.posting_date && row.remarks && row.remarks != \"No Remarks\") { %}\n {%= row.remarks %}\n {% } %}\n \n {% if(row.posting_date) { %}\n {% if(row.debit != 0) { %}\n {%= format_currency(row.debit, filters.presentation_currency) %}\n {% } %}\n {% } else if(i != 0 && i != l-1) { %}\n {%= row.account && format_currency(row.debit, filters.presentation_currency) %}\n {% } %}\n \n {% if(row.posting_date) { %}\n {% if(row.credit != 0) { %}\n {%= format_currency(row.credit, filters.presentation_currency) %}\n {% } %}\n {% } else if(i != 0 && i != l-1) { %}\n {%= row.account && format_currency(row.credit, filters.presentation_currency) %}\n {% } %}\n \n {% if(i == l-1) { %}\n {%= format_currency(row.balance, filters.presentation_currency) %}\n {% if(row.balance < 0){ %} Cr{% } %}\n {% if(row.balance > 0){ %} Dr{% } %}\n {% } else { %}\n {%= format_currency(row.balance, filters.presentation_currency) %}\n {% } %}\n
\n
\n\n

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

\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-03-26 12:02:00.022093", + "modified_by": "Administrator", + "module": "Accounts", + "name": "General Ledger 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": "General Ledger", + "show_section_headings": 0, + "standard": "Yes" +} diff --git a/erpnext/accounts/report/general_ledger/general_ledger.html b/erpnext/accounts/report/general_ledger/general_ledger.html index 4d744c4da55..cb3fdddac73 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.html +++ b/erpnext/accounts/report/general_ledger/general_ledger.html @@ -1,68 +1,95 @@ \n\n
\n\n
\n\n
\n
\n {%= __(\"STATEMENT OF ACCOUNTS\") %}\n
\n
\n\n {% if (subtitle && subtitle.trim()) { %}\n
\n {{ subtitle }}\n
\n {% } else { %}\n
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{%= __(\"Customer\") %}:\n\t\t\t\t\t{%= \n\t\t\t\t\t\t(filters.party.length && filters.party.join(\", \")) || filters.party_name || \"All Parties\"\n\t\t\t\t\t%}\n\t\t\t\t
\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{%= __(\"Statement Period\") %}:\n\t\t\t\t\t{%= __(\"{0} to {1}\", [\n\t\t\t\t\t\tfrappe.datetime.str_to_user(filters.from_date),\n\t\t\t\t\t\tfrappe.datetime.str_to_user(filters.to_date)\n\t\t\t\t\t]) %}\n\t\t\t\t
\n\t\t\t
\n\t\t
\n {% } %}\n\n
\n \n \n \n \n \n\n {% if(filters.show_remarks) { %}\n \n {% } %}\n\n \n \n \n \n \n\n \n {% for(var i=0, l=data.length; i\n\n \n\n \n\n {% if(filters.show_remarks) { %}\n \n {% } %}\n\n \n\n \n\n \n\n \n {% endfor %}\n \n
{%= __(\"Date\") %}{%= __(\"Voucher Details\") %}{%= __(\"Remarks\") %}{%= __(\"Debit\") %}{%= __(\"Credit\") %}{%= __(\"Balance\") %}
\n {% if(row.posting_date) { %}\n {%= frappe.datetime.str_to_user(row.posting_date) %}\n {% } else if(i == 0) { %}\n {%= frappe.datetime.str_to_user(filters.from_date) %}\n {% } %}\n \n {% if(row.posting_date) { %}\n {%= row.voucher_type %} {%= row.voucher_no %}\n\n {% if(!(filters.party || filters.account)) { %}\n
\n {%= row.party || row.account %}\n
\n {% } %}\n\n {% if(row.bill_no) { %}\n
\n {%= __(\"Supplier Invoice No\") %}: {%= row.bill_no %}\n
\n {% } %}\n\n {% } else { %}\n {% if(i == l-2) { %}\n {%= __(\"Total\") %}\n {% } else if(i == l-1) { %}\n {%= __(\"Closing [Opening + Total] \") %}\n {% } else { %}\n {%= frappe.format(row.account, {fieldtype: \"Link\"}) || \" \" %}\n {% } %}\n {% } %}\n
\n {% if(row.posting_date && row.remarks && row.remarks != \"No Remarks\") { %}\n {%= row.remarks %}\n {% } %}\n \n {% if(row.posting_date) { %}\n {% if(row.debit != 0) { %}\n {%= format_currency(row.debit, filters.presentation_currency) %}\n {% } %}\n {% } else if(i != 0 && i != l-1) { %}\n {%= row.account && format_currency(row.debit, filters.presentation_currency) %}\n {% } %}\n \n {% if(row.posting_date) { %}\n {% if(row.credit != 0) { %}\n {%= format_currency(row.credit, filters.presentation_currency) %}\n {% } %}\n {% } else if(i != 0 && i != l-1) { %}\n {%= row.account && format_currency(row.credit, filters.presentation_currency) %}\n {% } %}\n \n {% if(i == l-1) { %}\n {%= format_currency(row.balance, filters.presentation_currency) %}\n {% if(row.balance < 0){ %} Cr{% } %}\n {% if(row.balance > 0){ %} Dr{% } %}\n {% } else { %}\n {%= format_currency(row.balance, filters.presentation_currency) %}\n {% } %}\n
\n
\n\n

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

\n\n
", + "html": "\n\n
\n\n
\n\n
\n
\n {%= __(\"Statement Of Accounts\") %}\n
\n
\n\n {% if (subtitle && subtitle.trim()) { %}\n
\n {{ subtitle }}\n
\n {% } else { %}\n
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{%= __(\"Customer\") %}:\n\t\t\t\t\t{%=\n\t\t\t\t\t\t(filters.party.length && filters.party.join(\", \")) || filters.party_name || \"All Parties\"\n\t\t\t\t\t%}\n\t\t\t\t
\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{%= __(\"Statement Period\") %}:\n\t\t\t\t\t{%= __(\"{0} to {1}\", [\n\t\t\t\t\t\tfrappe.datetime.str_to_user(filters.from_date),\n\t\t\t\t\t\tfrappe.datetime.str_to_user(filters.to_date)\n\t\t\t\t\t]) %}\n\t\t\t\t
\n\t\t\t
\n\t\t
\n {% } %}\n\n
\n \n \n \n \n \n\n {% if(filters.show_remarks) { %}\n \n {% } %}\n\n \n \n \n \n \n\n \n\t\t\t\t{% for(var i=0, l=data.length; i\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t{% if(filters.show_remarks) { %}\n\t\t\t\t\t\t\n\t\t\t\t\t\t{% } %}\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t{% } %}\n\t\t\t\n
{%= __(\"Date\") %}{%= __(\"Voucher Details\") %}{%= __(\"Remarks\") %}{%= __(\"Debit\") %}{%= __(\"Credit\") %}{%= __(\"Balance\") %}
\n\t\t\t\t\t\t\t{% if(is_entry) { %}\n\t\t\t\t\t\t\t\t{%= frappe.datetime.str_to_user(row.posting_date) %}\n\t\t\t\t\t\t\t{% } else if(i == 0) { %}\n\t\t\t\t\t\t\t\t{%= frappe.datetime.str_to_user(filters.from_date) %}\n\t\t\t\t\t\t\t{% } %}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{% if(is_entry) { %}\n\n\t\t\t\t\t\t\t\t{%= row.voucher_type %} {%= row.voucher_no %}\n\n\t\t\t\t\t\t\t\t{% if(!(filters.party || filters.account)) { %}\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t{%= row.party || row.account %}\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{% } %}\n\n\t\t\t\t\t\t\t\t{% if(row.bill_no) { %}\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t{%= __(\"Supplier Invoice No\") %}: {%= row.bill_no %}\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{% } %}\n\n\t\t\t\t\t\t\t{% } else { %}\n\n\t\t\t\t\t\t\t\t{% if(is_second_last) { %}\n\t\t\t\t\t\t\t\t\t{%= __(\"Total\") %}\n\t\t\t\t\t\t\t\t{% } else if(is_last) { %}\n\t\t\t\t\t\t\t\t\t{%= __(\"Closing [Opening + Total] \") %}\n\t\t\t\t\t\t\t\t{% } else { %}\n\t\t\t\t\t\t\t\t\t{%= frappe.format(row.account, {fieldtype: \"Link\"}) || \" \" %}\n\t\t\t\t\t\t\t\t{% } %}\n\n\t\t\t\t\t\t\t{% } %}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{% if(is_entry && row.remarks && row.remarks != \"No Remarks\") { %}\n\t\t\t\t\t\t\t\t{%= row.remarks %}\n\t\t\t\t\t\t\t{% } %}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{% if(is_entry) { %}\n\t\t\t\t\t\t\t\t{% if(row.debit != 0) { %}\n\t\t\t\t\t\t\t\t\t{%= format_currency(row.debit, filters.presentation_currency) %}\n\t\t\t\t\t\t\t\t{% } %}\n\t\t\t\t\t\t\t{% } else if(i != 0 && !is_last) { %}\n\t\t\t\t\t\t\t\t{%= row.account && format_currency(row.debit, filters.presentation_currency) %}\n\t\t\t\t\t\t\t{% } %}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{% if(is_entry) { %}\n\t\t\t\t\t\t\t\t{% if(row.credit != 0) { %}\n\t\t\t\t\t\t\t\t\t{%= format_currency(row.credit, filters.presentation_currency) %}\n\t\t\t\t\t\t\t\t{% } %}\n\t\t\t\t\t\t\t{% } else if(i != 0 && !is_last) { %}\n\t\t\t\t\t\t\t\t{%= row.account && format_currency(row.credit, filters.presentation_currency) %}\n\t\t\t\t\t\t\t{% } %}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{% if(is_last) { %}\n\t\t\t\t\t\t\t\t{%= format_currency(row.balance, filters.presentation_currency) %}\n\t\t\t\t\t\t\t\t{% if(row.balance < 0) { %} Cr{% } %}\n\t\t\t\t\t\t\t\t{% if(row.balance > 0) { %} Dr{% } %}\n\t\t\t\t\t\t\t{% } else { %}\n\t\t\t\t\t\t\t\t{%= format_currency(row.balance, filters.presentation_currency) %}\n\t\t\t\t\t\t\t{% } %}\n\t\t\t\t\t\t
\n
\n\n

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

\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-03-26 12:02:00.022093", + "modified": "2026-03-26 17:07:36.264246", "modified_by": "Administrator", "module": "Accounts", "name": "General Ledger Standard", diff --git a/erpnext/accounts/report/general_ledger/general_ledger.html b/erpnext/accounts/report/general_ledger/general_ledger.html index cb3fdddac73..c620986bc2c 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.html +++ b/erpnext/accounts/report/general_ledger/general_ledger.html @@ -11,7 +11,7 @@ } .title-letter-spacing { - font-size: 14px; + font-size: 15px; font-weight: 600; color: #171717; } @@ -117,7 +117,7 @@
- {%= __("STATEMENT OF ACCOUNTS") %} + {%= __("Statement Of Accounts") %}
@@ -156,7 +156,7 @@ {%= __("Voucher Details") %} {% if(filters.show_remarks) { %} - {%= __("Remarks") %} + {%= __("Remarks") %} {% } %} {%= __("Debit") %} @@ -166,86 +166,93 @@ - {% for(var i=0, l=data.length; i + {% for(var i=0, l=data.length; i - {% if(row.posting_date) { %} - {%= frappe.datetime.str_to_user(row.posting_date) %} - {% } else if(i == 0) { %} - {%= frappe.datetime.str_to_user(filters.from_date) %} - {% } %} - + - - {% if(row.posting_date) { %} - {%= row.voucher_type %} {%= row.voucher_no %} + + {% if(is_entry) { %} + {%= frappe.datetime.str_to_user(row.posting_date) %} + {% } else if(i == 0) { %} + {%= frappe.datetime.str_to_user(filters.from_date) %} + {% } %} + - {% if(!(filters.party || filters.account)) { %} -
- {%= row.party || row.account %} -
- {% } %} + + {% if(is_entry) { %} - {% if(row.bill_no) { %} -
- {%= __("Supplier Invoice No") %}: {%= row.bill_no %} -
- {% } %} + {%= row.voucher_type %} {%= row.voucher_no %} - {% } else { %} - {% if(i == l-2) { %} - {%= __("Total") %} - {% } else if(i == l-1) { %} - {%= __("Closing [Opening + Total] ") %} - {% } else { %} - {%= frappe.format(row.account, {fieldtype: "Link"}) || " " %} - {% } %} - {% } %} - + {% if(!(filters.party || filters.account)) { %} +
+ {%= row.party || row.account %} +
+ {% } %} - {% if(filters.show_remarks) { %} - - {% if(row.posting_date && row.remarks && row.remarks != "No Remarks") { %} - {%= row.remarks %} - {% } %} - - {% } %} + {% if(row.bill_no) { %} +
+ {%= __("Supplier Invoice No") %}: {%= row.bill_no %} +
+ {% } %} - - {% if(row.posting_date) { %} - {% if(row.debit != 0) { %} - {%= format_currency(row.debit, filters.presentation_currency) %} - {% } %} - {% } else if(i != 0 && i != l-1) { %} - {%= row.account && format_currency(row.debit, filters.presentation_currency) %} - {% } %} - + {% } else { %} - - {% if(row.posting_date) { %} - {% if(row.credit != 0) { %} - {%= format_currency(row.credit, filters.presentation_currency) %} - {% } %} - {% } else if(i != 0 && i != l-1) { %} - {%= row.account && format_currency(row.credit, filters.presentation_currency) %} - {% } %} - + {% if(is_second_last) { %} + {%= __("Total") %} + {% } else if(is_last) { %} + {%= __("Closing [Opening + Total] ") %} + {% } else { %} + {%= frappe.format(row.account, {fieldtype: "Link"}) || " " %} + {% } %} - - {% if(i == l-1) { %} - {%= format_currency(row.balance, filters.presentation_currency) %} - {% if(row.balance < 0){ %} Cr{% } %} - {% if(row.balance > 0){ %} Dr{% } %} - {% } else { %} - {%= format_currency(row.balance, filters.presentation_currency) %} - {% } %} - + {% } %} + - - {% endfor %} - + {% if(filters.show_remarks) { %} + + {% if(is_entry && row.remarks && row.remarks != "No Remarks") { %} + {%= row.remarks %} + {% } %} + + {% } %} + + + {% if(is_entry) { %} + {% if(row.debit != 0) { %} + {%= format_currency(row.debit, filters.presentation_currency) %} + {% } %} + {% } else if(i != 0 && !is_last) { %} + {%= row.account && format_currency(row.debit, filters.presentation_currency) %} + {% } %} + + + + {% if(is_entry) { %} + {% if(row.credit != 0) { %} + {%= format_currency(row.credit, filters.presentation_currency) %} + {% } %} + {% } else if(i != 0 && !is_last) { %} + {%= row.account && format_currency(row.credit, filters.presentation_currency) %} + {% } %} + + + + {% if(is_last) { %} + {%= format_currency(row.balance, filters.presentation_currency) %} + {% if(row.balance < 0) { %} Cr{% } %} + {% if(row.balance > 0) { %} Dr{% } %} + {% } else { %} + {%= format_currency(row.balance, filters.presentation_currency) %} + {% } %} + + + + {% } %} + From e8d08df0448ee4eca2070192cc7a9f7ee79fc1be Mon Sep 17 00:00:00 2001 From: Shllokkk Date: Sat, 11 Apr 2026 23:06:01 +0530 Subject: [PATCH 4/4] fix: changes to gl print template --- erpnext/accounts/report/general_ledger/general_ledger.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.html b/erpnext/accounts/report/general_ledger/general_ledger.html index c620986bc2c..925469e92c8 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.html +++ b/erpnext/accounts/report/general_ledger/general_ledger.html @@ -91,6 +91,10 @@ font-weight: 500; } + .report-subtitle { + margin: 10px 0 14px; + } + @media print { @page { size: A4; @@ -122,7 +126,7 @@ {% if (subtitle && subtitle.trim()) { %} -
+
{{ subtitle }}
{% } else { %}