fix: update linked Customer on Patient update only if Link Customer to Patient is enabled (#25926)
This commit is contained in:
parent
cf349aadf9
commit
28cdff10cf
@ -33,6 +33,7 @@ class Patient(Document):
|
||||
self.reload() # self.notify_update()
|
||||
|
||||
def on_update(self):
|
||||
if frappe.db.get_single_value('Healthcare Settings', 'link_customer_to_patient'):
|
||||
if self.customer:
|
||||
customer = frappe.get_doc('Customer', self.customer)
|
||||
if self.customer_group:
|
||||
@ -47,7 +48,6 @@ class Patient(Document):
|
||||
customer.ignore_mandatory = True
|
||||
customer.save(ignore_permissions=True)
|
||||
else:
|
||||
if frappe.db.get_single_value('Healthcare Settings', 'link_customer_to_patient'):
|
||||
create_customer(self)
|
||||
|
||||
def set_full_name(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user