fix: sider

This commit is contained in:
Rucha Mahabal 2020-11-04 20:24:04 +05:30
parent 2673c19c1a
commit 13fb562e9c
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ frappe.ui.form.on('Therapy Plan', {
if (!frm.doc.__islocal) {
frm.trigger('show_progress_for_therapies');
if (frm.doc.status != 'Completed') {
let therapy_types = (frm.doc.therapy_plan_details || []).map(function(d){ return d.therapy_type });
let therapy_types = (frm.doc.therapy_plan_details || []).map(function(d){ return d.therapy_type; });
const fields = [{
fieldtype: 'Link',
label: __('Therapy Type'),
@ -24,7 +24,7 @@ frappe.ui.form.on('Therapy Plan', {
get_query: function() {
return {
filters: { 'therapy_type': ['in', therapy_types]}
}
};
}
}];

View File

@ -46,7 +46,7 @@ frappe.ui.form.on('Therapy Session', {
frappe.model.open_mapped_doc({
method: 'erpnext.healthcare.doctype.therapy_session.therapy_session.invoice_therapy_session',
frm: frm,
})
});
}, 'Create');
}
});
@ -67,7 +67,7 @@ frappe.ui.form.on('Therapy Session', {
name: frm.doc.therapy_plan
},
callback: function(data) {
let therapy_types = (data.message.therapy_plan_details || []).map(function(d){ return d.therapy_type });
let therapy_types = (data.message.therapy_plan_details || []).map(function(d){ return d.therapy_type; });
frm.set_query('therapy_type', function() {
return {
filters: { 'therapy_type': ['in', therapy_types]}