Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.Budget


   */
  @Override
  public ProductionBudgetModel getBufferedObjectModel(
      PresentationModel presentationModel) {
    ProductionBudgetModel productionBudgetModel = new ProductionBudgetModel(
        new Budget());
    productionBudgetModel.setBudgetId((Integer) presentationModel
        .getBufferedValue(PROPERTY_BUDGET_ID));
    productionBudgetModel.setBudgetYear((Integer) presentationModel
        .getBufferedValue(PROPERTY_BUDGET_YEAR));
    productionBudgetModel.setBudgetWeek((Integer) presentationModel
View Full Code Here


  }

  private void setBudgetValues(Map<String, SalesmanGoal> salesmanGoals,
      Periode periode) {
    for (SalesmanGoal goal : salesmanGoals.values()) {
      Budget budget = budgetManager.findByYearAndSalesman(periode
          .getYear(), goal.getSalesman(), goal.getProductArea(),
          BudgetType.SALESMAN);
      goal.setBudgetValue(budget.getBudgetValue());
      goal.setBudgetValueOffer(budget.getBudgetValueOffer());
    }

  }
View Full Code Here

    presentationModelTransportSum = new PresentationModel(
        new TransportSumVModel(new TransportSumV(Integer.valueOf(0),
            BigDecimal.valueOf(0), null)));

    presentationModelBudget = new PresentationModel(
        new ProductionBudgetModel(new Budget(null, null, null,
            BigDecimal.valueOf(0), null, null)));

    initProductAreaGroup();
    setTransportSum();
View Full Code Here

            yearWeek.getWeek(), group);

    presentationModelTransportSum.setBean(new TransportSumVModel(sum));

    YearWeek yearWeekMinusOne = Util.addWeek(yearWeek, -1);
    Budget productionBudget = managerRepository.getBudgetManager()
        .findByYearAndWeekPrProductAreaGroup(
            yearWeekMinusOne.getYear(), yearWeekMinusOne.getWeek(),
            group, BudgetType.PRODUCTION);

    presentationModelBudget.setBean(new ProductionBudgetModel(
View Full Code Here

    return salesStatistic;
  }

  private SalesStatistic setSalesBudget(Integer year, Integer week,
      ProductArea productArea, SalesStatistic salesStatistic) {
    Budget salesBudget = budgetManager.findByYearAndWeek(year, week,
        productArea, BudgetType.SALE);
    salesStatistic.setSalesBudget(salesBudget.getBudgetValue());
    Periode periode = new Periode(year, 1, week);
    salesBudget = budgetManager.findSumPrProductAreaAndPeriode(periode,
        productArea, BudgetType.SALE);
    salesStatistic.setAccumulatedSaleBudget(salesBudget.getBudgetValue());
    return salesStatistic;
  }
View Full Code Here

        }
    }

    private void importBudget(final int row, final ExcelUtil excelUtil, final Integer year,
            final ProductArea productArea, BudgetType budgetType) throws ProTransException {
      Budget budget = budgetType.validateAndGetBudget(excelUtil,row,year,productArea,(BudgetDAO)dao,applicationUserDAO);
        saveObject(budget);
    }
View Full Code Here

  /**
   * @see no.ugland.utransprod.gui.handlers.AbstractViewHandler#getNewObject()
   */
  @Override
  public Budget getNewObject() {
    return new Budget();
  }
View Full Code Here

     * @param rowIndex
     * @param columnIndex
     * @return verdi
     */
    public Object getValueAt(int rowIndex, int columnIndex) {
      Budget productionBudget = (Budget) getRow(rowIndex);
      switch (columnIndex) {
      case 0:
        return productionBudget.getBudgetYear();
      case 1:
        return productionBudget.getBudgetWeek();
      case 2:
        return productionBudget.getBudgetValue();
      case 3:
        return productionBudget.getProductArea();
      default:
        throw new IllegalStateException("Unknown column");
      }

    }
View Full Code Here

            null)));
    presentationModelWeekSum = new PresentationModel(
        new SumOrderReadyVModel(new SumOrderReadyV(null, BigDecimal
            .valueOf(0), null, null, null)));
    presentationModelBudget = new PresentationModel(
        new ProductionBudgetModel(new Budget(null, null,
            null, BigDecimal.valueOf(0), null,null)));
    initProductAreaGroup();
    colliListViewHandler = new ColliListViewHandler(login,
        managerRepository, colliSetup);
    colliListViewHandler.addListDataListener(this);
View Full Code Here

          null, null);
    }
    presentationModelWeekSum = new PresentationModel(
        new SumOrderReadyVModel(sumWeek));

    Budget productionBudget = null;
    ProductAreaGroup productAreaGroup = (ProductAreaGroup) productAreaGroupModel
        .getValue(ProductAreaGroupModel.PROPERTY_PRODUCT_AREA_GROUP);
    productionBudget = managerRepository.getBudgetManager()
        .findByYearAndWeekPrProductAreaGroup(currentYear, currentWeek,
            productAreaGroup,BudgetType.PRODUCTION);

    if (productionBudget == null) {
      productionBudget = new Budget(null, null, null,
          BigDecimal.valueOf(0), null,null);
    }

    presentationModelBudget = new PresentationModel(
        new ProductionBudgetModel(productionBudget));
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.model.Budget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.