fix: check if swift_number exists in bank account
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
(cherry picked from commit d6587fa1d5
)
This commit is contained in:
parent
25add7c9bf
commit
9b36a9be26
@ -4,7 +4,7 @@ import frappe
|
||||
def execute():
|
||||
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("""
|
||||
UPDATE `tabBank` b, `tabBank Account` ba
|
||||
SET b.swift_number = ba.swift_number, b.branch_code = ba.branch_code
|
||||
|
Loading…
Reference in New Issue
Block a user