fix: patch to set grand total to default mop if old column exists (#47731)

* fix: patch to set grand total to default mop if old column exists

* chore: patches.txt
This commit is contained in:
Diptanil Saha
2025-05-27 14:48:25 +05:30
committed by GitHub
parent 3bb44b5ef6
commit 1523b38315

View File

@@ -2,8 +2,9 @@ import frappe
def execute():
POSProfile = frappe.qb.DocType("POS Profile")
if frappe.db.has_column("POS Profile", "disable_grand_total_to_default_mop"):
POSProfile = frappe.qb.DocType("POS Profile")
frappe.qb.update(POSProfile).set(POSProfile.set_grand_total_to_default_mop, 1).where(
POSProfile.disable_grand_total_to_default_mop == 0
).run()
frappe.qb.update(POSProfile).set(POSProfile.set_grand_total_to_default_mop, 1).where(
POSProfile.disable_grand_total_to_default_mop == 0
).run()