From db9e93306ac7c47a5a2e7093e58ccffa861a6d7d Mon Sep 17 00:00:00 2001 From: khushi8112 Date: Wed, 9 Sep 2026 11:52:42 +0530 Subject: [PATCH] fix: read posting date confirmation setting from boot data --- erpnext/public/js/controllers/transaction.js | 7 +------ erpnext/startup/boot.py | 3 +++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index cbd965ae7ce..52c7a5f7cce 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1150,12 +1150,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe if (this.frm.doc.set_posting_time) return; if (frappe.datetime.get_today() == this.frm.doc.posting_date) return; - let is_confirmation_reqd = await frappe.db.get_single_value( - "Accounts Settings", - "confirm_before_resetting_posting_date" - ); - - if (!is_confirmation_reqd) return; + if (!frappe.boot.sysdefaults.confirm_before_resetting_posting_date) return; return new Promise((resolve, reject) => { frappe.confirm( diff --git a/erpnext/startup/boot.py b/erpnext/startup/boot.py index 2c82ea5becd..fed89921268 100644 --- a/erpnext/startup/boot.py +++ b/erpnext/startup/boot.py @@ -27,6 +27,9 @@ def boot_session(bootinfo): bootinfo.sysdefaults.disable_include_dimensions = cint( frappe.get_single_value("Accounts Settings", "disable_include_dimensions") ) + bootinfo.sysdefaults.confirm_before_resetting_posting_date = cint( + frappe.get_single_value("Accounts Settings", "confirm_before_resetting_posting_date") + ) bootinfo.sysdefaults.quotation_valid_till = cint( frappe.db.get_single_value("CRM Settings", "default_valid_till")