Merge pull request #21077 from rohitwaghchaure/default_item_is_not_coming_while_making_new_bom_develop
fix: item not showing in popup while making batch
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 1747932..fc4541a 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -165,6 +165,16 @@
return (doc.rule_applied) ? "green" : "red";
});
}
+
+ let batch_no_field = this.frm.get_docfield("items", "batch_no");
+ if (batch_no_field) {
+ batch_no_field.get_route_options_for_new_doc = function(row) {
+ return {
+ "item": row.doc.item_code
+ }
+ };
+ }
+
},
onload: function() {
var me = this;