diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 772f1d5..49f0b99 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -634,32 +634,6 @@
 				get_data: function() {
 					return this.data;
 				},
-				on_setup: function(grid) {
-					grid.wrapper.on('change', 'input[data-fieldname="selected_qty"]', function(e) {
-						// check if batch is selected
-						if($(this).val().length !== 0) {
-							let $row = $(this).closest('.grid-row');
-
-							let $batch = $row.find('input[data-fieldname="batch_no"]');
-							if($batch.val() === '') {
-								$(this).val('').trigger('change');
-								frappe.throw(__("Please select a batch"));
-							} else {
-								// check if greater than available if source
-								let $available = $row.find('input[data-fieldname="available_qty"]');
-								if(warehouse_details[0] === 'Source Warehouse' &&
-									parseInt($available.val()) < parseInt($(this).val())) {
-
-									$(this).val('').trigger('change');
-									frappe.throw(__(`For transfer from source, selected quantity cannot be
-										greater than available quantity`));
-								}
-							}
-						}
-
-					});
-				}
-
 			}
 		]);
 
@@ -684,7 +658,7 @@
 		fields: fields
 	});
 
-	erpnext.stock.bind_batch_serial_dialog_qty(dialog);
+	erpnext.stock.bind_batch_serial_dialog_qty(dialog, warehouse_details);
 
 	let map_item_values = (item, values, attribute) => {
 		item[attribute] = values[attribute];
@@ -755,7 +729,7 @@
 	dialog.show();
 }
 
-erpnext.stock.bind_batch_serial_dialog_qty = (dialog) => {
+erpnext.stock.bind_batch_serial_dialog_qty = (dialog, warehouse_details) => {
 	let serial_no_link = dialog.fields_dict.serial_no_select;
 	let serial_no_list_field = dialog.fields_dict.serial_no;
 	let batches_field = dialog.fields_dict.batches;
@@ -777,7 +751,7 @@
 		}
 	}
 
-	function set_available_qty(item_code, batch_no, warehouse, field) {
+	function set_available_qty(item_code, batch_no, warehouse, fields) {
 		if(warehouse) {
 			frappe.call({
 				method: 'erpnext.stock.doctype.batch.batch.get_batch_qty',
@@ -788,9 +762,11 @@
 				},
 				callback: (r) => {
 					let value = r.message ? r.message : '0';
-					field.set_value(value);
-					field.$input.val(value);
-					field.$input.trigger('change');
+					fields[1].set_value(value);
+					fields[1].$input.trigger('change');
+					fields[2].set_value('0');
+					fields[2].$input.trigger('change');
+
 				}
 			});
 		} else {
@@ -829,15 +805,36 @@
 
 	if(batches_field) {
 		batches_field.grid.add_new_row(null, null, true);
+		batches_field.grid.wrapper.on('change', 'input[data-fieldname="selected_qty"]', function(e) {
+			// check if batch is selected
+			if($(this).val().length !== 0) {
+				let $row = $(this).closest('.grid-row');
+
+				let $batch = $row.find('input[data-fieldname="batch_no"]');
+				if($batch.val() === '') {
+					$(this).val('').trigger('change');
+					frappe.throw(__("Please select a batch"));
+				} else {
+					// check if greater than available if source
+					let $available = $row.find('input[data-fieldname="available_qty"]');
+					if(warehouse_details[0] === 'Source Warehouse' &&
+						parseInt($available.val()) < parseInt($(this).val())) {
+
+						$(this).val('').trigger('change');
+						frappe.throw(__(`For transfer from source, selected quantity cannot be
+							greater than available quantity`));
+					}
+				}
+			}
+
+		});
 		batches_field.grid.wrapper.on('change', 'input[data-fieldname="batch_no"]', function(e) {
 			let $row = $(this).closest('.grid-row');
 			let name = $row.attr('data-name');
 			let row = batches_field.grid.grid_rows_by_docname[name];
 			if(row.doc.batch_no) {
-				row.on_grid_fields[2].set_value('0');
-				row.on_grid_fields[2].$input.trigger('change');
 				if(warehouse_field.get_value().length > 0) {
-					set_available_qty(item_code, row.doc.batch_no, warehouse_field.get_value(), row.on_grid_fields[1]);
+					set_available_qty(item_code, row.doc.batch_no, warehouse_field.get_value(), row.on_grid_fields);
 				} else {
 					frappe.throw(__("Please select a warehouse to get available quantities"));
 				}
