fix(patch): copy the value of post_change_gl_entries from accounts settings to pos settings

This commit is contained in:
diptanilsaha
2026-01-09 18:16:23 +05:30
parent e4741072a6
commit e9c009b564
2 changed files with 15 additions and 0 deletions

View File

@@ -456,3 +456,4 @@ erpnext.patches.v16_0.update_tax_withholding_field_in_payment_entry
erpnext.patches.v16_0.migrate_tax_withholding_data
erpnext.patches.v16_0.update_corrected_cancelled_status
erpnext.patches.v16_0.fix_barcode_typo
erpnext.patches.v16_0.set_post_change_gl_entries_on_pos_settings

View File

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