Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.TransportCostBasis


        .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);

    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:Takstol:660.00", orderCost.getComment());
    assertEquals(BigDecimal.valueOf(660).setScale(2), orderCost
View Full Code Here


  }

  void showSelectedTransportCost() {
    if (objectSelectionList.hasSelection()) {
      TransportCostBasis transportCostBasis = getSelectedTransportCostBasis();
      changeOrderCostList(transportCostBasis);
    }

  }
View Full Code Here

    return totalCost;
  }

  private TransportCostBasis getSelectedTransportCostBasis() {
    int index = objectSelectionList.getSelectionIndex();
    TransportCostBasis transportCostBasis = (TransportCostBasis) objectSelectionList
        .getElementAt(table.convertRowIndexToModel(index));
    return transportCostBasis;
  }
View Full Code Here

     * @param rowIndex
     * @param columnIndex
     * @return verdi
     */
    public Object getValueAt(int rowIndex, int columnIndex) {
      TransportCostBasis transportCostBasis = (TransportCostBasis) getRow(rowIndex);
      switch (columnIndex) {
      case 0:
        return transportCostBasis.getTransportCostBasisId();
      case 1:
        return transportCostBasis.getPeriode();
      case 2:
        return transportCostBasis.getSupplier();
      case 3:
        return transportCostBasis.getInvoiceNr();
      default:
        throw new IllegalStateException("Unknown column");
      }

    }
View Full Code Here

    public Object doWork(Object[] params, JLabel labelInfo) {
      String errorMsg = null;
      try {
        labelInfo.setText("Genererer rapport...");
        ReportViewer reportViewer = new ReportViewer("Transpotkostnad");
        TransportCostBasis transportCostBasis = getSelectedTransportCostBasis();
        overviewManager.lazyLoad(transportCostBasis,
            new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
                LazyLoadEnum.NONE } });
        List<TransportCostBasis> transportCostBasisList = new ArrayList<TransportCostBasis>();
        transportCostBasisList.add(transportCostBasis);
        reportViewer.generateProtransReportFromBeanAndShow(
            transportCostBasisList, "Transportkostnad",
            ReportEnum.TRANSPORT_COST, null, "transportkostnad"
                + transportCostBasis.getTransportCostBasisId()
                + ".pdf", owner, true);

      } catch (ProTransException e) {
        e.printStackTrace();
        errorMsg = e.getMessage();
View Full Code Here

    public void doWhenFinished(Object object) {
    }

    public Object doWork(Object[] params, JLabel labelInfo) {
      TransportCostBasis transportCostBasis = getSelectedTransportCostBasis();
      labelInfo.setText("Setter fakturanummer...");
      ((TransportCostBasisManager) overviewManager).setInvoiceNr(
          transportCostBasis, invoiceNr);
      return null;
    }
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.