Merge pull request #2375 from nabinhait/fix1

Check credit limit only if customer debited
diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher.py b/erpnext/accounts/doctype/journal_voucher/journal_voucher.py
index c6299ed..7a833f7 100644
--- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.py
+++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.py
@@ -385,7 +385,7 @@
 		for d in self.get("entries"):
 			master_type, master_name = frappe.db.get_value("Account", d.account,
 				["master_type", "master_name"])
-			if master_type == "Customer" and master_name:
+			if master_type == "Customer" and master_name and flt(d.debit) > 0:
 				super(JournalVoucher, self).check_credit_limit(d.account)
 
 	def get_balance(self):