Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.Order


    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONOVERVIEW.getTableName());

    tableFixture.cell(row(0).column(2)).click();

    Order selectedOrder = productionOverviewViewHandler.getSelectedObject()
        .getOrder();

    final PreventiveActionViewHandler preventiveActionViewHandler = new PreventiveActionViewHandler(
        login, managerRepository);
    DeviationViewHandler deviationViewHandler = new DeviationViewHandler(
View Full Code Here


      comment = "Etterlevering:" + comment;
    }

    BigDecimal cost = basisCost.add(additionValue);

    Order order = transportable.getOrder();
    orderCost = new OrderCost();
    orderCost.setComment(comment);

    orderCost.setCostAmount(cost);
    orderCost.setCostType(getCostType());
    orderCost.setCostUnit(getCostUnit());
    orderCost.setSupplier(supplier);
    orderCost.setPostShipment(transportable.getPostShipment());
    order.addOrderCost(orderCost);
    return orderCost;
  }
View Full Code Here

    }

    private BigDecimal calculateAdditionForOrder(final BigDecimal basis,
            final Transportable transportable) {
        BigDecimal additionValue = BigDecimal.valueOf(0);
        Order order = transportable.getOrder();
        String orderInfo = order.getInfo();
        if (orderInfo == null) {
            orderInfo = order.orderLinesToString();
        }
        if (orderInfo != null && orderInfo.length() != 0) {
            String[] infoSplit = orderInfo.split("x");
            double totalLenght = (Double.valueOf(infoSplit[0]) * 2)
                    + (Double.valueOf(infoSplit[1]) * 2);
 
View Full Code Here

  private BigDecimal calculateAdditionForOrder(final BigDecimal basis,
      final Transportable transportable) {
    BigDecimal additionValue = BigDecimal.valueOf(0);

    Order order = transportable.getOrder();

    OrderLine orderLine = order.getOrderLine("Takstoler");
    if (orderLine != null) {
      OrderLineAttribute attribute = orderLine
          .getAttributeByName("St�ende tak");
      if (attribute != null
          && "Ja".equalsIgnoreCase(attribute.getAttributeValue())) {
View Full Code Here

    return deviation;
  }

  private void setAssemblyForOrder(WindowInterface window, Supplier team) {
    int index = orderViewHandler.getOrderPanelSelectedOrderIndex();
    Order order = getSelectedOrder(index);

    if (order != null && team != null && validTransport(order, window)) {
      if (setAssembly(team, order, window)) {
        try {
          orderViewHandler.getOrderManager().saveOrder(order);
View Full Code Here

  }

  private Order getSelectedOrder(int index) {
    SelectionInList orderPanelSelectionList = orderViewHandler
        .getOrderPanelSelectionList();
    Order order = (Order) orderPanelSelectionList.getElementAt(index);
    orderViewHandler.getOrderManager().refreshObject(order);
    return order;
  }
View Full Code Here

          constructionTypeManager
              .lazyLoadArticle(
                  gavlkledning,
                  new LazyLoadConstructionTypeArticleEnum[] { LazyLoadConstructionTypeArticleEnum.ORDER_LINE });
          Set<OrderLine> orderLines = gavlkledning.getOrderLines();
          Order order = null;
          Set<OrderLine> orderOrderLines;
          OrderLine gavlOrderLine = null;

          for (OrderLine orderLine : orderLines) {
            order = orderLine.getOrder();
            orderLineManager
                .lazyLoadOrder(
                    order,
                    new LazyLoadOrderEnum[] { LazyLoadOrderEnum.ORDER_LINES });

            orderOrderLines = order.getOrderLines();

            gavlOrderLine=null;
            for (OrderLine orderOrderLine : orderOrderLines) {
              if (orderOrderLine.getArticleName()
                  .equalsIgnoreCase("Gavl")) {
View Full Code Here

              .getOrderStatus());

      String status = statusMap.get(veggChecker.getArticleName());
      if (status == null) {

        Order order = orderManager
            .findByOrderNr(((FrontProductionV) front).getOrderNr());
        if (order != null) {
          orderManager.lazyLoadTree(order);
          status = veggChecker.getArticleStatus(order);
          statusMap.put(veggChecker.getArticleName(), status);
          order.setStatus(Util.statusMapToString(statusMap));
          try {
            orderManager.saveOrder(order);
          } catch (ProTransException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
          }

        }
      }
    }

    List<Produceable> vegger = veggProductionVManager.findAllApplyable();
    StatusCheckerInterface<Transportable> frontChecker = Util
        .getFrontChecker();

    for (Produceable vegg : vegger) {

      Map<String, String> statusMap = Util
          .createStatusMap(((VeggProductionV) vegg).getOrderStatus());

      String status = statusMap.get(frontChecker.getArticleName());
      if (status == null) {

        Order order = orderManager
            .findByOrderNr(((VeggProductionV) vegg).getOrderNr());
        if (order != null) {
          orderManager.lazyLoadTree(order);
          status = frontChecker.getArticleStatus(order);
          statusMap.put(frontChecker.getArticleName(), status);
          order.setStatus(Util.statusMapToString(statusMap));
          try {
            orderManager.saveOrder(order);
          } catch (ProTransException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
View Full Code Here

  }

  @Test
  public void collectionFilter() {
    List<Order> orders = Lists.newArrayList();
    Order order = new Order();
    order.setInfo("test");
    order.setOrderNr("1");

    orders.add(order);

    order = new Order();
    order.setInfo("test2");
    order.setOrderNr("2");

    orders.add(order);

    order = new Order();
    order.setInfo("test");

    Predicate<Order> orderPredicate = new OrderPredicate(order);
    List<Order> filteredOrders = Lists.newArrayList(Collections2.filter(
        orders, orderPredicate));
    System.out.println(filteredOrders);
View Full Code Here

  @Test
  public void skalLageVismaFilForOrdreUtenTransport() throws IOException,
      ParseException {
    VismaFileCreatorImpl vismaFileCreator = new VismaFileCreatorImpl(null,
        false);
    Order ordre = new Order();
    OrdchgrHeadV head = new OrdchgrHeadV();
    head.setOrdNo(1);
    String fileName = vismaFileCreator.createTransportFile(ordre, head,
        "visma");
    assertNotNull(fileName);
View Full Code Here

TOP

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

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.