fix: read posting date confirmation setting from boot data

This commit is contained in:
khushi8112
2026-09-09 11:52:42 +05:30
parent ec738eec28
commit db9e93306a
2 changed files with 4 additions and 6 deletions

View File

@@ -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(

View File

@@ -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")