fix: service unit validation and translation
diff --git a/erpnext/healthcare/doctype/healthcare_service_unit_type/healthcare_service_unit_type.py b/erpnext/healthcare/doctype/healthcare_service_unit_type/healthcare_service_unit_type.py
index a99358c..bb86eaa 100644
--- a/erpnext/healthcare/doctype/healthcare_service_unit_type/healthcare_service_unit_type.py
+++ b/erpnext/healthcare/doctype/healthcare_service_unit_type/healthcare_service_unit_type.py
@@ -12,12 +12,14 @@
def validate(self):
if self.allow_appointments and self.inpatient_occupancy:
frappe.msgprint(
- _('Healthcare Service Unit Type cannot be both <b>Allow Appointments</b> and <b>Inpatient Occupancy</b>'),
+ _('Healthcare Service Unit Type cannot have both {0} and {1}').format(
+ frappe.bold('Allow Appointments'), frappe.bold('Inpatient Occupancy')),
raise_exception=1, title=_('Validation Error'), indicator='red'
)
elif not self.allow_appointments and not self.inpatient_occupancy:
frappe.msgprint(
- _('Healthcare Service Unit Type cannot be both <b>Allow Appointments</b> and <b>Inpatient Occupancy</b>'),
+ _('Healthcare Service Unit Type must allow atleast one among {0} and {1}').format(
+ frappe.bold('Allow Appointments'), frappe.bold('Inpatient Occupancy')),
raise_exception=1, title=_('Validation Error'), indicator='red'
)