fix: sales percentage equal to 100

This commit is contained in:
Himanshu Warekar 2019-05-03 13:11:05 +05:30 committed by Nabin Hait
parent 5ca977a41c
commit 40b99e3347

View File

@ -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