diff --git a/accounts/doctype/sales_invoice/sales_invoice.py b/accounts/doctype/sales_invoice/sales_invoice.py
index 22ac845..620859e 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/accounts/doctype/sales_invoice/sales_invoice.py
@@ -793,7 +793,7 @@
 	def set_buying_amount(self):
 		if cint(self.doc.is_pos) and cint(self.doc.update_stock):
 			stock_ledger_entries = self.get_stock_ledger_entries()
-			item_sales_bom = get_sales_bom()
+			item_sales_bom = get_sales_bom(self.doc.doctype, self.doc.name)
 		else:
 			stock_ledger_entries = item_sales_bom = None
 			
diff --git a/accounts/report/gross_profit/gross_profit.py b/accounts/report/gross_profit/gross_profit.py
index 2480e17..a871bab 100644
--- a/accounts/report/gross_profit/gross_profit.py
+++ b/accounts/report/gross_profit/gross_profit.py
@@ -7,7 +7,8 @@
 	if not filters: filters = {}
 	
 	stock_ledger_entries = get_stock_ledger_entries(filters)
-	item_sales_bom = get_sales_bom()
+	
+	item_sales_bom = get_sales_bom("Delivery Note")
 	
 	delivery_note_items = webnotes.conn.sql("""select dn.name, dn.posting_date, dn.posting_time,
 		dn.project_name, item.item_code, item.item_name, item.description, item.warehouse,
@@ -25,7 +26,9 @@
 	for row in delivery_note_items:
 		selling_amount = flt(row.amount)
 		buying_amount = get_buying_amount(row.item_code, row.warehouse, -1*row.qty, 
-			"Delivery Note", row.name, row.item_row, stock_ledger_entries, item_sales_bom)
+			"Delivery Note", row.name, row.item_row, stock_ledger_entries, 
+			item_sales_bom.get(row.name, webnotes._dict()))
+		
 		buying_amount = buying_amount > 0 and buying_amount or 0
 		
 		if selling_amount:
diff --git a/stock/doctype/delivery_note/delivery_note.py b/stock/doctype/delivery_note/delivery_note.py
index cb7263b..82881c5 100644
--- a/stock/doctype/delivery_note/delivery_note.py
+++ b/stock/doctype/delivery_note/delivery_note.py
@@ -396,7 +396,7 @@
 	def set_buying_amount(self):
 		from stock.utils import get_buying_amount, get_sales_bom
 		stock_ledger_entries = self.get_stock_ledger_entries()
-		item_sales_bom = get_sales_bom()
+		item_sales_bom = get_sales_bom(self.doc.doctype, self.doc.name)
 		
 		if stock_ledger_entries:
 			for item in self.doclist.get({"parentfield": "delivery_note_details"}):
diff --git a/stock/utils.py b/stock/utils.py
index b4d0770..047ff33 100644
--- a/stock/utils.py
+++ b/stock/utils.py
@@ -171,7 +171,8 @@
 		buying_amount = 0.0
 		for bom_item in item_sales_bom[item_code]:
 			buying_amount += _get_buying_amount(voucher_type, voucher_no, "[** No Item Row **]",
-				bom_item.item_code, warehouse, bom_item.qty * qty, stock_ledger_entries)
+				bom_item.item_code, bom_item.warehouse or warehouse, 
+				bom_item.total_qty or (bom_item.qty * qty), stock_ledger_entries)
 		return buying_amount
 	else:
 		# doesn't have sales bom
@@ -184,21 +185,37 @@
 		if sle.voucher_type == voucher_type and sle.voucher_no == voucher_no and \
 			(sle.voucher_detail_no == item_row or (sle.voucher_type != "Stock Reconciliation" 
 			and sle.item_code == item_code and sle.warehouse == warehouse and flt(sle.qty) == qty)):
-				# print "previous_sle", stock_ledger_entries[i+1]
-				# print "current sle", sle
 				previous_stock_value = len(stock_ledger_entries) > i+1 and \
 					flt(stock_ledger_entries[i+1].stock_value) or 0.0
 					
 				buying_amount =  previous_stock_value - flt(sle.stock_value)						
+				
 				return buying_amount
 	return 0.0
 
-def get_sales_bom():
-	item_sales_bom = {}
-	# for r in webnotes.conn.sql("""select parent_item, item_code, qty, warehouse, voucher_detail_no
-	# 	from `tabDelivery Note Packing Item` where docstatus = 1""", as_dict=1):
-	for r in webnotes.conn.sql("""select parent, item_code, qty from `tabSales BOM Item`""",
-	 	as_dict=1):
-			item_sales_bom.setdefault(r.parent, []).append(r)
-			
-	return item_sales_bom
\ No newline at end of file
+def get_sales_bom(doctype=None, docname=None):
+	item_sales_bom = webnotes._dict()
+	
+	query = """select parenttype, parent, parent_item,
+		item_code, warehouse, -1*qty as total_qty
+		from `tabDelivery Note Packing Item` where docstatus=1"""
+	
+	args = {}
+	if doctype:
+		query += " and parenttype=%(parenttype)s"
+		args["parenttype"] = doctype
+		
+		if docname:
+			query += " and parent=%(parent)s"
+			args["parent"] = docname
+	
+	for d in webnotes.conn.sql(query, args, as_dict=1):
+		item_sales_bom.setdefault(d.parenttype, webnotes._dict()).setdefault(d.parent,
+			webnotes._dict()).setdefault(d.parent_item, []).append(d)
+	
+	if doctype and docname:
+		return item_sales_bom[doctype].get(docname, webnotes._dict())
+	elif doctype:
+		return item_sales_bom[doctype]
+	else:
+		return item_sales_bom
