diff --git a/healthcare/healthcare/doctype/patient/patient.py b/healthcare/healthcare/doctype/patient/patient.py index 88965eff68..549c12d795 100644 --- a/healthcare/healthcare/doctype/patient/patient.py +++ b/healthcare/healthcare/doctype/patient/patient.py @@ -317,6 +317,7 @@ def make_invoice(patient, company): uom = frappe.db.exists("UOM", "Nos") or frappe.db.get_single_value("Stock Settings", "stock_uom") sales_invoice = frappe.new_doc("Sales Invoice") sales_invoice.customer = frappe.db.get_value("Patient", patient, "customer") + sales_invoice.patient = patient sales_invoice.due_date = getdate() sales_invoice.company = company sales_invoice.is_pos = 0