mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
fix: calculate percentage only if sales team exist
This commit is contained in:
committed by
Nabin Hait
parent
40b99e3347
commit
fbed6a12d5
@@ -60,6 +60,7 @@ class Customer(TransactionBase):
|
|||||||
if self.loyalty_program == customer.loyalty_program and not self.loyalty_program_tier:
|
if self.loyalty_program == customer.loyalty_program and not self.loyalty_program_tier:
|
||||||
self.loyalty_program_tier = customer.loyalty_program_tier
|
self.loyalty_program_tier = customer.loyalty_program_tier
|
||||||
|
|
||||||
|
if self.sales_team:
|
||||||
allocated_percentage = 0
|
allocated_percentage = 0
|
||||||
for percentage in self.sales_team:
|
for percentage in self.sales_team:
|
||||||
allocated_percentage += percentage.allocated_percentage
|
allocated_percentage += percentage.allocated_percentage
|
||||||
|
|||||||
Reference in New Issue
Block a user