Package java.math

Examples of java.math.BigDecimal.doubleValue()


                BigDecimal tot = new BigDecimal(0);
                for(int i=0;i<grid.getVOListTableModel().getRowCount();i++)
                  for(int k=1;k<grid.getTable().getGrid().getColumnCount();k++)
                    if (grid.getVOListTableModel().getValueAt(i,k)!=null)
                      tot = tot.add((BigDecimal)grid.getVOListTableModel().getValueAt(i,k));
                if (tot.doubleValue()==0)
                  controlQty.setText("");
                else {
                  controlQty.setEnabled(true);
                  controlQty.setValue(tot);
View Full Code Here


         availability = new BigDecimal(0);
         for(i=0;i<list.size();i++) {
           availVO = (ItemAvailabilityVO)list.get(i);
           availability = availability.add(availVO.getAvailableQtyWAR03());
         }
         if (availability.doubleValue()<qty.doubleValue()) {
           return new VOResponse(
               compVO.getItemCodeItm01DOC24()+" "+
               t1+".\n"+
               t2+": "+availability.doubleValue()+" "+
               t3+": "+qty.doubleValue()
View Full Code Here

         if (availability.doubleValue()<qty.doubleValue()) {
           return new VOResponse(
               compVO.getItemCodeItm01DOC24()+" "+
               t1+".\n"+
               t2+": "+availability.doubleValue()+" "+
               t3+": "+qty.doubleValue()
           );
         }
         // the current component is available: it will be removed...
         i=0;
         while(qty.doubleValue()>0) {
View Full Code Here

               t3+": "+qty.doubleValue()
           );
         }
         // the current component is available: it will be removed...
         i=0;
         while(qty.doubleValue()>0) {
           availVO = (ItemAvailabilityVO)list.get(i);
           if (qty.doubleValue()>availVO.getAvailableQtyWAR03().doubleValue()) {
             delta = availVO.getAvailableQtyWAR03();
             qty = qty.subtract(delta);
           }
View Full Code Here

         }
         // the current component is available: it will be removed...
         i=0;
         while(qty.doubleValue()>0) {
           availVO = (ItemAvailabilityVO)list.get(i);
           if (qty.doubleValue()>availVO.getAvailableQtyWAR03().doubleValue()) {
             delta = availVO.getAvailableQtyWAR03();
             qty = qty.subtract(delta);
           }
           else {
             delta = qty;
View Full Code Here

                 serverLanguageId,
                 username
             );

             if (qty!=null && qty.doubleValue()>0) {
               if (vo.getQtyITM03().doubleValue()<=altQty.doubleValue()) {
                 delta = conv.convertQty(
                     vo.getMinSellingQtyUmCodeReg02ITM01(),
                     ((ProdOrderComponentVO)usedComponentsVO.get(itemCode)).getMinSellingQtyUmCodeReg02ITM01(),
                     vo.getQtyITM03(),
                     serverLanguageId,
View Full Code Here

                  altVO.getMinSellingQtyUmCodeReg02ITM01(),
                  componentVO.getMinSellingQtyUmCodeReg02ITM01(),
                  altAvailability,
                  serverLanguageId,username
              );
              if (componentVO.getQtyDOC24().subtract(availability).doubleValue()>altQty.doubleValue()) {
                delta = altQty;
                altComponentVO.setQtyDOC24(altAvailability);
              }
              else {
                delta = componentVO.getQtyDOC24();
View Full Code Here

  void updateTotalFromPaid() {
    BigDecimal total = controlTotal.getBigDecimal();
    BigDecimal paid = controlPaid.getBigDecimal();
    if (total != null && paid != null) {
      if (paid.doubleValue() < total.doubleValue()) {
        controlPaid.setValue(null);
        controlChange.setValue(null);
      } else {
        controlChange.setValue(paid.subtract(total));
      }
View Full Code Here

  private void updateTotalFromDiscount() {
    BigDecimal subtotal = controlSubtotal.getBigDecimal();
    BigDecimal discount = controlDiscount.getBigDecimal();
    if (subtotal!=null && discount!=null) {
      if (discount.doubleValue()>subtotal.doubleValue())
        controlDiscount.setValue(null);
      else
        controlTotal.setValue(subtotal.subtract(discount));
    }
  }
View Full Code Here

    controlSubtotal.setValue(subtotal);
    controlTotal.setValue(subtotal);

    BigDecimal discount = controlDiscount.getBigDecimal();
    if (subtotal!=null && discount!=null) {
      if (discount.doubleValue()>subtotal.doubleValue()) {
        controlDiscount.setValue(null);
        controlDiscountPerc.setValue(null);
      } else
        controlTotal.setValue(subtotal.subtract(discount));
    }
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.