From 40b99e3347d9dced7bd73a6e6b180a7c31c23c0b Mon Sep 17 00:00:00 2001 From: Himanshu Warekar Date: Fri, 3 May 2019 13:11:05 +0530 Subject: [PATCH] fix: sales percentage equal to 100 --- erpnext/selling/doctype/customer/customer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index 7328d1d6ae..647e8be192 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -63,8 +63,9 @@ class Customer(TransactionBase): allocated_percentage = 0 for percentage in self.sales_team: allocated_percentage += percentage.allocated_percentage - if allocated_percentage > 100: - frappe.throw(_("Total contribution percentage can't exceed 100")) + + if not allocated_percentage == 100: + frappe.throw(_("Total contribution percentage should be equal to 100")) def check_customer_group_change(self): frappe.flags.customer_group_changed = False