mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
Merge pull request #46608 from mihir-kandoi/st34183
fix: fetch bom_no when updating items in sales order
This commit is contained in:
@@ -3731,6 +3731,9 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
|
|||||||
if d.get("schedule_date") and parent_doctype == "Purchase Order":
|
if d.get("schedule_date") and parent_doctype == "Purchase Order":
|
||||||
child_item.schedule_date = d.get("schedule_date")
|
child_item.schedule_date = d.get("schedule_date")
|
||||||
|
|
||||||
|
if d.get("bom_no") and parent_doctype == "Sales Order":
|
||||||
|
child_item.bom_no = d.get("bom_no")
|
||||||
|
|
||||||
if flt(child_item.price_list_rate):
|
if flt(child_item.price_list_rate):
|
||||||
if flt(child_item.rate) > flt(child_item.price_list_rate):
|
if flt(child_item.rate) > flt(child_item.price_list_rate):
|
||||||
# if rate is greater than price_list_rate, set margin
|
# if rate is greater than price_list_rate, set margin
|
||||||
|
|||||||
@@ -713,6 +713,7 @@ erpnext.utils.update_child_items = function (opts) {
|
|||||||
uom,
|
uom,
|
||||||
conversion_factor,
|
conversion_factor,
|
||||||
item_name,
|
item_name,
|
||||||
|
bom_no,
|
||||||
} = r.message;
|
} = r.message;
|
||||||
|
|
||||||
const row = dialog.fields_dict.trans_items.df.data.find(
|
const row = dialog.fields_dict.trans_items.df.data.find(
|
||||||
@@ -725,6 +726,7 @@ erpnext.utils.update_child_items = function (opts) {
|
|||||||
qty: me.doc.qty || qty,
|
qty: me.doc.qty || qty,
|
||||||
rate: me.doc.rate || rate,
|
rate: me.doc.rate || rate,
|
||||||
item_name: item_name,
|
item_name: item_name,
|
||||||
|
bom_no: bom_no,
|
||||||
});
|
});
|
||||||
dialog.fields_dict.trans_items.grid.refresh();
|
dialog.fields_dict.trans_items.grid.refresh();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user