mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 21:29:11 +00:00
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:
@@ -2,8 +2,9 @@ import frappe
|
|||||||
|
|
||||||
|
|
||||||
def execute():
|
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(
|
frappe.qb.update(POSProfile).set(POSProfile.set_grand_total_to_default_mop, 1).where(
|
||||||
POSProfile.disable_grand_total_to_default_mop == 0
|
POSProfile.disable_grand_total_to_default_mop == 0
|
||||||
).run()
|
).run()
|
||||||
|
|||||||
Reference in New Issue
Block a user