feat: added button get items from material request in stock entry
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 225c1e9..0193849 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -184,6 +184,23 @@
}
})
}, __("Get items from"));
+
+ frm.add_custom_button(__('Material Request'), function() {
+ erpnext.utils.map_current_doc({
+ method: "erpnext.stock.doctype.material_request.material_request.make_stock_entry",
+ source_doctype: "Material Request",
+ target: frm,
+ date_field: "schedule_date",
+ setters: {
+ company: frm.doc.company,
+ },
+ get_query_filters: {
+ docstatus: 1,
+ material_request_type: "Material Transfer",
+ status: ['!=', 'Transferred']
+ }
+ })
+ }, __("Get items from"));
}
if (frm.doc.docstatus===0 && frm.doc.purpose == "Material Issue") {
frm.add_custom_button(__('Expired Batches'), function() {