Merge pull request #3369 from anandpdoshi/anand-may-27

Check if company exists in re-order item
This commit is contained in:
Rushabh Mehta 2015-05-28 10:45:27 +05:30
commit 960118a954

View File

@ -7,7 +7,7 @@ from frappe.utils import flt, cstr, nowdate, add_days, cint
def reorder_item():
""" Reorder item if stock reaches reorder level"""
# if initial setup not completed, return
if not frappe.db.sql("select name from `tabFiscal Year` limit 1"):
if not (frappe.db.a_row_exists("Company") and frappe.db.a_row_exists("Fiscal Year")):
return
if cint(frappe.db.get_value('Stock Settings', None, 'auto_indent')):