mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
fix(patch): copy the value of post_change_gl_entries from accounts settings to pos settings
This commit is contained in:
@@ -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.migrate_tax_withholding_data
|
||||||
erpnext.patches.v16_0.update_corrected_cancelled_status
|
erpnext.patches.v16_0.update_corrected_cancelled_status
|
||||||
erpnext.patches.v16_0.fix_barcode_typo
|
erpnext.patches.v16_0.fix_barcode_typo
|
||||||
|
erpnext.patches.v16_0.set_post_change_gl_entries_on_pos_settings
|
||||||
@@ -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