mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-19 14:55:13 +00:00
fix(manufacturing): show returned qty in progress bar
(cherry picked from commit 8027f5aafd)
This commit is contained in:
@@ -481,10 +481,21 @@ frappe.ui.form.on("Work Order", {
|
|||||||
if (pending_complete > 0) {
|
if (pending_complete > 0) {
|
||||||
var width = (pending_complete / frm.doc.qty) * 100 - added_min;
|
var width = (pending_complete / frm.doc.qty) * 100 - added_min;
|
||||||
title = __("{0} items in progress", [pending_complete]);
|
title = __("{0} items in progress", [pending_complete]);
|
||||||
|
let progress_class = "progress-bar-warning";
|
||||||
|
if (frm.doc.status == "Closed") {
|
||||||
|
if (frm.doc.required_items.find((d) => d.returned_qty > 0)) {
|
||||||
|
title = __("{0} items returned", [pending_complete]);
|
||||||
|
progress_class = "progress-bar-warning";
|
||||||
|
} else {
|
||||||
|
title = __("{0} items to return", [pending_complete]);
|
||||||
|
progress_class = "progress-bar-info";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bars.push({
|
bars.push({
|
||||||
title: title,
|
title: title,
|
||||||
width: (width > 100 ? "99.5" : width) + "%",
|
width: (width > 100 ? "99.5" : width) + "%",
|
||||||
progress_class: "progress-bar-warning",
|
progress_class: progress_class,
|
||||||
});
|
});
|
||||||
message = message + ". " + title;
|
message = message + ". " + title;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user