Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.Budget


  /**
   * 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));
View Full Code Here


        productionInterface, "Pakklister", TableEnum.TABLEPACKLIST);
    costTypeTross = aCostTypeTross;
    costUnitTross = aCostUnitTross;
    orderViewHandler = orderViewHandlerFactory.create(true);
    presentationModelBudget = new PresentationModel(
        new ProductionBudgetModel(new Budget(null, null, null,
            BigDecimal.valueOf(0), null, null)));
    presentationModelCount = new PresentationModel(new CountModel(
        Integer.valueOf(0), Integer.valueOf(0)));

    initBudgetAndCount();
View Full Code Here

    YearWeek yearWeekPlussOne = Util.addWeek(
        new YearWeek(Util.getCurrentYear(), Util.getCurrentWeek()), 1);
    ProductAreaGroup group = (ProductAreaGroup) productAreaGroupModel
        .getValue(ProductAreaGroupModel.PROPERTY_PRODUCT_AREA_GROUP);
    Budget productionBudget = managerRepository.getBudgetManager()
        .findByYearAndWeekPrProductAreaGroup(
            yearWeekPlussOne.getYear(), yearWeekPlussOne.getWeek(),
            group, BudgetType.PRODUCTION);

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

    presentationModelBudget.setValue(
        ProductionBudgetModel.PROPERTY_BUDGET_VALUE,
        productionBudget.getBudgetValueString());

    Date fromDateWeek = Util.getFirstDateInWeek(Util.getCurrentYear(),
        Util.getCurrentWeek());
    Date toDateWeek = Util.getLastDateInWeek(Util.getCurrentYear(),
        Util.getCurrentWeek());
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.