Merge pull request #22038 from frappe/mergify/bp/version-13-beta-pre-release/pr-22037
fix: check if swift_number exists in bank account (bp #22037)
This commit is contained in:
commit
295dcd87f9
@ -4,7 +4,7 @@ import frappe
|
|||||||
def execute():
|
def execute():
|
||||||
frappe.reload_doc('accounts', 'doctype', 'bank', force=1)
|
frappe.reload_doc('accounts', 'doctype', 'bank', force=1)
|
||||||
|
|
||||||
if frappe.db.table_exists('Bank') and frappe.db.table_exists('Bank Account'):
|
if frappe.db.table_exists('Bank') and frappe.db.table_exists('Bank Account') and frappe.db.has_column('Bank Account', 'swift_number'):
|
||||||
frappe.db.sql("""
|
frappe.db.sql("""
|
||||||
UPDATE `tabBank` b, `tabBank Account` ba
|
UPDATE `tabBank` b, `tabBank Account` ba
|
||||||
SET b.swift_number = ba.swift_number, b.branch_code = ba.branch_code
|
SET b.swift_number = ba.swift_number, b.branch_code = ba.branch_code
|
||||||
@ -12,4 +12,4 @@ def execute():
|
|||||||
""")
|
""")
|
||||||
|
|
||||||
frappe.reload_doc('accounts', 'doctype', 'bank_account')
|
frappe.reload_doc('accounts', 'doctype', 'bank_account')
|
||||||
frappe.reload_doc('accounts', 'doctype', 'payment_request')
|
frappe.reload_doc('accounts', 'doctype', 'payment_request')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user