mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
fix: do not show stock entry button if timer is running
This commit is contained in:
@@ -127,8 +127,6 @@ frappe.ui.form.on("Job Card", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
refresh: function (frm) {
|
refresh: function (frm) {
|
||||||
frm.trigger("setup_stock_entry");
|
|
||||||
|
|
||||||
let has_items = frm.doc.items && frm.doc.items.length;
|
let has_items = frm.doc.items && frm.doc.items.length;
|
||||||
frm.trigger("make_fields_read_only");
|
frm.trigger("make_fields_read_only");
|
||||||
|
|
||||||
@@ -196,6 +194,8 @@ frappe.ui.form.on("Job Card", {
|
|||||||
|
|
||||||
frm.trigger("toggle_operation_number");
|
frm.trigger("toggle_operation_number");
|
||||||
|
|
||||||
|
let is_timer_running = false;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
frm.doc.for_quantity + frm.doc.process_loss_qty > frm.doc.total_completed_qty &&
|
frm.doc.for_quantity + frm.doc.process_loss_qty > frm.doc.total_completed_qty &&
|
||||||
(frm.doc.skip_material_transfer ||
|
(frm.doc.skip_material_transfer ||
|
||||||
@@ -269,12 +269,18 @@ frappe.ui.form.on("Job Card", {
|
|||||||
frm.add_custom_button(__("Complete Job"), () => {
|
frm.add_custom_button(__("Complete Job"), () => {
|
||||||
frm.trigger("complete_job_card");
|
frm.trigger("complete_job_card");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
is_timer_running = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
frm.trigger("make_dashboard");
|
frm.trigger("make_dashboard");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!is_timer_running) {
|
||||||
|
frm.trigger("setup_stock_entry");
|
||||||
|
}
|
||||||
|
|
||||||
frm.trigger("setup_quality_inspection");
|
frm.trigger("setup_quality_inspection");
|
||||||
|
|
||||||
if (frm.doc.work_order) {
|
if (frm.doc.work_order) {
|
||||||
|
|||||||
Reference in New Issue
Block a user