From 400108f7dffaa9d45aa02679fafe75e8e7fbac34 Mon Sep 17 00:00:00 2001 From: aynugek Date: Mon, 25 Nov 2024 09:12:14 +0300 Subject: [PATCH] fix(sales invoice): add patient to registration fee sales invoice --- healthcare/healthcare/doctype/patient/patient.py | 1 + 1 file changed, 1 insertion(+) 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