diff --git a/erpnext/selling/doctype/sales_common/sales_common.py b/erpnext/selling/doctype/sales_common/sales_common.py
index f942a2f..94fabec 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.py
+++ b/erpnext/selling/doctype/sales_common/sales_common.py
@@ -358,46 +358,64 @@
 				'rate'	:	rate and flt(rate[0]['tax_rate']) or 0
 			}
 		return ret
-		
-	# --------------
-	# get item list
-	# --------------
+
+
 	def get_item_list(self, obj, is_stopped):
+		"""get item list"""
 		il = []
 		for d in getlist(obj.doclist,obj.fname):
-			reserved_qty = 0		# used for delivery note
+			reserved_wh, reserved_qty = '', 0		# used for delivery note
 			qty = flt(d.qty)
 			if is_stopped:
 				qty = flt(d.qty) > flt(d.delivered_qty) and flt(flt(d.qty) - flt(d.delivered_qty)) or 0
 				
-			if d.prevdoc_doctype == 'Sales Order':			# used in delivery note to reduce reserved_qty 
+			if d.prevdoc_doctype == 'Sales Order':			
+				# used in delivery note to reduce reserved_qty 
 				# Eg.: if SO qty is 10 and there is tolerance of 20%, then it will allow DN of 12.
 				# But in this case reserved qty should only be reduced by 10 and not 12.
 
-				tot_qty, max_qty, tot_amt, max_amt = self.get_curr_and_ref_doc_details(d.doctype, 'prevdoc_detail_docname', d.prevdoc_detail_docname, 'Sales Order Item', obj.doc.name, obj.doc.doctype)
+				tot_qty, max_qty, tot_amt, max_amt, reserved_wh = self.get_curr_and_ref_doc_details(d.doctype, 'prevdoc_detail_docname', d.prevdoc_detail_docname, obj.doc.name, obj.doc.doctype)
 				if((flt(tot_qty) + flt(qty) > flt(max_qty))):
 					reserved_qty = -(flt(max_qty)-flt(tot_qty))
 				else:	
 					reserved_qty = - flt(qty)
-			
-			warehouse = (obj.fname == "sales_order_details") and d.reserved_warehouse or d.warehouse
-			
+					
+			if obj.doc.doctype == 'Sales Order':
+				reserved_wh = d.reserved_warehouse
+						
 			if self.has_sales_bom(d.item_code):
 				for p in getlist(obj.doclist, 'packing_details'):
-					#if p.parent_item == d.item_code: -- this fails when item with same name appears more than once in delivery note item table
 					if p.parent_detail_docname == d.name:
 						# the packing details table's qty is already multiplied with parent's qty
-						il.append([warehouse, p.item_code, flt(p.qty), (flt(p.qty)/qty)*(reserved_qty), p.uom, p.batch_no, p.serial_no])
+						il.append({
+							'warehouse': d.warehouse,
+							'reserved_warehouse': reserved_wh,
+							'item_code': p.item_code,
+							'qty': flt(p.qty),
+							'reserved_qty': (flt(p.qty)/qty)*(reserved_qty),
+							'uom': p.uom,
+							'batch_no': p.batch_no,
+							'serial_no': p.serial_no
+						})
 			else:
-				il.append([warehouse, d.item_code, qty, reserved_qty, d.stock_uom, d.batch_no, d.serial_no])
+				il.append({
+					'warehouse': d.warehouse,
+					'reserved_warehouse': reserved_wh,
+					'item_code': d.item_code,
+					'qty': qty,
+					'reserved_qty': reserved_qty,
+					'uom': d.stock_uom,
+					'batch_no': d.batch_no,
+					'serial_no': d.serial_no
+				})
 		return il
 
-	# ---------------------------------------------------------------------------------------------
-	# get qty, amount already billed or delivered against curr line item for current doctype
-	# For Eg: SO-RV get total qty, amount from SO and also total qty, amount against that SO in RV
-	# ---------------------------------------------------------------------------------------------
-	def get_curr_and_ref_doc_details(self, curr_doctype, ref_tab_fname, ref_tab_dn, ref_doc_tname, curr_parent_name, curr_parent_doctype):
-		# Get total qty, amt of current doctype (eg RV) except for qty, amt of this transaction
+
+	def get_curr_and_ref_doc_details(self, curr_doctype, ref_tab_fname, ref_tab_dn, curr_parent_name, curr_parent_doctype):
+		""" Get qty, amount already billed or delivered against curr line item for current doctype
+			For Eg: SO-RV get total qty, amount from SO and also total qty, amount against that SO in RV
+		"""
+		#Get total qty, amt of current doctype (eg RV) except for qty, amt of this transaction
 		if curr_parent_doctype == 'Installation Note':
 			curr_det = webnotes.conn.sql("select sum(qty) from `tab%s` where %s = '%s' and docstatus = 1 and parent != '%s'"% (curr_doctype, ref_tab_fname, ref_tab_dn, curr_parent_name))
 			qty, amt = curr_det and flt(curr_det[0][0]) or 0, 0
@@ -406,10 +424,9 @@
 			qty, amt = curr_det and flt(curr_det[0][0]) or 0, curr_det and flt(curr_det[0][1]) or 0
 
 		# get total qty of ref doctype
-		ref_det = webnotes.conn.sql("select qty, amount from `tab%s` where name = '%s' and docstatus = 1"% (ref_doc_tname, ref_tab_dn))
-		max_qty, max_amt = ref_det and flt(ref_det[0][0]) or 0, ref_det and flt(ref_det[0][1]) or 0
-
-		return qty, max_qty, amt, max_amt
+		so_det = webnotes.conn.sql("select qty, amount, reserved_warehouse from `tabSales Order Item` where name = '%s' and docstatus = 1"% ref_tab_dn)
+		max_qty, max_amt, res_wh = so_det and flt(so_det[0][0]) or 0, so_det and flt(so_det[0][1]) or 0, so_det and cstr(so_det[0][2]) or ''
+		return qty, max_qty, amt, max_amt, res_wh
 
 
 	# Make Packing List from Sales BOM
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 660a288..1c24cfb 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -457,12 +457,15 @@
 	# ===============================================================================================
 	def update_stock_ledger(self, update_stock, clear = 0):
 		for d in self.get_item_list(clear):
-			stock_item = sql("SELECT is_stock_item FROM tabItem where name = '%s'"%(d[1]),as_dict = 1)			 # stock ledger will be updated only if it is a stock item
+			stock_item = sql("SELECT is_stock_item FROM tabItem where name = '%s'"%(d['item_code']),as_dict = 1)
+			# stock ledger will be updated only if it is a stock item
 			if stock_item and stock_item[0]['is_stock_item'] == "Yes":
-				if not d[0]:
-					msgprint("Message: Please enter Reserved Warehouse for item %s as it is stock item."% d[1])
+				if not d['reserved_warehouse']:
+					msgprint("Message: Please enter Reserved Warehouse for item %s as it is stock item."% d['item_code'])
 					raise Exception
-				bin = get_obj('Warehouse', d[0]).update_bin( 0, flt(update_stock) * flt(d[2]), 0, 0, 0, d[1], self.doc.transaction_date,doc_type=self.doc.doctype,doc_name=self.doc.name, is_amended = (self.doc.amended_from and 'Yes' or 'No'))
+				bin = get_obj('Warehouse', d['reserved_warehouse']).update_bin( 0, flt(update_stock) * flt(d['qty']), \
+					0, 0, 0, d['item_code'], self.doc.transaction_date,doc_type=self.doc.doctype,\
+					doc_name=self.doc.name, is_amended = (self.doc.amended_from and 'Yes' or 'No'))
 	
 	# Gets Items from packing list
 	#=================================
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index 9c640f4..dce4eae 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -297,13 +297,13 @@
 	# check if same item, warehouse present in prevdoc
 	# ------------------------------------------------------------------
 	def validate_items_with_prevdoc(self, d):
-		if d.prevdoc_doctype == 'Sales Order':
-			data = sql("select item_code, reserved_warehouse from `tabSales Order Item` where parent = '%s' and name = '%s'" % (d.prevdoc_docname, d.prevdoc_detail_docname))
-		if d.prevdoc_doctype == 'Purchase Receipt':
-			data = sql("select item_code, rejected_warehouse from `tabPurchase Receipt Item` where parent = '%s' and name = '%s'" % (d.prevdoc_docname, d.prevdoc_detail_docname))
-		if not data or data[0][0] != d.item_code or data[0][1] != d.warehouse:
-			msgprint("Item: %s / Warehouse: %s is not matching with Sales Order: %s. Sales Order might be modified after fetching data from it. Please delete items and fetch again." % (d.item_code, d.warehouse, d.prevdoc_docname))
-			raise Exception
+		prev_item_dt = (d.prevdoc_doctype == 'Sales Order') and 'Sales Order Item' or 'Purchase Receipt Item'
+		data = sql("select item_code from `tab%s` where parent = '%s' and name = '%s'"\
+		 	% (prev_item_dt, d.prevdoc_docname, d.prevdoc_detail_docname))
+		if not data or data[0][0] != d.item_code:
+			msgprint("Item: %s is not matching with Sales Order: %s. Sales Order might be modified after \
+				fetching data from it. Please delete items and fetch again." \
+				% (d.item_code, d.prevdoc_docname), raise_exception=1)
 
 
 	# ********* UPDATE CURRENT STOCK *****************************
@@ -413,16 +413,19 @@
 	def update_stock_ledger(self, update_stock, is_stopped = 0):
 		self.values = []
 		for d in self.get_item_list(is_stopped):
-			stock_item = sql("SELECT is_stock_item, is_sample_item FROM tabItem where name = '%s'"%(d[1]), as_dict = 1) # stock ledger will be updated only if it is a stock item
+			stock_item = sql("SELECT is_stock_item, is_sample_item FROM tabItem where name = '%s'"%(d['item_code']), as_dict = 1) # stock ledger will be updated only if it is a stock item
 			if stock_item[0]['is_stock_item'] == "Yes":
-				if not d[0]:
-					msgprint("Message: Please enter Warehouse for item %s as it is stock item."% d[1])
+				if not d['warehouse']:
+					msgprint("Message: Please enter Warehouse for item %s as it is stock item."% d['item_code'])
 					raise Exception
-				if d[3] < 0 :
-					# Reduce Reserved Qty from warehouse
-					bin = get_obj('Warehouse', d[0]).update_bin(0, flt(update_stock) * flt(d[3]), 0, 0, 0, d[1], self.doc.transaction_date,doc_type=self.doc.doctype,doc_name=self.doc.name, is_amended = (self.doc.amended_from and 'Yes' or 'No'))
+				if d['reserved_qty'] < 0 :
+					# Reduce reserved qty from reserved warehouse mentioned in so
+					bin = get_obj('Warehouse', d['reserved_warehouse']).update_bin(0, flt(update_stock) * flt(d['reserved_qty']), \
+						0, 0, 0, d['item_code'], self.doc.transaction_date,doc_type=self.doc.doctype, \
+						doc_name=self.doc.name, is_amended = (self.doc.amended_from and 'Yes' or 'No'))
+						
 				# Reduce actual qty from warehouse
-				self.make_sl_entry(d, d[0], - flt(d[2]) , 0, update_stock)
+				self.make_sl_entry(d, d['warehouse'], - flt(d['qty']) , 0, update_stock)
 		get_obj('Stock Ledger', 'Stock Ledger').update_stock(self.values)
 
 
@@ -434,22 +437,22 @@
 	# ********************** Make Stock Entry ************************************
 	def make_sl_entry(self, d, wh, qty, in_value, update_stock):
 		self.values.append({
-			'item_code'					 : d[1],
-			'warehouse'					 : wh,
-			'transaction_date'		: getdate(self.doc.modified).strftime('%Y-%m-%d'),
+			'item_code'					: d['item_code'],
+			'warehouse'					: wh,
+			'transaction_date'			: getdate(self.doc.modified).strftime('%Y-%m-%d'),
 			'posting_date'				: self.doc.posting_date,
 			'posting_time'				: self.doc.posting_time,
 			'voucher_type'				: 'Delivery Note',
-			'voucher_no'					: self.doc.name,
-			'voucher_detail_no'	 : '',
-			'actual_qty'					: qty,
-			'stock_uom'					 : d[4],
-			'incoming_rate'			 : in_value,
-			'company'						 : self.doc.company,
-			'fiscal_year'				 : self.doc.fiscal_year,
+			'voucher_no'				: self.doc.name,
+			'voucher_detail_no'	 		: '',
+			'actual_qty'				: qty,
+			'stock_uom'					: d['uom'],
+			'incoming_rate'			 	: in_value,
+			'company'					: self.doc.company,
+			'fiscal_year'				: self.doc.fiscal_year,
 			'is_cancelled'				: (update_stock==1) and 'No' or 'Yes',
-			'batch_no'						: d[5],
-			'serial_no'					 : d[6]
+			'batch_no'					: d['batch_no'],
+			'serial_no'					: d['serial_no']
 		})
 
 
