fix: filter service unit by company

This commit is contained in:
anoop 2020-04-27 20:00:27 +05:30
parent e30cc83591
commit 256b77b463
3 changed files with 15 additions and 3 deletions

View File

@ -43,7 +43,8 @@ frappe.ui.form.on('Clinical Procedure', {
return {
filters: {
'is_group': false,
'allow_appointments': true
'allow_appointments': true,
'company': frm.doc.company
}
};
});

View File

@ -32,8 +32,9 @@ frappe.ui.form.on('Patient Appointment', {
frm.set_query('service_unit', function(){
return {
filters: {
'is_group': 0,
'allow_appointments': 1
'is_group': false,
'allow_appointments': true,
'company': frm.doc.company
}
};
});

View File

@ -9,6 +9,16 @@ frappe.ui.form.on('Therapy Session', {
{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) {