mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
Check credit limit only if customer debited
This commit is contained in:
@@ -385,7 +385,7 @@ class JournalVoucher(AccountsController):
|
|||||||
for d in self.get("entries"):
|
for d in self.get("entries"):
|
||||||
master_type, master_name = frappe.db.get_value("Account", d.account,
|
master_type, master_name = frappe.db.get_value("Account", d.account,
|
||||||
["master_type", "master_name"])
|
["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)
|
super(JournalVoucher, self).check_credit_limit(d.account)
|
||||||
|
|
||||||
def get_balance(self):
|
def get_balance(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user