fix: sider
This commit is contained in:
parent
40246caf5e
commit
e50697d459
erpnext/healthcare/doctype
@ -14,7 +14,7 @@ frappe.ui.form.on('Therapy Plan', {
|
|||||||
if (!frm.doc.__islocal) {
|
if (!frm.doc.__islocal) {
|
||||||
frm.trigger('show_progress_for_therapies');
|
frm.trigger('show_progress_for_therapies');
|
||||||
if (frm.doc.status != 'Completed') {
|
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 = [{
|
const fields = [{
|
||||||
fieldtype: 'Link',
|
fieldtype: 'Link',
|
||||||
label: __('Therapy Type'),
|
label: __('Therapy Type'),
|
||||||
@ -24,7 +24,7 @@ frappe.ui.form.on('Therapy Plan', {
|
|||||||
get_query: function() {
|
get_query: function() {
|
||||||
return {
|
return {
|
||||||
filters: { 'therapy_type': ['in', therapy_types]}
|
filters: { 'therapy_type': ['in', therapy_types]}
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ frappe.ui.form.on('Therapy Session', {
|
|||||||
frappe.model.open_mapped_doc({
|
frappe.model.open_mapped_doc({
|
||||||
method: 'erpnext.healthcare.doctype.therapy_session.therapy_session.invoice_therapy_session',
|
method: 'erpnext.healthcare.doctype.therapy_session.therapy_session.invoice_therapy_session',
|
||||||
frm: frm,
|
frm: frm,
|
||||||
})
|
});
|
||||||
}, 'Create');
|
}, 'Create');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -67,7 +67,7 @@ frappe.ui.form.on('Therapy Session', {
|
|||||||
name: frm.doc.therapy_plan
|
name: frm.doc.therapy_plan
|
||||||
},
|
},
|
||||||
callback: function(data) {
|
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() {
|
frm.set_query('therapy_type', function() {
|
||||||
return {
|
return {
|
||||||
filters: { 'therapy_type': ['in', therapy_types]}
|
filters: { 'therapy_type': ['in', therapy_types]}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user