Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.TransportCostBasis


  }

  private TransportCostBasis createTransportCostForOrders(
      final List<Transportable> transportables, final Supplier supplier,
      final Periode period) throws ProTransException {
    TransportCostBasis transportCostBasis = new TransportCostBasis(period);
    try {

      transportCostBasis.setSupplier(supplier);
      transportCostBasisManager
          .saveTransportCostBasis(transportCostBasis);

      for (Transportable transportable : transportables) {
        if (transportable.getSent() == null) {
View Full Code Here


    List<TransportCostBasis> list = transportCostManager
        .generateTransportCostList(periode);
    assertNotNull(list);
    assertEquals(1, list.size());

    TransportCostBasis transportCostBasis = list.get(0);
    assertEquals(1, transportCostBasis.getOrderCosts().size());
    OrderCost orderCost = transportCostBasis.getOrderCosts().iterator()
        .next();
    assertNotNull(orderCost.getCostAmount());
    assertTrue(orderCost.getCostAmount().intValue() > 0);
  }
View Full Code Here

    List<TransportCostBasis> list = transportCostManager
        .generateTransportCostList(new Periode(YEAR, WEEK_50, WEEK_50));
    assertNotNull(list);
    assertEquals(1, list.size());

    TransportCostBasis transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    List<TransportCostBasis> transportCostBasisList = transportCostBasisManager
        .findById(transportCostBasis.getTransportCostBasisId());
    assertEquals(1, transportCostBasisList.size());

    allTransportCostBasis.addAll(list);

    transportCostBasis = transportCostBasisList.get(0);
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    assertEquals("" + YEAR + " " + WEEK_50 + "-" + WEEK_50,
        transportCostBasis.getPeriode());
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    assertEquals("Grunnpris:1000", orderCost.getComment());
    BigDecimal result = BigDecimal.valueOf(1000).setScale(2);
View Full Code Here

    List<TransportCostBasis> list = transportCostManager
        .generateTransportCostList(new Periode(YEAR, WEEK_50, WEEK_50));
    assertNotNull(list);
    assertEquals(1, list.size());

    TransportCostBasis transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    List<TransportCostBasis> transportCostBasisList = transportCostBasisManager
        .findById(transportCostBasis.getTransportCostBasisId());
    assertEquals(1, transportCostBasisList.size());

    allTransportCostBasis.addAll(list);

    transportCostBasis = transportCostBasisList.get(0);
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });
    assertEquals("" + YEAR + " " + WEEK_50 + "-" + WEEK_50,
        transportCostBasis.getPeriode());
    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();
    assertNotNull(orderCosts);
    assertEquals(1, orderCosts.size());
    OrderCost orderCost = orderCosts.iterator().next();
    assertEquals("Grunnpris:1000", orderCost.getComment());
    BigDecimal result = BigDecimal.valueOf(1000).setScale(2);
View Full Code Here

    List<TransportCostBasis> list = transportCostManager
        .generateTransportCostList(new Periode(YEAR, WEEK_50, WEEK_50));
    assertNotNull(list);
    assertEquals(1, list.size());

    TransportCostBasis transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    List<TransportCostBasis> transportCostBasisList = transportCostBasisManager
        .findById(transportCostBasis.getTransportCostBasisId());
    assertEquals(1, transportCostBasisList.size());

    transportCostBasisManager.setInvoiceNr(transportCostBasis, "1111");

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

    allTransportCostBasis.addAll(list);

    transportCostBasis = transportCostBasisList.get(0);
    assertEquals("1111", transportCostBasis.getInvoiceNr());
    transportCostBasisManager.lazyLoad(transportCostBasis,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
            LazyLoadEnum.NONE } });

    Set<OrderCost> orderCosts = transportCostBasis.getOrderCosts();

    for (OrderCost orderCost : orderCosts) {
      assertEquals("1111", orderCost.getInvoiceNr());
    }
View Full Code Here

    List<TransportCostBasis> list = transportCostManager
        .generateTransportCostList(new Periode(YEAR, WEEK_50, WEEK_50));
    assertNotNull(list);
    assertEquals(1, list.size());

    TransportCostBasis transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    List<TransportCostBasis> transportCostBasisList = transportCostBasisManager
        .findById(transportCostBasis.getTransportCostBasisId());
    assertEquals(1, transportCostBasisList.size());

    allTransportCostBasis.addAll(list);

    transportCostBasis = transportCostBasisList.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();
    assertEquals("Grunnpris:1000", orderCost.getComment());
    BigDecimal result = BigDecimal.valueOf(1000).setScale(2);
View Full Code Here

    List<TransportCostBasis> list = transportCostManager
        .generateTransportCostList(new Periode(YEAR, WEEK_50, WEEK_50));
    assertNotNull(list);
    assertEquals(1, list.size());

    TransportCostBasis transportCostBasis = list.get(0);

    assertNotNull(transportCostBasis.getTransportCostBasisId());

    List<TransportCostBasis> transportCostBasisList = transportCostBasisManager
        .findById(transportCostBasis.getTransportCostBasisId());
    assertEquals(1, transportCostBasisList.size());

    allTransportCostBasis.addAll(list);

    transportCostBasis = transportCostBasisList.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();
    assertEquals("Grunnpris:1000,St�ende tak:1000.00", orderCost
        .getComment());
View Full Code Here

        .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;
View Full Code Here

        .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)
        .add(BigDecimal.valueOf(660));
View Full Code Here

        .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;
View Full Code Here

TOP

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

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.