set is_cancelled=no when serial no deleted
diff --git a/stock/doctype/bin/bin.py b/stock/doctype/bin/bin.py
index fc51d76..cd2fa28 100644
--- a/stock/doctype/bin/bin.py
+++ b/stock/doctype/bin/bin.py
@@ -61,8 +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)
-				msgprint(msg, raise_exception=1)
 				sendmail(['developer@iwebnotes.com'], sender='automail@webnotestech.com', subject='Serial No Count vs Bin Actual Qty', parts=[['text/plain', msg]])			
+				msgprint(msg, raise_exception=1)
 
 	# --------------------------------
 	# get first stock ledger entry
diff --git a/stock/doctype/serial_no/serial_no.py b/stock/doctype/serial_no/serial_no.py
index cf7fd50..02ce0f8 100644
--- a/stock/doctype/serial_no/serial_no.py
+++ b/stock/doctype/serial_no/serial_no.py
@@ -59,7 +59,7 @@
 	# ------------------------
 	# make stock ledger entry
 	# ------------------------
-	def make_stock_ledger_entry(self, update_stock):
+	def make_stock_ledger_entry(self, qty):
 		from webnotes.model.code import get_obj
 		values = [{
 			'item_code'				: self.doc.item_code,
@@ -70,12 +70,12 @@
 			'voucher_type'			: 'Serial No',
 			'voucher_no'			: self.doc.name,
 			'voucher_detail_no'	 	: '', 
-			'actual_qty'			: 1, 
+			'actual_qty'			: qty, 
 			'stock_uom'				: webnotes.conn.get_value('Item', self.doc.item_code, 'stock_uom'),
 			'incoming_rate'			: self.doc.purchase_rate,
 			'company'				: self.doc.company,
 			'fiscal_year'			: self.doc.fiscal_year,
-			'is_cancelled'			: update_stock and 'No' or 'Yes',
+			'is_cancelled'			: 'No',
 			'batch_no'				: '',
 			'serial_no'				: self.doc.name
 		}]
@@ -87,7 +87,7 @@
 	# ----------
 	def on_update(self):
 		if self.doc.localname and self.doc.warehouse and self.doc.status == 'In Store' and not sql("select name from `tabStock Ledger Entry` where serial_no = '%s' and ifnull(is_cancelled, 'No') = 'No'" % (self.doc.name)):
-			self.make_stock_ledger_entry(update_stock = 1)
+			self.make_stock_ledger_entry(1)
 
 
 	# ---------
@@ -98,7 +98,7 @@
 			msgprint("Cannot trash Serial No : %s as it is already Delivered" % (self.doc.name), raise_exception = 1)
 		else:
 			webnotes.conn.set(self.doc, 'status', 'Not in Use')
-			self.make_stock_ledger_entry(update_stock = 0)
+			self.make_stock_ledger_entry(-1)
 
 
 	def on_cancel(self):
@@ -108,4 +108,4 @@
 	# on restore
 	# -----------
 	def on_restore(self):
-		self.make_stock_ledger_entry(update_stock = 1)
+		self.make_stock_ledger_entry(1)