diff --git a/accounts/doctype/sales_invoice/sales_invoice.py b/accounts/doctype/sales_invoice/sales_invoice.py
index c282e0f..3324c42 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/accounts/doctype/sales_invoice/sales_invoice.py
@@ -620,11 +620,11 @@
 		# expense account gl entries
 		if cint(webnotes.defaults.get_global_default("perpetual_accounting")) \
 				and cint(self.doc.update_stock):
-			
 			for item in self.doclist.get({"parentfield": "entries"}):
 				self.check_expense_account(item)
 			
 				if item.buying_amount:
+					
 					gl_entries += self.get_gl_entries_for_stock(item.expense_account, 
 						-1*item.buying_amount, item.warehouse, cost_center=item.cost_center)
 				
diff --git a/accounts/doctype/sales_invoice/test_sales_invoice.py b/accounts/doctype/sales_invoice/test_sales_invoice.py
index 47ff6e4..d6bad45 100644
--- a/accounts/doctype/sales_invoice/test_sales_invoice.py
+++ b/accounts/doctype/sales_invoice/test_sales_invoice.py
@@ -298,7 +298,7 @@
 			
 	def test_sales_invoice_gl_entry_without_aii(self):
 		webnotes.defaults.set_global_default("perpetual_accounting", 0)
-		
+		self.clear_stock_account_balance()
 		si = webnotes.bean(copy=test_records[1])
 		si.insert()
 		si.submit()
@@ -306,6 +306,7 @@
 		gl_entries = webnotes.conn.sql("""select account, debit, credit
 			from `tabGL Entry` where voucher_type='Sales Invoice' and voucher_no=%s
 			order by account asc""", si.doc.name, as_dict=1)
+		
 		self.assertTrue(gl_entries)
 		
 		expected_values = sorted([
@@ -330,7 +331,7 @@
 		
 		self.assertEquals(gle_count[0][0], 8)
 		
-	def atest_pos_gl_entry_with_aii(self):
+	def test_pos_gl_entry_with_aii(self):
 		webnotes.conn.sql("delete from `tabStock Ledger Entry`")
 		webnotes.defaults.set_global_default("perpetual_accounting", 1)
 		
@@ -644,6 +645,11 @@
 		count = no_of_months == 12 and 3 or 13
 		for i in xrange(count):
 			base_si = _test(i)
+			
+	def clear_stock_account_balance(self):
+		webnotes.conn.sql("delete from `tabStock Ledger Entry`")
+		webnotes.conn.sql("delete from tabBin")
+		webnotes.conn.sql("delete from `tabGL Entry`")
 		
 test_dependencies = ["Journal Voucher", "POS Setting", "Contact", "Address"]
 
diff --git a/accounts/general_ledger.py b/accounts/general_ledger.py
index c35e31e..959bfbb 100644
--- a/accounts/general_ledger.py
+++ b/accounts/general_ledger.py
@@ -53,7 +53,7 @@
 	total_debit = total_credit = 0.0
 	def _swap(gle):
 		gle.debit, gle.credit = abs(flt(gle.credit)), abs(flt(gle.debit))
-			
+	
 	for entry in gl_map:
 		gle = Document('GL Entry', fielddata=entry)
 		
@@ -83,9 +83,7 @@
 		# update total debit / credit
 		total_debit += flt(gle.debit)
 		total_credit += flt(gle.credit)
-		
-		# print gle.account, gle.debit, gle.credit, total_debit, total_credit
-		
+				
 	if not cancel:
 		validate_total_debit_credit(total_debit, total_credit)
 	
diff --git a/accounts/utils.py b/accounts/utils.py
index 29bf638..e3c0691 100644
--- a/accounts/utils.py
+++ b/accounts/utils.py
@@ -374,8 +374,7 @@
 		account_balance = get_balance_on(account)
 		stock_value = sum([sum(bin_map.get(warehouse, {}).values()) 
 			for warehouse in warehouse_list])
-		
-		if flt(stock_value) - flt(account_balance):
+		if abs(flt(stock_value) - flt(account_balance)) > 0.005:
 			difference.setdefault(account, flt(stock_value) - flt(account_balance))
-	
+
 	return difference
diff --git a/controllers/stock_controller.py b/controllers/stock_controller.py
index a66e190..0c95c49 100644
--- a/controllers/stock_controller.py
+++ b/controllers/stock_controller.py
@@ -38,12 +38,11 @@
 			return gl_entries
 			
 	def sync_stock_account_balance(self, warehouse_list, cost_center=None, posting_date=None):
-		print "sync_stock_account_balance"
+		# print "sync_stock_account_balance"
 		from accounts.utils import get_stock_and_account_difference
 		acc_diff = get_stock_and_account_difference(warehouse_list)
 		if not cost_center:
 			cost_center = self.get_company_default("cost_center")
-		print acc_diff
 		gl_entries = []
 		for account, diff in acc_diff.items():
 			if diff:
diff --git a/stock/doctype/delivery_note/test_delivery_note.py b/stock/doctype/delivery_note/test_delivery_note.py
index 3f7c753..f1237fe 100644
--- a/stock/doctype/delivery_note/test_delivery_note.py
+++ b/stock/doctype/delivery_note/test_delivery_note.py
@@ -18,7 +18,7 @@
 		
 	def test_over_billing_against_dn(self):
 		from stock.doctype.delivery_note.delivery_note import make_sales_invoice
-		
+		self._insert_purchase_receipt()
 		dn = webnotes.bean(copy=test_records[0]).insert()
 		
 		self.assertRaises(webnotes.ValidationError, make_sales_invoice, 
@@ -55,6 +55,7 @@
 	def test_delivery_note_gl_entry(self):
 		webnotes.conn.sql("""delete from `tabBin`""")
 		webnotes.conn.sql("delete from `tabStock Ledger Entry`")
+		webnotes.conn.sql("delete from `tabGL Entry`")
 		
 		webnotes.defaults.set_global_default("perpetual_accounting", 1)
 		self.assertEqual(cint(webnotes.defaults.get_global_default("perpetual_accounting")), 1)
@@ -65,8 +66,8 @@
 		dn.doclist[1].expense_account = "Cost of Goods Sold - _TC"
 		dn.doclist[1].cost_center = "Main - _TC"
 
-		stock_in_hand_account = webnotes.conn.get_value("Company", dn.doc.company, 
-			"stock_in_hand_account")
+		stock_in_hand_account = webnotes.conn.get_value("Warehouse", dn.doclist[1].warehouse, 
+			"account")
 		
 		from accounts.utils import get_balance_on
 		prev_bal = get_balance_on(stock_in_hand_account, dn.doc.posting_date)
diff --git a/stock/doctype/stock_reconciliation/stock_reconciliation.py b/stock/doctype/stock_reconciliation/stock_reconciliation.py
index fc3b1bd..c91344f 100644
--- a/stock/doctype/stock_reconciliation/stock_reconciliation.py
+++ b/stock/doctype/stock_reconciliation/stock_reconciliation.py
@@ -323,8 +323,7 @@
 		if gl_entries:
 			from accounts.general_ledger import make_gl_entries
 			make_gl_entries(gl_entries, cancel=self.doc.docstatus == 2)
-			print webnotes.conn.sql("""select name, posting_date, stock_value from `tabStock Ledger Entry`""")
-			print webnotes.conn.sql("""select stock_value from tabBin""")
+
 			self.sync_stock_account_balance(warehouse_list, self.doc.cost_center)
 			
 	def validate_expense_account(self):
diff --git a/stock/doctype/stock_reconciliation/test_stock_reconciliation.py b/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
index b7dae32..503501f 100644
--- a/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
+++ b/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
@@ -12,7 +12,7 @@
 
 
 class TestStockReconciliation(unittest.TestCase):
-	def atest_reco_for_fifo(self):
+	def test_reco_for_fifo(self):
 		webnotes.defaults.set_global_default("perpetual_accounting", 0)
 		# [[qty, valuation_rate, posting_date, 
 		#		posting_time, expected_stock_value, bin_qty, bin_valuation]]
@@ -56,7 +56,7 @@
 			self.assertFalse(gl_entries)
 			
 		
-	def atest_reco_for_moving_average(self):
+	def test_reco_for_moving_average(self):
 		webnotes.defaults.set_global_default("perpetual_accounting", 0)
 		# [[qty, valuation_rate, posting_date, 
 		#		posting_time, expected_stock_value, bin_qty, bin_valuation]]
@@ -107,18 +107,18 @@
 		
 		# [[qty, valuation_rate, posting_date, posting_time, stock_in_hand_debit]]
 		input_data = [
-			[50, 1000, "2012-12-26", "12:00", 38000], 
-			[5, 1000, "2012-12-26", "12:00", -7000], 
-			[15, 1000, "2012-12-26", "12:00", 3000], 
-			[25, 900, "2012-12-26", "12:00", 10500], 
-			[20, 500, "2012-12-26", "12:00", -2000], 
-			["", 1000, "2012-12-26", "12:05", 3000],
-			[20, "", "2012-12-26", "12:05", 4000],
-			[10, 2000, "2012-12-26", "12:10", 8000],
-			[0, "", "2012-12-26", "12:10", -12000],
-			[50, 1000, "2013-01-01", "12:00", 50000], 
-			[5, 1000, "2013-01-01", "12:00", 5000],
-			[1, 1000, "2012-12-01", "00:00", 1000],
+			[50, 1000, "2012-12-26", "12:00"], 
+			[5, 1000, "2012-12-26", "12:00"], 
+			[15, 1000, "2012-12-26", "12:00"], 
+			[25, 900, "2012-12-26", "12:00"], 
+			[20, 500, "2012-12-26", "12:00"], 
+			["", 1000, "2012-12-26", "12:05"],
+			[20, "", "2012-12-26", "12:05"],
+			[10, 2000, "2012-12-26", "12:10"],
+			[0, "", "2012-12-26", "12:10"],
+			[50, 1000, "2013-01-01", "12:00"], 
+			[5, 1000, "2013-01-01", "12:00"],
+			[1, 1000, "2012-12-01", "00:00"],
 			
 		]
 			
@@ -128,17 +128,14 @@
 			self.insert_existing_sle("FIFO")
 			stock_reco = self.submit_stock_reconciliation(d[0], d[1], d[2], d[3])
 			
-			# check gl_entries
 			self.assertFalse(get_stock_and_account_difference(["_Test Warehouse - _TC"]))
-			print get_balance_on("_Test Account Stock In Hand - _TC")
-			self.assertEquals(get_balance_on("_Test Account Stock In Hand - _TC", d[2]), 38000)
 			# cancel
 			stock_reco.cancel()
-			# self.check_gl_entries(stock_reco.doc.name, -d[4], True)
+			self.assertFalse(get_stock_and_account_difference(["_Test Warehouse - _TC"]))
 		
 		webnotes.defaults.set_global_default("perpetual_accounting", 0)		
 			
-	def atest_reco_moving_average_gl_entries(self):
+	def test_reco_moving_average_gl_entries(self):
 		webnotes.defaults.set_global_default("perpetual_accounting", 1)
 		
 		# [[qty, valuation_rate, posting_date, 
@@ -163,13 +160,11 @@
 			self.cleanup_data()
 			self.insert_existing_sle("Moving Average")
 			stock_reco = self.submit_stock_reconciliation(d[0], d[1], d[2], d[3])
-			
-			# check gl_entries
-			self.check_gl_entries(stock_reco.doc.name, d[4])
+			self.assertFalse(get_stock_and_account_difference(["_Test Warehouse - _TC"]))
 			
 			# cancel
 			stock_reco.cancel()
-			self.check_gl_entries(stock_reco.doc.name, -d[4], True)
+			self.assertFalse(get_stock_and_account_difference(["_Test Warehouse - _TC"]))
 		
 		webnotes.defaults.set_global_default("perpetual_accounting", 0)
 
@@ -197,37 +192,6 @@
 		stock_reco.submit()
 		return stock_reco
 		
-	def check_gl_entries(self, voucher_no, stock_value_diff, cancel=None):
-		stock_in_hand_account = webnotes.conn.get_value("Warehouse", "_Test Warehouse - _TC", 
-			"account")
-		debit_amount = stock_value_diff > 0 and stock_value_diff or 0.0
-		credit_amount = stock_value_diff < 0 and abs(stock_value_diff) or 0.0
-		
-		expected_gl_entries = [
-			[stock_in_hand_account, debit_amount, credit_amount],
-			["Stock Adjustment - _TC", credit_amount, debit_amount]
-		]
-		if cancel:
-			expected_gl_entries = [
-				[stock_in_hand_account, debit_amount, credit_amount],
-				["Stock Adjustment - _TC", credit_amount, debit_amount],
-				[stock_in_hand_account, credit_amount, debit_amount],
-				["Stock Adjustment - _TC", debit_amount, credit_amount]
-			]
-		expected_gl_entries.sort(key=lambda x: x[0])
-		
-		gl_entries = webnotes.conn.sql("""select account, debit, credit
-			from `tabGL Entry` where voucher_type='Stock Reconciliation' and voucher_no=%s 
-			order by account asc, name asc""", voucher_no, as_list=1)
-		self.assertTrue(gl_entries)
-		gl_entries.sort(key=lambda x: x[0])
-		
-		print gl_entries
-		for i, gle in enumerate(gl_entries):
-			self.assertEquals(expected_gl_entries[i][0], gle[0])
-			self.assertEquals(expected_gl_entries[i][1], gle[1])
-			self.assertEquals(expected_gl_entries[i][2], gle[2])
-		
 	def insert_existing_sle(self, valuation_method):
 		webnotes.conn.set_value("Item", "_Test Item", "valuation_method", valuation_method)
 		webnotes.conn.set_default("allow_negative_stock", 1)
