Package no.ugland.utransprod.util

Examples of no.ugland.utransprod.util.Periode


  @Test
  public void getSalesMapWeek5_2010_Villa() throws Exception{
    URL url = getClass().getClassLoader().getResource("Budsjett_salesman_import_villa.xls");
        budgetManager.importBudget(url.getFile(),BudgetType.SALESMAN);
   
    Periode periode = new Periode(2010, 5, 5);
    Collection<SalesmanGoal> salesGoalList = salesVManager.getSalesGoalList(periode);
   
    assertNotNull(salesGoalList);
    assertEquals(38, salesGoalList.size());
    int count=0;
View Full Code Here


  @Test
  public void getSalesMapWeek1_2010_Villa() throws Exception{
    URL url = getClass().getClassLoader().getResource("Budsjett_salesman_import_villa.xls");
        budgetManager.importBudget(url.getFile(),BudgetType.SALESMAN);
   
    Periode periode = new Periode(2010, 1, 1);
    Collection<SalesmanGoal> salesGoalList = salesVManager.getSalesGoalList(periode);
   
    assertNotNull(salesGoalList);
    assertEquals(14, salesGoalList.size());
    int count=0;
View Full Code Here

 
  @Test
  public void getGroupSumByProbabilityProductAreaPeriod() throws Exception{
    ProbabilityEnum probability=ProbabilityEnum.PROBABILITY_OFFER;
    ProductArea productArea=productAreaManager.findByName("Garasje villa");
    Periode periode=new Periode(2010,1,15);
    SaleReportSum saleReportSum=salesVManager.getGroupSumByProbabilityProductAreaPeriod(probability, productArea, periode);
    assertNotNull(saleReportSum);
  }
View Full Code Here

  public SalesStatistic generateSalesStatistics(Integer year, Integer week,
      String productAreaName) throws ProTransException {
    ProductArea productArea = productAreaManager
        .findByName(productAreaName);
    Periode periode = new Periode(year, week, week);
    // henter for gjeldende uke
    Multimap<ProbabilityEnum, SaleReportSum> salesMap = salesVManager
        .getAllReportData(productArea, periode);
    SalesStatistic salesStatistic = new SalesStatistic();
    salesStatistic.setProductAreaName(productAreaName);
    salesStatistic = setNumberOfAndSumOrder(salesMap, salesStatistic);

    debugSalesStatistic(salesStatistic, productAreaName, week);

    // henter for hele �ret dersom etter uke 1
    if (week > 1) {
      periode = new Periode(year, 1, week - 1);
      LOGGER
          .debug("Periode: "
              + periode.getFormattetYearFromWeekToWeek());
      salesMap = salesVManager.getAllReportData(productArea, periode);
      salesStatistic = setAccumulatedNumberOfAndSumOrder(salesMap,
          salesStatistic);
    } else {// setter akkumulert til uke dersmo uke 1
      salesStatistic.setAccumulatedLikeWeekSum();
View Full Code Here

 
  @Test
  public void getGroupSumByProbabilityProductAreaPeriodFromSnapshot() throws Exception{
    ProbabilityEnum probability=ProbabilityEnum.PROBABILITY_ORDER;
    ProductArea productArea=productAreaManager.findByName("Garasje villa");
    Periode periode=new Periode(2010,2,2);
    SaleReportSum saleReportSum=salesVManager.getGroupSumByProbabilityProductAreaPeriod(probability, productArea, periode);
    assertNotNull(saleReportSum);
  }
View Full Code Here

  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

  public TransportCostViewHandler(final Login aLogin,
      TransportCostBasisManager transportCostBasisManager) {
    super("Transportkostnad", transportCostBasisManager, aLogin
        .getUserType(), true);
    period = new Periode();
    presentationModelPeriod = new PresentationModel(period);
    presentationModelTotalInfo = new PresentationModel(new TotalInfo());
    orderCostList = new ArrayListModel();
    orderCostSelectionList = new SelectionInList((ListModel) orderCostList);
  }
View Full Code Here

            return productArea.getProductArea();
        }
        return null;
    }
    public final Periode getPeriode(){
        return new Periode(year,weekFrom,weekTo);
    }
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.util.Periode

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.