mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 17:04:47 +00:00
Merge pull request #3369 from anandpdoshi/anand-may-27
Check if company exists in re-order item
This commit is contained in:
@@ -7,7 +7,7 @@ from frappe.utils import flt, cstr, nowdate, add_days, cint
|
|||||||
def reorder_item():
|
def reorder_item():
|
||||||
""" Reorder item if stock reaches reorder level"""
|
""" Reorder item if stock reaches reorder level"""
|
||||||
# if initial setup not completed, return
|
# 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
|
return
|
||||||
|
|
||||||
if cint(frappe.db.get_value('Stock Settings', None, 'auto_indent')):
|
if cint(frappe.db.get_value('Stock Settings', None, 'auto_indent')):
|
||||||
@@ -159,7 +159,7 @@ def send_email_notification(mr_list):
|
|||||||
msg += "<tr><td>" + item.item_code + "</td><td>" + item.warehouse + "</td><td>" + \
|
msg += "<tr><td>" + item.item_code + "</td><td>" + item.warehouse + "</td><td>" + \
|
||||||
cstr(item.qty) + "</td><td>" + cstr(item.uom) + "</td></tr>"
|
cstr(item.qty) + "</td><td>" + cstr(item.uom) + "</td></tr>"
|
||||||
msg += "</table>"
|
msg += "</table>"
|
||||||
frappe.sendmail(recipients=email_list,
|
frappe.sendmail(recipients=email_list,
|
||||||
subject='Auto Material Request Generation Notification', message = msg)
|
subject='Auto Material Request Generation Notification', message = msg)
|
||||||
|
|
||||||
def notify_errors(exceptions_list):
|
def notify_errors(exceptions_list):
|
||||||
|
|||||||
Reference in New Issue
Block a user