[minor] removed prevdoc_date
diff --git a/buying/doctype/purchase_common/purchase_common.py b/buying/doctype/purchase_common/purchase_common.py
index 1d57f88..8637e5f 100644
--- a/buying/doctype/purchase_common/purchase_common.py
+++ b/buying/doctype/purchase_common/purchase_common.py
@@ -189,10 +189,3 @@
 			if not submitted:
 				msgprint(cstr(doctype) + ": " + cstr(submitted[0][0]) 
 					+ _(" not submitted"), raise_exception=1)
-
-	def get_prevdoc_date(self, obj):
-		for d in getlist(obj.doclist, obj.fname):
-			if d.prevdoc_doctype and d.prevdoc_docname:
-				dt = webnotes.conn.sql("select transaction_date from `tab%s` where name = %s" 
-					% (d.prevdoc_doctype, '%s'), (d.prevdoc_docname))
-				d.prevdoc_date = dt and dt[0][0].strftime('%Y-%m-%d') or ''
\ No newline at end of file
diff --git a/buying/doctype/purchase_order/purchase_order.js b/buying/doctype/purchase_order/purchase_order.js
index 9967f15..f32f11a 100644
--- a/buying/doctype/purchase_order/purchase_order.js
+++ b/buying/doctype/purchase_order/purchase_order.js
@@ -185,9 +185,9 @@
 			if(cl[i].prevdoc_doctype == 'Material Request' && cl[i].prevdoc_docname && prevdoc_list.indexOf(cl[i].prevdoc_docname) == -1) {
 				prevdoc_list.push(cl[i].prevdoc_docname);
 				if(prevdoc_list.length ==1)
-					out += make_row(cl[i].prevdoc_doctype, cl[i].prevdoc_docname, cl[i].prevdoc_date,0);
+					out += make_row(cl[i].prevdoc_doctype, cl[i].prevdoc_docname, null,0);
 				else
-					out += make_row('', cl[i].prevdoc_docname, cl[i].prevdoc_date,0);
+					out += make_row('', cl[i].prevdoc_docname,null,0);
 			}
 		}
 	}
diff --git a/buying/doctype/purchase_order/purchase_order.py b/buying/doctype/purchase_order/purchase_order.py
index dc75466..cf207bb 100644
--- a/buying/doctype/purchase_order/purchase_order.py
+++ b/buying/doctype/purchase_order/purchase_order.py
@@ -41,7 +41,6 @@
 
 		pc_obj = get_obj(dt='Purchase Common')
 		pc_obj.validate_for_items(self)
-		pc_obj.get_prevdoc_date(self)
 		self.check_for_stopped_status(pc_obj)
 
 		self.validate_uom_is_integer("uom", "qty")
diff --git a/buying/doctype/purchase_order_item/purchase_order_item.txt b/buying/doctype/purchase_order_item/purchase_order_item.txt
index 36b81d2..fade98f 100755
--- a/buying/doctype/purchase_order_item/purchase_order_item.txt
+++ b/buying/doctype/purchase_order_item/purchase_order_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-24 19:29:06", 
   "docstatus": 0, 
-  "modified": "2013-08-07 14:44:12", 
+  "modified": "2013-10-10 17:01:57", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -308,21 +308,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "prevdoc_date", 
-  "fieldtype": "Date", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Material Request Date", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "prevdoc_detail_docname", 
   "fieldtype": "Data", 
   "hidden": 1, 
diff --git a/buying/doctype/supplier_quotation/supplier_quotation.py b/buying/doctype/supplier_quotation/supplier_quotation.py
index c3d2f78..8c5224e 100644
--- a/buying/doctype/supplier_quotation/supplier_quotation.py
+++ b/buying/doctype/supplier_quotation/supplier_quotation.py
@@ -54,7 +54,6 @@
 	def validate_common(self):
 		pc = get_obj('Purchase Common')
 		pc.validate_for_items(self)
-		pc.get_prevdoc_date(self)
 
 @webnotes.whitelist()
 def make_purchase_order(source_name, target_doclist=None):
diff --git a/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt b/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
index 1d16291..515cdb2 100644
--- a/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
+++ b/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-22 12:43:10", 
   "docstatus": 0, 
-  "modified": "2013-08-07 14:44:18", 
+  "modified": "2013-10-10 17:02:11", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -261,21 +261,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "prevdoc_date", 
-  "fieldtype": "Date", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Material Request Date", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "prevdoc_detail_docname", 
   "fieldtype": "Data", 
   "hidden": 1, 
diff --git a/controllers/buying_controller.py b/controllers/buying_controller.py
index 3de550c..2e55aee 100644
--- a/controllers/buying_controller.py
+++ b/controllers/buying_controller.py
@@ -14,6 +14,7 @@
 class WrongWarehouseCompany(Exception): pass
 
 class BuyingController(StockController):
+
 	def onload_post_render(self):
 		# contact, address, item details
 		self.set_missing_values()
@@ -280,6 +281,3 @@
 					(", ".join((["%s"]*len(item_codes))),), item_codes)]
 
 		return self._purchase_items
-
-	def get_bin_details(self, arg):
-		return {"projected_qty": webnotes.conn.get_value("Bin", json.loads(arg), "projected_qty") or 0 }
diff --git a/selling/doctype/installation_note/installation_note.py b/selling/doctype/installation_note/installation_note.py
index ca47043..02b7247 100644
--- a/selling/doctype/installation_note/installation_note.py
+++ b/selling/doctype/installation_note/installation_note.py
@@ -38,7 +38,6 @@
 		self.check_item_table()
 		sales_com_obj = get_obj(dt = 'Sales Common')
 		sales_com_obj.check_active_sales_items(self)
-		sales_com_obj.get_prevdoc_date(self)
 
 	def validate_fiscal_year(self):
 		from accounts.utils import validate_fiscal_year
diff --git a/selling/doctype/installation_note_item/installation_note_item.txt b/selling/doctype/installation_note_item/installation_note_item.txt
index 02871ad..7435d46 100644
--- a/selling/doctype/installation_note_item/installation_note_item.txt
+++ b/selling/doctype/installation_note_item/installation_note_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-02-22 01:27:51", 
   "docstatus": 0, 
-  "modified": "2013-07-10 14:54:09", 
+  "modified": "2013-10-10 17:02:31", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -50,18 +50,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "prevdoc_date", 
-  "fieldtype": "Date", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Delivery Date", 
-  "oldfieldname": "prevdoc_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "serial_no", 
   "fieldtype": "Small Text", 
   "in_list_view": 1, 
diff --git a/selling/doctype/sales_common/sales_common.py b/selling/doctype/sales_common/sales_common.py
index 634ea2a..01718dd 100644
--- a/selling/doctype/sales_common/sales_common.py
+++ b/selling/doctype/sales_common/sales_common.py
@@ -298,25 +298,6 @@
 			exact_outstanding = flt(tot_outstanding) + flt(grand_total)
 			get_obj('Account',acc_head[0][0]).check_credit_limit(acc_head[0][0], obj.doc.company, exact_outstanding)
 
-	def get_prevdoc_date(self, obj):
-		for d in getlist(obj.doclist, obj.fname):
-			date_field = None
-
-			pdoctype, pname = d.prevdoc_doctype, d.prevdoc_docname
-
-			if d.against_sales_invoice:
-				pdoctype, pname = "Sales Invoice", d.against_sales_invoice
-			elif d.against_sales_order:
-				pdoctype, pname = "Sales Order", d.against_sales_order
-
-			if pdoctype and pname:
-				if pdoctype in ["Sales Invoice", "Delivery Note"]:
-					date_field = "posting_date"
-				else:
-					date_field = "transaction_date"
-
-				d.prevdoc_date = webnotes.conn.get_value(pdoctype, pname, date_field)
-
 def get_batch_no(doctype, txt, searchfield, start, page_len, filters):
 	from controllers.queries import get_match_cond
 
diff --git a/stock/doctype/delivery_note/delivery_note.js b/stock/doctype/delivery_note/delivery_note.js
index edfd6ff..29b3e47 100644
--- a/stock/doctype/delivery_note/delivery_note.js
+++ b/stock/doctype/delivery_note/delivery_note.js
@@ -184,9 +184,9 @@
 			if(cl[i].against_sales_order && prevdoc_list.indexOf(cl[i].against_sales_order) == -1) {
 				prevdoc_list.push(cl[i].against_sales_order);
 				if(prevdoc_list.length ==1)
-					out += make_row("Sales Order", cl[i].against_sales_order, cl[i].prevdoc_date, 0);
+					out += make_row("Sales Order", cl[i].against_sales_order, null, 0);
 				else
-					out += make_row('', cl[i].against_sales_order, cl[i].prevdoc_date,0);
+					out += make_row('', cl[i].against_sales_order, null,0);
 			}
 		}
 	}
diff --git a/stock/doctype/delivery_note/delivery_note.py b/stock/doctype/delivery_note/delivery_note.py
index 2819085..deaf024 100644
--- a/stock/doctype/delivery_note/delivery_note.py
+++ b/stock/doctype/delivery_note/delivery_note.py
@@ -86,7 +86,6 @@
 		sales_com_obj = get_obj(dt = 'Sales Common')
 		sales_com_obj.check_stop_sales_order(self)
 		sales_com_obj.check_active_sales_items(self)
-		sales_com_obj.get_prevdoc_date(self)
 		self.validate_for_items()
 		self.validate_warehouse()
 		self.validate_uom_is_integer("stock_uom", "qty")
@@ -366,7 +365,6 @@
 def make_installation_note(source_name, target_doclist=None):
 	def update_item(obj, target, source_parent):
 		target.qty = flt(obj.qty) - flt(obj.installed_qty)
-		target.prevdoc_date = source_parent.posting_date
 		target.serial_no = obj.serial_no
 	
 	doclist = get_mapped_doclist("Delivery Note", source_name, 	{
diff --git a/stock/doctype/delivery_note_item/delivery_note_item.txt b/stock/doctype/delivery_note_item/delivery_note_item.txt
index 4162187..8d1792d 100644
--- a/stock/doctype/delivery_note_item/delivery_note_item.txt
+++ b/stock/doctype/delivery_note_item/delivery_note_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-04-22 13:15:44", 
   "docstatus": 0, 
-  "modified": "2013-10-03 11:09:48", 
+  "modified": "2013-10-10 17:03:11", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -364,19 +364,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "prevdoc_date", 
-  "fieldtype": "Date", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Against Document Date", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "prevdoc_detail_docname", 
   "fieldtype": "Data", 
   "hidden": 1, 
diff --git a/stock/doctype/purchase_receipt/purchase_receipt.py b/stock/doctype/purchase_receipt/purchase_receipt.py
index 1e1f1eaf..2dd450f 100644
--- a/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -59,7 +59,6 @@
 
 		pc_obj = get_obj(dt='Purchase Common')
 		pc_obj.validate_for_items(self)
-		pc_obj.get_prevdoc_date(self)
 		self.check_for_stopped_status(pc_obj)
 
 		# sub-contracting
diff --git a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
index ce49168..9c0d0fb 100755
--- a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
+++ b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-24 19:29:10", 
   "docstatus": 0, 
-  "modified": "2013-09-20 11:36:55", 
+  "modified": "2013-10-10 17:02:51", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -426,19 +426,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "prevdoc_date", 
-  "fieldtype": "Date", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Purchase Order Date", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "rm_supp_cost", 
   "fieldtype": "Currency", 
   "hidden": 1,