mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-09 15:29:30 +00:00
fix: read posting date confirmation setting from boot data
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user