Package no.ugland.utransprod.util

Examples of no.ugland.utransprod.util.Periode


    setTakstolVinkel(31);
    createPostShipment();
    setColliPackedAndSent("Takstein", "Takstein", null);
    setColliPackedAndSent("Takstol", "Takstoler", postShipment);
    List<TransportCostBasis> list = transportCostManager
        .generateTransportCostList(new Periode(YEAR, WEEK_50, WEEK_50));
    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);

    TransportCostBasis transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    list = transportCostBasisManager.findById(transportCostBasis
        .getTransportCostBasisId());
    assertEquals(1, list.size());

    transportCostBasis = list.get(0);
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1000);
    BigDecimal result;
    result = basis.add(BigDecimal.valueOf(660)).setScale(2);
    assertEquals("Grunnpris:1000,Takstein:660.00", orderCost.getComment());
    assertEquals(result, orderCost.getCostAmount().setScale(2));

    list = transportCostManager.generateTransportCostList(new Periode(YEAR,
        WEEK_51, WEEK_51));

    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);
View Full Code Here


    setTakstolVinkel(31);
    createPostShipment();
    setColliPackedAndSent("Takstein", "Takstein", postShipment);
    setColliPackedAndSent("Takstol", "Takstoler", postShipment);
    List<TransportCostBasis> list = transportCostManager
        .generateTransportCostList(new Periode(YEAR, WEEK_50, WEEK_50));
    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);

    TransportCostBasis transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    list = transportCostBasisManager.findById(transportCostBasis
        .getTransportCostBasisId());
    assertEquals(1, list.size());

    transportCostBasis = list.get(0);
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1470);
    // BigDecimal result;
    // result = basis.add(BigDecimal.valueOf(660)).setScale(2);
    assertEquals("Grunnpris:1470", orderCost.getComment());
    assertEquals(basis.setScale(2), orderCost.getCostAmount().setScale(2));

    list = transportCostManager.generateTransportCostList(new Periode(YEAR,
        WEEK_51, WEEK_51));

    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);
View Full Code Here

    importAlPostalCodes();
    updatePricesFromFile();
    setUpOrder("0354");
    createPostShipment();
    List<TransportCostBasis> list = transportCostManager
        .generateTransportCostList(new Periode(YEAR, WEEK_50, WEEK_50));
    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);

    TransportCostBasis transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    list = transportCostBasisManager.findById(transportCostBasis
        .getTransportCostBasisId());
    assertEquals(1, list.size());

    transportCostBasis = list.get(0);
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1000);
    // BigDecimal result;
    // result = basis.add(BigDecimal.valueOf(660)).setScale(2);
    assertEquals("Grunnpris:1000", orderCost.getComment());
    assertEquals(basis.setScale(2), orderCost.getCostAmount().setScale(2));

    list = transportCostManager.generateTransportCostList(new Periode(YEAR,
        WEEK_51, WEEK_51));

    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);
View Full Code Here

    setTakstolVinkel(31);
    createPostShipment();
    setColliPackedAndSent("Takstein", "Takstein", postShipment);
    setColliPackedAndSent("Takstol", "Takstoler", postShipment);
    List<TransportCostBasis> list = transportCostManager
        .generateTransportCostList(new Periode(YEAR, WEEK_50, WEEK_50));
    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);

    TransportCostBasis transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    list = transportCostBasisManager.findById(transportCostBasis
        .getTransportCostBasisId());
    assertEquals(1, list.size());

    transportCostBasis = list.get(0);
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    BigDecimal basis = BigDecimal.valueOf(1000);
    // BigDecimal result;
    // result = basis.add(BigDecimal.valueOf(660)).setScale(2);
    assertEquals("Grunnpris:1000", orderCost.getComment());
    assertEquals(basis.setScale(2), orderCost.getCostAmount().setScale(2));

    list = transportCostManager.generateTransportCostList(new Periode(YEAR,
        WEEK_51, WEEK_51));

    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);
View Full Code Here

    createPostShipment();
    createPostShipment2();
    setColliPackedAndSent("Takstein", "Takstein", postShipment);
    setColliPackedAndSent("Takstol", "Takstoler", postShipment2);
    List<TransportCostBasis> list = transportCostManager
        .generateTransportCostList(new Periode(YEAR, WEEK_50, WEEK_50));
    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);

    TransportCostBasis transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    list = transportCostBasisManager.findById(transportCostBasis
        .getTransportCostBasisId());
    assertEquals(1, list.size());

    transportCostBasis = list.get(0);
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();

    list = transportCostManager.generateTransportCostList(new Periode(YEAR,
        WEEK_51, WEEK_51));

    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);

    transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    list = transportCostBasisManager.findById(transportCostBasis
        .getTransportCostBasisId());
    assertEquals(1, list.size());

    transportCostBasis = list.get(0);
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    orderCost = orderCosts.iterator().next();
    assertEquals("Etterlevering:Takstein:660.00", orderCost.getComment());
    assertEquals(BigDecimal.valueOf(660).setScale(2), orderCost
        .getCostAmount().setScale(2));

    list = transportCostManager.generateTransportCostList(new Periode(YEAR,
        WEEK_52, WEEK_52));

    assertNotNull(list);
    assertEquals(1, list.size());
View Full Code Here

    createPostShipment();
    createPostShipment2();
    setColliPackedAndSent("Takstein", "Takstein", postShipment);
    setColliPackedAndSent("Takstol", "Takstoler", postShipment2);
    List<TransportCostBasis> list = transportCostManager
        .generateTransportCostList(new Periode(YEAR, WEEK_50, WEEK_50));
    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);

    TransportCostBasis transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    list = transportCostBasisManager.findById(transportCostBasis
        .getTransportCostBasisId());
    assertEquals(1, list.size());

    transportCostBasis = list.get(0);
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();

    list = transportCostManager.generateTransportCostList(new Periode(YEAR,
        WEEK_51, WEEK_51));

    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);

    transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    list = transportCostBasisManager.findById(transportCostBasis
        .getTransportCostBasisId());
    assertEquals(1, list.size());

    transportCostBasis = list.get(0);
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    orderCost = orderCosts.iterator().next();
    assertEquals("Etterlevering:Takstein:660.00", orderCost.getComment());
    assertEquals(BigDecimal.valueOf(660).setScale(2), orderCost
        .getCostAmount().setScale(2));

    list = transportCostManager.generateTransportCostList(new Periode(YEAR,
        WEEK_52, WEEK_52));

    assertNotNull(list);
    assertEquals(1, list.size());
    allTransportCostBasis.addAll(list);
View Full Code Here

    budgetManager.removeForYearProductArea(2010,productAreaVilla,BudgetType.SALESMAN);
  }

  @Test
  public void testGetSalesReportDataForOfferVilla() throws Exception {
    Periode periode = new Periode(2010, 3, 3);
    ProductArea productArea = productAreaManager.findByName("Garasje villa");
    List<SaleReportSum> salesReportOffer = salesVManager
        .groupSumCountyByProbabilityProductAreaPeriode(
            ProbabilityEnum.PROBABILITY_OFFER, productArea,
            // ProductAreaEnum.getGroupIdxFromAreaName("Garasje villa"),
View Full Code Here

    }
  }

  @Test
  public void testGetSalesReportDataForOrderVilla() throws Exception {
    Periode periode = new Periode(2009, 2, 2);
    ProductArea productArea = productAreaManager
        .findByName("Garasje villa");
    List<SaleReportSum> salesReportOrders = salesVManager
        .groupSumCountyByProbabilityProductAreaPeriode(
            ProbabilityEnum.PROBABILITY_ORDER, productArea,
View Full Code Here

    assertEquals(BigDecimal.valueOf(0), sum.getSumYesLines());
  }

  @Test
  public void testGetSalesReportDataForConfirmOrderVilla() {
    Periode periode = new Periode(2008, 50, 50);
    List<SaleReportSum> salesReportConfirm = orderManager
        .groupSumCountyByProductAreaConfirmPeriode(productAreaManager
            .findByName("Garasje villa"),
        // ProductAreaEnum.GARAGE_VILLA,
            periode);
View Full Code Here

  @Test
  public void getSalesMap() throws Exception{
    ProductArea productArea = productAreaManager
    .findByName("Garasje villa");
    Periode periode = new Periode(2010, 3, 3);
    Map<ProbabilityEnum, Set<SaleReportData>> salesMap=salesVManager.getSalesMap(productArea, periode);
    assertNotNull(salesMap);
  }
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.