Fixes to demo
diff --git a/erpnext/demo/user/stock.py b/erpnext/demo/user/stock.py
index ac380f2..ea23853 100644
--- a/erpnext/demo/user/stock.py
+++ b/erpnext/demo/user/stock.py
@@ -85,9 +85,10 @@
 
 def submit_draft_stock_entries():
 	from erpnext.stock.doctype.stock_entry.stock_entry import IncorrectValuationRateError, \
-		DuplicateEntryForProductionOrderError, OperationsNotCompleteError
+		DuplicateEntryForProductionOrderError, OperationsNotCompleteError	
 
 	# try posting older drafts (if exists)
+	frappe.db.commit()
 	for st in frappe.db.get_values("Stock Entry", {"docstatus":0}, "name"):
 		try:
 			ste = frappe.get_doc("Stock Entry", st[0])
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
index 6d6ae97..3811059 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -8,7 +8,7 @@
 
 from frappe import throw, _
 import frappe.defaults
-
+from frappe.utils import getdate
 from erpnext.controllers.buying_controller import BuyingController
 from erpnext.accounts.utils import get_account_currency
 from frappe.desk.notifications import clear_doctype_notifications
@@ -59,7 +59,7 @@
 		pc_obj = frappe.get_doc('Purchase Common')
 		self.check_for_closed_status(pc_obj)
 		
-		if self.posting_date > nowdate():
+		if self.posting_date > getdate(nowdate()):
 			throw(_("Posting Date cannot be future date"))