customer.py -- get_credit_limit function which gets called by the above customer_credit_balance report is updated to deduct the amount of sales order for which credit limit bypass flag is set. cint function is added.
diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index 648e129..5a0ddcc 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -191,7 +191,7 @@
 	#PR : 10861, Author : ashish-greycube & jigneshpshah,  Email:mr.ashish.shah@gmail.com 
 	# Since the credit limit check is bypassed at sales order level, when customer credit balance report is run we need to treat sales order with status 'To Deliver and Bill' as not outstanding
 	outstanding_based_on_bypassed_so = 0.0
-	bypass_credit_limit_check_at_sales_order = frappe.db.get_value("Customer", customer, "bypass_credit_limit_check_at_sales_order")
+	bypass_credit_limit_check_at_sales_order = cint(frappe.db.get_value("Customer", customer, "bypass_credit_limit_check_at_sales_order"))
 	if bypass_credit_limit_check_at_sales_order == 1 and caller=='customer_credit_balance_report':
 		outstanding_based_on_bypassed_so = frappe.db.sql("""
 			select (sum(base_grand_total))