mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-13 22:51:49 +00:00
refactor(job_card): make the completion dialog say what it asks for
The dialog qty shares the Qty to Manufacture label with the field on the form while it means the current cycle only, its title fell back to the generic Enter Value because frappe.prompt takes four arguments and it was passed five, and nothing on it stated that the three quantities have to add up. Name the cycle in the label, title the dialog after the button that opens it, and describe the split on the fields. Same wording in the shop floor dialog.
This commit is contained in:
@@ -242,10 +242,11 @@ frappe.ui.form.on("Job Card", {
|
||||
const fields = [
|
||||
{
|
||||
fieldtype: "Float",
|
||||
label: __("Qty to Manufacture"),
|
||||
label: __("Qty to Manufacture in this Cycle"),
|
||||
fieldname: "for_quantity",
|
||||
reqd: 1,
|
||||
default: pending_qty,
|
||||
description: __("Completed, Pending and Process Loss quantities must add up to this."),
|
||||
change() {
|
||||
const dialog = frm.job_completion_dialog;
|
||||
dialog.set_value("completed_qty", dialog.get_value("for_quantity"));
|
||||
@@ -285,6 +286,7 @@ frappe.ui.form.on("Job Card", {
|
||||
label: __("Pending Quantity"),
|
||||
fieldname: "pending_qty",
|
||||
default: 0.0,
|
||||
description: __("Qty left for a later cycle or for another job card."),
|
||||
change() {
|
||||
const dialog = frm.job_completion_dialog;
|
||||
const process_loss_qty =
|
||||
@@ -311,6 +313,7 @@ frappe.ui.form.on("Job Card", {
|
||||
fieldtype: "Float",
|
||||
label: __("Process Loss Quantity"),
|
||||
fieldname: "process_loss_qty",
|
||||
description: __("Qty scrapped in this cycle, nobody will produce it."),
|
||||
onchange() {
|
||||
const dialog = frm.job_completion_dialog;
|
||||
const remaining =
|
||||
@@ -392,9 +395,8 @@ frappe.ui.form.on("Job Card", {
|
||||
},
|
||||
});
|
||||
},
|
||||
__("Enter Value"),
|
||||
__("Update"),
|
||||
__("Set Finished Good Quantity")
|
||||
__("Complete Job"),
|
||||
__("Update")
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
@@ -789,10 +789,11 @@ class ShopFloor {
|
||||
const fields = [
|
||||
{
|
||||
fieldtype: "Float",
|
||||
label: __("Qty to Manufacture"),
|
||||
label: __("Qty to Manufacture in this Cycle"),
|
||||
fieldname: "for_quantity",
|
||||
reqd: 1,
|
||||
default: pending,
|
||||
description: __("Completed, Pending and Process Loss quantities must add up to this."),
|
||||
change() {
|
||||
const d = me.session_dialog;
|
||||
d.set_value("completed_qty", d.get_value("for_quantity"));
|
||||
@@ -832,6 +833,7 @@ class ShopFloor {
|
||||
label: __("Pending Quantity"),
|
||||
fieldname: "pending_qty",
|
||||
default: 0.0,
|
||||
description: __("Qty left for a later cycle or for another job card."),
|
||||
change() {
|
||||
const d = me.session_dialog;
|
||||
const pl =
|
||||
@@ -858,6 +860,7 @@ class ShopFloor {
|
||||
label: __("Process Loss Quantity"),
|
||||
fieldname: "process_loss_qty",
|
||||
default: 0.0,
|
||||
description: __("Qty scrapped in this cycle, nobody will produce it."),
|
||||
change() {
|
||||
const d = me.session_dialog;
|
||||
const remaining =
|
||||
|
||||
Reference in New Issue
Block a user