fix: filter service unit by company
diff --git a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.js b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.js
index 2d30e90..7b992a8 100644
--- a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.js
+++ b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.js
@@ -43,7 +43,8 @@
return {
filters: {
'is_group': false,
- 'allow_appointments': true
+ 'allow_appointments': true,
+ 'company': frm.doc.company
}
};
});
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
index 488abc2..f7ed31b 100644
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
@@ -32,8 +32,9 @@
frm.set_query('service_unit', function(){
return {
filters: {
- 'is_group': 0,
- 'allow_appointments': 1
+ 'is_group': false,
+ 'allow_appointments': true,
+ 'company': frm.doc.company
}
};
});
diff --git a/erpnext/healthcare/doctype/therapy_session/therapy_session.js b/erpnext/healthcare/doctype/therapy_session/therapy_session.js
index bb67575..10d657a 100644
--- a/erpnext/healthcare/doctype/therapy_session/therapy_session.js
+++ b/erpnext/healthcare/doctype/therapy_session/therapy_session.js
@@ -9,6 +9,16 @@
{fieldname: 'counts_completed', columns: 1},
{fieldname: 'assistance_level', columns: 1}
];
+
+ frm.set_query('service_unit', function() {
+ return {
+ filters: {
+ 'is_group': false,
+ 'allow_appointments': true,
+ 'company': frm.doc.company
+ }
+ };
+ });
},
refresh: function(frm) {