/**
* Setter summer
*/
void setSums() {
Budget productionBudget = null;
ProductAreaGroup productAreaGroup = (ProductAreaGroup) productAreaGroupModel
.getValue(ProductAreaGroupModel.PROPERTY_PRODUCT_AREA_GROUP);
String productAreaGroupName = null;
if (productAreaGroup != null
&& !productAreaGroup.getProductAreaGroupName()
.equalsIgnoreCase("Alle")) {
productAreaGroupName = productAreaGroup.getProductAreaGroupName();
}
SumOrderReadyV sum = managerRepository.getSumOrderReadyVManager()
.findByDateAndProductAreaGroupName(Calendar.getInstance()
.getTime(), productAreaGroupName);
if (sum == null) {
sum = new SumOrderReadyV(null, BigDecimal.valueOf(0), null, null,
null);
}
presentationModelSum.setBean(new SumOrderReadyVModel(sum));
SumOrderReadyV sumWeek = managerRepository.getSumOrderReadyVManager()
.findSumByWeekAndProductAreaGroupName(currentYear, currentWeek,
productAreaGroupName);
if (sumWeek == null) {
sumWeek = new SumOrderReadyV(null, BigDecimal.valueOf(0), null,
null, null);
}
presentationModelWeekSum.setBean(new SumOrderReadyVModel(sumWeek));
productionBudget = managerRepository.getBudgetManager()
.findByYearAndWeekPrProductAreaGroup(currentYear, currentWeek,
productAreaGroup,BudgetType.PRODUCTION);
if (productionBudget == null) {
productionBudget = new Budget(null, null, null,
BigDecimal.valueOf(0), null,null);
}
presentationModelBudget.setBean(new ProductionBudgetModel(
productionBudget));