Examples of OrderLine


Examples of no.ugland.utransprod.model.OrderLine

    private int addMissingToReadyCount(
            final List<ReadyCount> readyCountList, final Order order, final int rowCounter,
            final List<OrderLine> missing, final Colli colli) {
        int rows = rowCounter + 1;

        OrderLine orderLine = null;
        if (missing.size() >= rows) {
            orderLine = missing.get(rows - 1);
        }
        readyCountList.add(new ReadyCount(order, colli, orderLine, rows));
        return rows;
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLine

     * @param rowIndex
     * @param columnIndex
     * @return verdi
     */
    public Object getValueAt(int rowIndex, int columnIndex) {
      OrderLine orderLine = (OrderLine) getRow(rowIndex);
      switch (columnIndex) {
      case 0:
        return orderLine.getArticlePath();
      case 1:
        return orderLine.getNumberOfItems();
      case 2:
        return orderLine.getAttributeInfo();
      case 3:
        if (orderLine.getExternalOrderLine() != null) {
          return "Ja";
        }
        return "---";
      default:
        throw new IllegalStateException("Unknown column");
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLine

    private int getNumbersSentBefore(final Set<ITransportCostAddition> additions,
            final Order order, final Transport transport) {
        int numbersSentBefore = 0;
        for (ITransportCostAddition addition : additions) {
            OrderLine orderLine = order.getOrderLine(addition.getArticlePath());
            if (orderLine != null && orderLine.getColli() != null
                    && orderLine.getColli().getSent() != null) {
                if (Util.compareTransport(orderLine.getTransport(), transport) < 0) {
                    numbersSentBefore++;
                }
            }
        }
        return numbersSentBefore;
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLine

                : new HashSet<OrderLine>();

        String typeName = "";
        Iterator<OrderLine> orderLineIt = orderLines.iterator();
        while (orderLineIt.hasNext() && typeName.length() == 0) {
            OrderLine orderLine = orderLineIt.next();
            typeName = orderLine.belongTo(transportable)
                    && orderLine.getArticleName().equalsIgnoreCase(articleName) ? checkOrderLine(
                    transportable, returnBuffer, orderLine) : "";
        }

        returnBuffer.insert(0, typeName);
        return returnBuffer.toString();
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLine

      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())) {
        additionValue = basis.multiply(
            transportCostAdditon.getAddition()).divide(
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLine

                  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")) {
                gavlOrderLine = orderOrderLine;
              }
            }

            //if(gavlOrderLine!=null){
           
            for (OrderLine orderOrderLine : orderOrderLines) {
              if (orderOrderLine.getArticlePath()
                  .equalsIgnoreCase("Gavlkledning$Kledning")) {
                if(gavlOrderLine==null){
                  gavlOrderLine=new OrderLine(null,orderOrderLine.getOrder(),gavl,null,null,null,null,null,null,null,"Gavl",null,1,null,null,null,null,null,null,null,null,null);
                  orderLineManager.saveOrderLine(gavlOrderLine);
                }
                orderOrderLine.setOrderLineRef(gavlOrderLine);
                orderOrderLine.setArticlePath("Gavl$Kledning");
                orderLineManager.saveOrderLine(orderOrderLine);
                orderLineManager.lazyLoadTree(gavlOrderLine);
                gavlOrderLine.setAttributeInfo(gavlOrderLine.getAttributesAsString());
                orderLineManager.saveOrderLine(gavlOrderLine);
              }
            }
            //}
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLine

    ord.setFree1("150");
    ord.setFree2("20");
   
   
   
    OrderLine orderLine = new OrderLine();
    orderLine.setArticlePath("Garasjetype");
   
    ConstructionTypeArticleAttribute constructionTypeArticleAttribute=new ConstructionTypeArticleAttribute();
    ArticleTypeAttribute articleTypeAttribute=new ArticleTypeAttribute();
    Attribute attribute=new Attribute();
    attribute.setName("Veggh�yde");
    articleTypeAttribute.setAttribute(attribute);
   
    constructionTypeArticleAttribute.setArticleTypeAttribute(articleTypeAttribute);
   
    OrderLineAttribute orderLineAttribute = new OrderLineAttribute();
    orderLineAttribute.setConstructionTypeArticleAttribute(constructionTypeArticleAttribute);
    orderLine.addAttribute(orderLineAttribute);
   
    constructionTypeArticleAttribute=new ConstructionTypeArticleAttribute();
    articleTypeAttribute=new ArticleTypeAttribute();
    attribute=new Attribute();
    attribute.setName("Murh�yde");
    articleTypeAttribute.setAttribute(attribute);
   
    orderLineAttribute = new OrderLineAttribute();
    orderLineAttribute.setConstructionTypeArticleAttribute(constructionTypeArticleAttribute);
    orderLine.addAttribute(orderLineAttribute);
   
    constructionTypeArticleAttribute.setArticleTypeAttribute(articleTypeAttribute);
   
    constructionTypeArticleAttribute=new ConstructionTypeArticleAttribute();
    articleTypeAttribute=new ArticleTypeAttribute();
    attribute=new Attribute();
    attribute.setName("Bredde");
    articleTypeAttribute.setAttribute(attribute);
   
    orderLineAttribute = new OrderLineAttribute();
    orderLineAttribute.setConstructionTypeArticleAttribute(constructionTypeArticleAttribute);
    orderLine.addAttribute(orderLineAttribute);
   
    constructionTypeArticleAttribute.setArticleTypeAttribute(articleTypeAttribute);
   
    constructionTypeArticleAttribute=new ConstructionTypeArticleAttribute();
    articleTypeAttribute=new ArticleTypeAttribute();
    attribute=new Attribute();
    attribute.setName("Lengde");
    articleTypeAttribute.setAttribute(attribute);
   
    orderLineAttribute = new OrderLineAttribute();
    orderLineAttribute.setConstructionTypeArticleAttribute(constructionTypeArticleAttribute);
    orderLine.addAttribute(orderLineAttribute);
   
    constructionTypeArticleAttribute.setArticleTypeAttribute(articleTypeAttribute);
   
    order.addOrderLine(orderLine);
   
    final Ordln ordln=new Ordln();
    ordln.setWdtu(BigDecimal.valueOf(400));
    ordln.setLgtU(BigDecimal.valueOf(800));
   
    when(ordlnManager.findByOrdnoAndPrCatNo2(111, 1)).thenReturn(ordln);
   
   
   
   
    garasjeConverter.setConstructionTypeAttributes(ord, order);
    assertNotNull(order);
    OrderLine garageOrderLine = order.getOrderLine("Garasjetype");
    assertNotNull(garageOrderLine);
    assertEquals(true, garageOrderLine!=OrderLine.UNKNOWN);
    OrderLineAttribute testOrderLineAttribute=garageOrderLine.getAttributeByName("Veggh�yde");
    assertNotNull(testOrderLineAttribute);
    assertEquals(true, testOrderLineAttribute!=OrderLineAttribute.UNKNOWN);
    assertEquals("150", testOrderLineAttribute.getOrderLineAttributeValue());
   
    testOrderLineAttribute=garageOrderLine.getAttributeByName("Murh�yde");
    assertEquals(true, testOrderLineAttribute!=OrderLineAttribute.UNKNOWN);
    assertEquals("20", testOrderLineAttribute.getOrderLineAttributeValue());
   
    testOrderLineAttribute=garageOrderLine.getAttributeByName("Bredde");
    assertEquals(true, testOrderLineAttribute!=OrderLineAttribute.UNKNOWN);
    assertEquals("400", testOrderLineAttribute.getOrderLineAttributeValue());
   
    testOrderLineAttribute=garageOrderLine.getAttributeByName("Lengde");
    assertEquals(true, testOrderLineAttribute!=OrderLineAttribute.UNKNOWN);
    assertEquals("800", testOrderLineAttribute.getOrderLineAttributeValue());
  }
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLine

    super(managerRepository);
  }

  public OrderLine convert(ArticleType articleType, Ordln ordln, Order order,
      Ord ord) {
    OrderLine gavl=articleType == ArticleType.UNKNOWN ? OrderLine.UNKNOWN : getOrderLine(articleType, ordln,
                order);
    return setAngleAndWidth(gavl,order);
  }
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLine

    return setAngleAndWidth(gavl,order);
  }

  private OrderLine setAngleAndWidth(OrderLine gavl,Order order) {
    if(gavl!=OrderLine.UNKNOWN){
      OrderLine takstol = order.getOrderLine(TAKSTOLER);
      if(takstol!=OrderLine.UNKNOWN){
        gavl.setAttributeValue(ATTRIBUTE_VINKEL, takstol.getAttributeValue(ATTRIBUTE_VINKEL));
        gavl.setAttributeValue(ATTRIBUTE_BREDDE, takstol.getAttributeValue(ATTRIBUTE_BREDDE));
      }
    }
    return gavl;
  }
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLine

        return articleType == ArticleType.UNKNOWN ? OrderLine.UNKNOWN : getOrderLine(articleType, ordln,
                order);

    }
    protected OrderLine getOrderLine(ArticleType articleType, Ordln ordln, Order order) {
        OrderLine orderLine = super.getOrderLine(articleType, ordln, order);
        orderLine.setAttributeValue(ATTRIBUTE_VINKEL,Util.convertBigDecimalToString(ordln.getFree4()));
        orderLine.setAttributeValue(ATTRIBUTE_BREDDE,Util.convertBigDecimalToString(ordln.getLgtU()));
        setGavlVinkelOgBredde(orderLine,order);
        return orderLine;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.