refactor: provision to set remarks length in accounts settings
(cherry picked from commit 97090ff3679104d77a031f29d4acafb8b7ac1580)
This commit is contained in:
parent
0f227aa883
commit
9ee8a78083
@ -66,7 +66,12 @@
|
|||||||
"show_balance_in_coa",
|
"show_balance_in_coa",
|
||||||
"banking_tab",
|
"banking_tab",
|
||||||
"enable_party_matching",
|
"enable_party_matching",
|
||||||
"enable_fuzzy_matching"
|
"enable_fuzzy_matching",
|
||||||
|
"reports_tab",
|
||||||
|
"remarks_section",
|
||||||
|
"general_ledger_remarks_length",
|
||||||
|
"column_break_lvjk",
|
||||||
|
"receivable_payable_remarks_length"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@ -422,6 +427,34 @@
|
|||||||
"fieldname": "round_row_wise_tax",
|
"fieldname": "round_row_wise_tax",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Round Tax Amount Row-wise"
|
"label": "Round Tax Amount Row-wise"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "reports_tab",
|
||||||
|
"fieldtype": "Tab Break",
|
||||||
|
"label": "Reports"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"description": "Truncates 'Remarks' column to set character length",
|
||||||
|
"fieldname": "general_ledger_remarks_length",
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"label": "General Ledger"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"description": "Truncates 'Remarks' column to set character length",
|
||||||
|
"fieldname": "receivable_payable_remarks_length",
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"label": "Accounts Receivable/Payable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_lvjk",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "remarks_section",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Remarks Column Length"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "icon-cog",
|
"icon": "icon-cog",
|
||||||
@ -429,7 +462,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-08-28 00:12:02.740633",
|
"modified": "2023-11-20 09:37:47.650347",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Accounts Settings",
|
"name": "Accounts Settings",
|
||||||
|
|||||||
@ -164,7 +164,12 @@ def get_gl_entries(filters, accounting_dimensions):
|
|||||||
credit_in_account_currency """
|
credit_in_account_currency """
|
||||||
|
|
||||||
if filters.get("show_remarks"):
|
if filters.get("show_remarks"):
|
||||||
select_fields += """,remarks"""
|
if remarks_length := frappe.db.get_single_value(
|
||||||
|
"Accounts Settings", "general_ledger_remarks_length"
|
||||||
|
):
|
||||||
|
select_fields += f",substr(remarks, 1, {remarks_length}) as 'remarks'"
|
||||||
|
else:
|
||||||
|
select_fields += """,remarks"""
|
||||||
|
|
||||||
order_by_statement = "order by posting_date, account, creation"
|
order_by_statement = "order by posting_date, account, creation"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user