fix: Show correct label instead of showing undefined (#18559)
This commit is contained in:
parent
7d7e4534dd
commit
4b3b358ac6
@ -255,27 +255,44 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
var fields = [
|
const fields = [{
|
||||||
{fieldtype:'Table', fieldname: 'items',
|
label: 'Items',
|
||||||
|
fieldtype: 'Table',
|
||||||
|
fieldname: 'items',
|
||||||
description: __('Select BOM and Qty for Production'),
|
description: __('Select BOM and Qty for Production'),
|
||||||
fields: [
|
fields: [{
|
||||||
{fieldtype:'Read Only', fieldname:'item_code',
|
fieldtype: 'Read Only',
|
||||||
label: __('Item Code'), in_list_view:1},
|
fieldname: 'item_code',
|
||||||
{fieldtype:'Link', fieldname:'bom', options: 'BOM', reqd: 1,
|
label: __('Item Code'),
|
||||||
label: __('Select BOM'), in_list_view:1, get_query: function(doc) {
|
in_list_view: 1
|
||||||
|
}, {
|
||||||
|
fieldtype: 'Link',
|
||||||
|
fieldname: 'bom',
|
||||||
|
options: 'BOM',
|
||||||
|
reqd: 1,
|
||||||
|
label: __('Select BOM'),
|
||||||
|
in_list_view: 1,
|
||||||
|
get_query: function (doc) {
|
||||||
return { filters: { item: doc.item_code } };
|
return { filters: { item: doc.item_code } };
|
||||||
}},
|
}
|
||||||
{fieldtype:'Float', fieldname:'pending_qty', reqd: 1,
|
}, {
|
||||||
label: __('Qty'), in_list_view:1},
|
fieldtype: 'Float',
|
||||||
{fieldtype:'Data', fieldname:'sales_order_item', reqd: 1,
|
fieldname: 'pending_qty',
|
||||||
label: __('Sales Order Item'), hidden:1}
|
reqd: 1,
|
||||||
],
|
label: __('Qty'),
|
||||||
|
in_list_view: 1
|
||||||
|
}, {
|
||||||
|
fieldtype: 'Data',
|
||||||
|
fieldname: 'sales_order_item',
|
||||||
|
reqd: 1,
|
||||||
|
label: __('Sales Order Item'),
|
||||||
|
hidden: 1
|
||||||
|
}],
|
||||||
data: r.message,
|
data: r.message,
|
||||||
get_data: function() {
|
get_data: () => {
|
||||||
return r.message
|
return r.message
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
title: __('Select Items to Manufacture'),
|
title: __('Select Items to Manufacture'),
|
||||||
fields: fields,
|
fields: fields,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user