Fixes to demo

This commit is contained in:
Neil Trini Lasrado 2016-10-28 18:59:33 +05:30
parent 29cae17e87
commit 71e3746a05
2 changed files with 4 additions and 3 deletions

View File

@ -85,9 +85,10 @@ def make_stock_reconciliation():
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])

View File

@ -8,7 +8,7 @@ from frappe.utils import flt, cint, nowdate
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 @@ class PurchaseReceipt(BuyingController):
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"))