code cleanup
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index b2172f3..1c5df6e 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -218,7 +218,6 @@
 		var me = this;
 		this.batch_no(doc, cdt, cdn);
 		var item = frappe.get_doc(cdt, cdn);
-		this.batch_no(doc)
 		if(item.item_code && item.warehouse) {
 			return this.frm.call({
 				method: "erpnext.stock.get_item_details.get_available_qty",
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 9ef1a46..6d01c33 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -302,7 +302,7 @@
 	return frappe.db.get_value("Bin", {"item_code": item_code, "warehouse": warehouse},
 		["projected_qty", "actual_qty"], as_dict=True) or {}
 
-@frappe.whitelist(allow_guest=False)
+@frappe.whitelist()
 def get_batch_qty(batch_no,warehouse,item_code):
 	actual_batch_qty = get_actual_batch_qty(batch_no,warehouse,item_code)
 	if batch_no: