fix: sider issue

This commit is contained in:
Anupam 2021-10-31 14:42:10 +05:30
parent 5d4c5652af
commit e290fe0721
2 changed files with 3 additions and 4 deletions

View File

@ -145,12 +145,12 @@ frappe.ui.form.on("Work Order", {
&& frm.doc.operations && frm.doc.operations.length) {
const not_completed = frm.doc.operations.filter(d => {
if(d.status != 'Completed') {
if (d.status != 'Completed') {
return true;
}
});
if(not_completed && not_completed.length) {
if (not_completed && not_completed.length) {
frm.add_custom_button(__('Create Job Card'), () => {
frm.trigger("make_job_card");
}).addClass('btn-primary');

View File

@ -1015,8 +1015,7 @@ def close_work_order(work_order, status):
filters={
"work_order": work_order.name,
"status": "Work In Progress"
},
pluck='name')
}, pluck='name')
if job_cards:
job_cards = ", ".join(job_cards)