Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/stock/doctype/bin/bin.py b/stock/doctype/bin/bin.py
index cd2fa28..65b8686 100644
--- a/stock/doctype/bin/bin.py
+++ b/stock/doctype/bin/bin.py
@@ -61,7 +61,8 @@
sr_count = sql("select count(name) from `tabSerial No` where item_code = '%s' and warehouse = '%s' and status ='In Store' and docstatus != 2" % (self.doc.item_code, self.doc.warehouse))[0][0]
if sr_count != self.doc.actual_qty:
msg = "Actual Qty(%s) in Bin is mismatched with total number(%s) of serial no in store for item: '%s' and warehouse: '%s'" % (self.doc.actual_qty, sr_count, self.doc.item_code, self.doc.warehouse)
- sendmail(['developer@iwebnotes.com'], sender='automail@webnotestech.com', subject='Serial No Count vs Bin Actual Qty', parts=[['text/plain', msg]])
+ if getattr(webnotes.defs,'admin_email_notification',1):
+ sendmail(['developers@iwebnotes.com'], sender='automail@webnotestech.com', subject='Serial No Count vs Bin Actual Qty', parts=[['text/plain', msg]])
msgprint(msg, raise_exception=1)
# --------------------------------