fix: show remaining qty on 'Complete Job' button instead of full qty

This commit is contained in:
Mihir Kandoi
2025-03-12 16:27:33 +05:30
parent 877d5bd3aa
commit 79e6550321

View File

@@ -312,7 +312,7 @@ frappe.ui.form.on("Job Card", {
fieldtype: "Float",
label: __("Completed Quantity"),
fieldname: "qty",
default: frm.doc.for_quantity,
default: frm.doc.for_quantity - frm.doc.total_completed_qty,
},
(data) => {
frm.events.complete_job(frm, "Complete", data.qty);