mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
@@ -145,12 +145,12 @@ frappe.ui.form.on("Work Order", {
|
|||||||
&& frm.doc.operations && frm.doc.operations.length) {
|
&& frm.doc.operations && frm.doc.operations.length) {
|
||||||
|
|
||||||
const not_completed = frm.doc.operations.filter(d => {
|
const not_completed = frm.doc.operations.filter(d => {
|
||||||
if(d.status != 'Completed') {
|
if (d.status != 'Completed') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(not_completed && not_completed.length) {
|
if (not_completed && not_completed.length) {
|
||||||
frm.add_custom_button(__('Create Job Card'), () => {
|
frm.add_custom_button(__('Create Job Card'), () => {
|
||||||
frm.trigger("make_job_card");
|
frm.trigger("make_job_card");
|
||||||
}).addClass('btn-primary');
|
}).addClass('btn-primary');
|
||||||
|
|||||||
@@ -1015,8 +1015,7 @@ def close_work_order(work_order, status):
|
|||||||
filters={
|
filters={
|
||||||
"work_order": work_order.name,
|
"work_order": work_order.name,
|
||||||
"status": "Work In Progress"
|
"status": "Work In Progress"
|
||||||
},
|
}, pluck='name')
|
||||||
pluck='name')
|
|
||||||
|
|
||||||
if job_cards:
|
if job_cards:
|
||||||
job_cards = ", ".join(job_cards)
|
job_cards = ", ".join(job_cards)
|
||||||
|
|||||||
Reference in New Issue
Block a user