refactor: Journal Entry form cleanup (backport #52780) (#52961)

refactor: Journal Entry form cleanup

(cherry picked from commit 73d5aa35a1)

# Conflicts:
#	erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
This commit is contained in:
ruthra kumar
2026-02-25 16:27:03 +05:30
committed by GitHub
3 changed files with 71 additions and 49 deletions

View File

@@ -303,10 +303,6 @@ erpnext.accounts.JournalEntry = class JournalEntry extends frappe.ui.form.Contro
erpnext.accounts.dimensions.setup_dimension_filters(this.frm, this.frm.doctype); erpnext.accounts.dimensions.setup_dimension_filters(this.frm, this.frm.doctype);
} }
onload_post_render() {
this.frm.get_field("accounts").grid.set_multiple_add("account");
}
load_defaults() { load_defaults() {
//this.frm.show_print_first = true; //this.frm.show_print_first = true;
if (this.frm.doc.__islocal && this.frm.doc.company) { if (this.frm.doc.__islocal && this.frm.doc.company) {

View File

@@ -10,18 +10,15 @@
"field_order": [ "field_order": [
"entry_type_and_date", "entry_type_and_date",
"company", "company",
"is_system_generated",
"title",
"voucher_type", "voucher_type",
"naming_series",
"process_deferred_accounting",
"reversal_of",
"column_break1", "column_break1",
"from_template", "naming_series",
"posting_date", "posting_date",
"finance_book", "multi_currency",
"apply_tds", "apply_tds",
"tax_withholding_category", "tax_withholding_category",
"is_system_generated",
"amended_from",
"section_break_tcvw", "section_break_tcvw",
"for_all_stock_asset_accounts", "for_all_stock_asset_accounts",
"column_break_wpau", "column_break_wpau",
@@ -30,52 +27,60 @@
"get_balance_for_periodic_accounting", "get_balance_for_periodic_accounting",
"2_add_edit_gl_entries", "2_add_edit_gl_entries",
"accounts", "accounts",
"section_break99", "section_break_ouaq",
"cheque_no",
"cheque_date",
"user_remark",
"column_break99",
"total_debit", "total_debit",
"column_break_cixu",
"total_credit", "total_credit",
"difference", "difference",
"get_balance", "get_balance",
"multi_currency", "section_break99",
"total_amount_currency", "cheque_no",
"total_amount", "cheque_date",
"total_amount_in_words", "clearance_date",
"column_break_oizh",
"user_remark",
"subscription_section",
"auto_repeat",
"tax_withholding_tab",
"section_tax_withholding_entry", "section_tax_withholding_entry",
"tax_withholding_group", "tax_withholding_group",
"ignore_tax_withholding_threshold", "ignore_tax_withholding_threshold",
"override_tax_withholding_entries", "override_tax_withholding_entries",
"tax_withholding_entries", "tax_withholding_entries",
"more_info_tab",
"reference", "reference",
"clearance_date",
"remark",
"inter_company_journal_entry_reference",
"column_break98", "column_break98",
"bill_no", "bill_no",
"bill_date", "bill_date",
"due_date", "due_date",
"column_break_isfa",
"inter_company_journal_entry_reference",
"process_deferred_accounting",
"reversal_of",
"payment_order",
"stock_entry",
"printing_settings",
"pay_to_recd_from",
"letter_head",
"select_print_heading",
"column_break_35",
"total_amount_currency",
"total_amount",
"total_amount_in_words",
"write_off", "write_off",
"write_off_based_on", "write_off_based_on",
"get_outstanding_invoices", "get_outstanding_invoices",
"column_break_30", "column_break_30",
"write_off_amount", "write_off_amount",
"printing_settings",
"pay_to_recd_from",
"column_break_35",
"letter_head",
"select_print_heading",
"addtional_info", "addtional_info",
"mode_of_payment",
"payment_order",
"party_not_required",
"column_break3",
"is_opening", "is_opening",
"stock_entry", "finance_book",
"subscription_section", "from_template",
"auto_repeat", "title",
"amended_from" "column_break3",
"remark",
"mode_of_payment",
"party_not_required"
], ],
"fields": [ "fields": [
{ {
@@ -155,6 +160,7 @@
{ {
"fieldname": "2_add_edit_gl_entries", "fieldname": "2_add_edit_gl_entries",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hide_border": 1,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "fa fa-table" "options": "fa fa-table"
}, },
@@ -202,10 +208,6 @@
"oldfieldtype": "Small Text", "oldfieldtype": "Small Text",
"print_hide": 1 "print_hide": 1
}, },
{
"fieldname": "column_break99",
"fieldtype": "Column Break"
},
{ {
"fieldname": "total_debit", "fieldname": "total_debit",
"fieldtype": "Currency", "fieldtype": "Currency",
@@ -429,7 +431,7 @@
"collapsible": 1, "collapsible": 1,
"fieldname": "addtional_info", "fieldname": "addtional_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "More Information", "label": "Additional Info",
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "fa fa-file-text" "options": "fa fa-file-text"
}, },
@@ -476,7 +478,7 @@
{ {
"fieldname": "subscription_section", "fieldname": "subscription_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Subscription Section" "label": "Subscription"
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
@@ -593,12 +595,10 @@
"no_copy": 1 "no_copy": 1
}, },
{ {
"collapsible": 1,
"collapsible_depends_on": "eval: doc.apply_tds && doc.docstatus == 0", "collapsible_depends_on": "eval: doc.apply_tds && doc.docstatus == 0",
"depends_on": "eval: doc.apply_tds", "depends_on": "eval: doc.apply_tds",
"fieldname": "section_tax_withholding_entry", "fieldname": "section_tax_withholding_entry",
"fieldtype": "Section Break", "fieldtype": "Section Break"
"label": "Tax Withholding Entry"
}, },
{ {
"fieldname": "tax_withholding_group", "fieldname": "tax_withholding_group",
@@ -624,6 +624,33 @@
"label": "Tax Withholding Entries", "label": "Tax Withholding Entries",
"options": "Tax Withholding Entry", "options": "Tax Withholding Entry",
"read_only_depends_on": "eval: !doc.override_tax_withholding_entries" "read_only_depends_on": "eval: !doc.override_tax_withholding_entries"
},
{
"fieldname": "more_info_tab",
"fieldtype": "Tab Break",
"label": "More Info"
},
{
"fieldname": "section_break_ouaq",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_cixu",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_oizh",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_isfa",
"fieldtype": "Column Break"
},
{
"depends_on": "eval: doc.apply_tds",
"fieldname": "tax_withholding_tab",
"fieldtype": "Tab Break",
"label": "Tax Withholding"
} }
], ],
"icon": "fa fa-file-text", "icon": "fa fa-file-text",
@@ -638,7 +665,7 @@
"table_fieldname": "payment_entries" "table_fieldname": "payment_entries"
} }
], ],
"modified": "2026-02-03 14:40:39.944524", "modified": "2026-02-16 16:06:10.468482",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Journal Entry", "name": "Journal Entry",

View File

@@ -43,7 +43,7 @@
"fields": [ "fields": [
{ {
"bold": 1, "bold": 1,
"columns": 2, "columns": 4,
"fieldname": "account", "fieldname": "account",
"fieldtype": "Link", "fieldtype": "Link",
"in_global_search": 1, "in_global_search": 1,
@@ -191,7 +191,6 @@
{ {
"fieldname": "reference_name", "fieldname": "reference_name",
"fieldtype": "Dynamic Link", "fieldtype": "Dynamic Link",
"in_list_view": 1,
"label": "Reference Name", "label": "Reference Name",
"no_copy": 1, "no_copy": 1,
"options": "reference_type", "options": "reference_type",
@@ -294,7 +293,7 @@
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2026-02-19 17:01:22.642454", "modified": "2026-02-16 16:04:16.022407",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Journal Entry Account", "name": "Journal Entry Account",