Package no.ugland.utransprod.util.report

Examples of no.ugland.utransprod.util.report.SaleReportSum


    List<Order> confirmedOrders = findByConfirmWeekProductArea(
        periode.getYear(), periode.getWeek(), periode.getToWeek(),
        productArea.getProductArea());

    SaleReportSum saleReportSum = aggregateSaleReportSumForCountyOrders(
        confirmedOrders, "Alle");

    return Lists.newArrayList(saleReportSum);
  }
View Full Code Here


    return saleReportSums;
  }

  private SaleReportSum aggregateSaleReportSumForCountyOrders(
      final List<Order> orders, final String countyName) {
    SaleReportSum saleReportSum = new SaleReportSum();
    saleReportSum.setCountyName(countyName);

    for (Order order : orders) {
      lazyLoad(order,
          new LazyLoadOrderEnum[] { LazyLoadOrderEnum.ORDER_COSTS });
      saleReportSum.increaseCount();

      saleReportSum.addSumAssembly(order.getAssemblyCost());
      saleReportSum.addSumOwnProduction(order.getGarageValue());
      saleReportSum.addSumTransport(order.getTransportValue());
      saleReportSum.addSumDb(order.getContributionMargin());
      saleReportSum.addSumYesLines(order.getJaLinjer());

    }

    return saleReportSum;
  }
View Full Code Here

    return saleReportSum;
  }

  private SaleReportSum aggregateSaleReportSumForSalesmanOrders(
      final List<Order> orders, final String salesmanName) {
    SaleReportSum saleReportSum = new SaleReportSum();
    saleReportSum.setSalesman(salesmanName);

    for (Order order : orders) {
      lazyLoad(order,
          new LazyLoadOrderEnum[] { LazyLoadOrderEnum.ORDER_COSTS });
      saleReportSum.increaseCount();

      saleReportSum.addSumAssembly(order.getAssemblyCost());
      saleReportSum.addSumOwnProduction(order.getGarageValue());
      saleReportSum.addSumTransport(order.getTransportValue());
      saleReportSum.addSumDb(order.getContributionMargin());
      saleReportSum.addSumYesLines(order.getJaLinjer());

    }

    return saleReportSum;
  }
View Full Code Here

      final ProductArea productArea, final Periode periode) {
    List<Order> confirmedOrders = findByConfirmWeekProductArea(
        periode.getYear(), periode.getWeek(), periode.getToWeek(),
        productArea.getProductArea());

    SaleReportSum saleReportSum = aggregateSaleReportSumForCountyOrders(
        confirmedOrders, "");

    return saleReportSum;

  }
View Full Code Here

            // ProductAreaEnum.getGroupIdxFromAreaName("Garasje villa"),
            periode);
    assertNotNull(salesReportOrders);
    assertEquals(5, salesReportOrders.size());

    SaleReportSum sum = salesReportOrders.get(0);
    // assertEquals("Aust-Agder", sum.getCountyName());
    assertEquals(Integer.valueOf(1), sum.getOrderCount());
    assertEquals(BigDecimal.valueOf(0), sum.getSumAssembly());
    assertEquals(BigDecimal.valueOf(124200), sum.getSumOwnProduction());
    assertEquals(BigDecimal.valueOf(0), sum.getSumTransport());
    assertEquals(BigDecimal.valueOf(0), sum.getSumYesLines());
  }
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

  @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

TOP

Related Classes of no.ugland.utransprod.util.report.SaleReportSum

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.