Merge pull request #20445 from rohitwaghchaure/copy_to_warehouse_to_target_warehouse_in_delivery_note_item
fix: to warehouse not set in the customer warehouse
This commit is contained in:
commit
7fda3a12cc
@ -92,6 +92,17 @@ frappe.ui.form.on("Delivery Note", {
|
||||
}, __('Create'));
|
||||
frm.page.set_inner_btn_group_as_primary(__('Create'));
|
||||
}
|
||||
},
|
||||
|
||||
to_warehouse: function(frm) {
|
||||
if(frm.doc.to_warehouse) {
|
||||
["items", "packed_items"].forEach(doctype => {
|
||||
frm.doc[doctype].forEach(d => {
|
||||
frappe.model.set_value(d.doctype, d.name,
|
||||
"target_warehouse", frm.doc.to_warehouse);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user