Healthcare Utils - prescription - invoice - fix
diff --git a/erpnext/healthcare/utils.py b/erpnext/healthcare/utils.py
index b038d8f..d42a5bb 100644
--- a/erpnext/healthcare/utils.py
+++ b/erpnext/healthcare/utils.py
@@ -180,7 +180,7 @@
created = frappe.db.get_value(ref_dt, ref_dn, created_check_field)
if created == 1:
# Fetch the doc created for the prescription
- doc_created = frappe.db.get_value(dt, {'prescription': item.reference_dn})
+ doc_created = frappe.db.get_value(dt, {'prescription': ref_dn})
frappe.db.set_value(dt, doc_created, 'invoiced', invoiced)
def manage_fee_validity(appointment_name, method, ref_invoice=None):