Fix bug: Return 0 if budgetAtCompletion has no elements
FEA: ItEr76S15OrganizingPerProjectDashboard
This commit is contained in:
parent
ec4745a100
commit
780120fcb9
1 changed files with 3 additions and 3 deletions
|
|
@ -103,9 +103,9 @@ public class OrderEarnedValueCalculator extends EarnedValueCalculator implements
|
|||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public BigDecimal getBudgetAtCompletion(Order order) {
|
||||
SortedMap<LocalDate, BigDecimal> budgedtedCost = calculateBudgetedCostWorkScheduled(order);
|
||||
LocalDate lastKey = budgedtedCost.lastKey();
|
||||
return (lastKey) != null ? budgedtedCost.get(lastKey) : BigDecimal.ZERO;
|
||||
SortedMap<LocalDate, BigDecimal> budgedtedCost = calculateBudgetedCostWorkScheduled(order);
|
||||
return !budgedtedCost.isEmpty() ? budgedtedCost.get(budgedtedCost
|
||||
.lastKey()) : BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue