[Fix] batch no searching in pos
diff --git a/erpnext/public/js/payment/payments.js b/erpnext/public/js/payment/payments.js
index 0638b84..7437f2a 100644
--- a/erpnext/public/js/payment/payments.js
+++ b/erpnext/public/js/payment/payments.js
@@ -57,6 +57,13 @@
 					currency: me.frm.doc.currency,
 					type: data.type
 				})).appendTo(multimode_payments)
+
+				if (data.type == 'Cash' && data.amount == me.frm.doc.paid_amount) {
+					me.idx = data.idx;
+					me.selected_mode = $(me.$body).find(repl("input[idx='%(idx)s']",{'idx': me.idx}));
+					me.highlight_selected_row();
+					me.bind_amount_change_event();
+				}
 			})
 		}else{
 			$("<p>No payment mode selected in pos profile</p>").appendTo(multimode_payments)
@@ -90,8 +97,10 @@
 	bind_payment_mode_keys_event: function(){
 		var me = this;
 		$(this.$body).find('.pos-payment-row').click(function(){
-			me.idx = $(this).attr("idx");
-			me.set_outstanding_amount()
+			if(me.frm.doc.outstanding_amount > 0){
+				me.idx = $(this).attr("idx");
+				me.set_outstanding_amount()
+			}
 		})
 	},
 
@@ -124,12 +133,16 @@
 	
 	bind_amount_change_event: function(){
 		var me = this;
-		me.selected_mode.change(function(){
+		this.selected_mode.change(function(){
 			me.payment_val =  flt($(this).val()) || 0.0;
 			me.selected_mode.val(format_number(me.payment_val, 2))
 			me.idx = me.selected_mode.attr("idx")
 			me.update_paid_amount()
 		})
+
+		this.selected_mode.click(function(){
+			me.selected_mode.select();
+		})
 	},
 
 	clear_amount: function(){
@@ -140,6 +153,7 @@
 			me.selected_mode = $(me.$body).find(repl("input[idx='%(idx)s']",{'idx': me.idx}));
 			me.payment_val = 0.0;
 			me.selected_mode.val(0.0);
+			me.highlight_selected_row();
 			me.update_paid_amount();
 		})
 	},