|
@@ -293,8 +293,8 @@ class HrEfficiency(models.Model):
|
|
|
for indicator in indicators:
|
|
for indicator in indicators:
|
|
|
if indicator.weight > 0:
|
|
if indicator.weight > 0:
|
|
|
indicator_value = indicator.evaluate_formula(efficiency_data)
|
|
indicator_value = indicator.evaluate_formula(efficiency_data)
|
|
|
- # Only count indicators with valid values (not None or 0 when there's data)
|
|
|
|
|
- if indicator_value is not None and indicator_value > 0:
|
|
|
|
|
|
|
+ # Count indicators with valid values (including 0 when it's a valid result)
|
|
|
|
|
+ if indicator_value is not None:
|
|
|
weighted_sum += indicator_value * indicator.weight
|
|
weighted_sum += indicator_value * indicator.weight
|
|
|
total_weight += indicator.weight
|
|
total_weight += indicator.weight
|
|
|
valid_indicators += 1
|
|
valid_indicators += 1
|