mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
fix(patch): copy the value of post_change_gl_entries from accounts settings to pos settings
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
Singles = frappe.qb.DocType("Singles")
|
||||
query = (
|
||||
frappe.qb.from_(Singles)
|
||||
.select("value")
|
||||
.where((Singles.doctype == "Accounts Settings") & (Singles.field == "post_change_gl_entries"))
|
||||
)
|
||||
result = query.run(as_dict=1)
|
||||
if result:
|
||||
post_change_gl_entries = int(result[0].get("value", 1))
|
||||
frappe.db.set_single_value("POS Settings", "post_change_gl_entries", post_change_gl_entries)
|
||||
Reference in New Issue
Block a user