Package org.eevolution.model

Examples of org.eevolution.model.MPPProductBOM


  {
    log.info("Parent(bomline) " );

    //System.out.println("-------------------------Parent:" + bom.getName());
    MProduct M_Product = MProduct.get(getCtx(), bomline.getM_Product_ID());
    MPPProductBOM bomproduct = new MPPProductBOM(getCtx(), bomline.getPP_Product_BOM_ID(), null);
    DefaultMutableTreeNode parent = new DefaultMutableTreeNode(productSummary(M_Product, false));

    Vector<Object> line = new Vector<Object>(17);
    line.add( new Boolean(false))//  0 Select
    line.add( new Boolean(true));   //  1 IsActive
    line.add( new Integer(bomline.getLine())); // 2 Line               
    line.add( (Timestamp) bomline.getValidFrom()); //  3 ValidDrom
    line.add( (Timestamp) bomline.getValidTo()); //  4 ValidTo
    KeyNamePair pp = new KeyNamePair(M_Product.getM_Product_ID(),M_Product.getName());
    line.add(pp); //  5 M_Product_ID
    KeyNamePair uom = new KeyNamePair(bomline.getC_UOM_ID(),bomline.getC_UOM().getUOMSymbol());
    line.add(uom); //  6 C_UOM_ID
    line.add(new Boolean(bomline.isQtyPercentage())); //  7 IsQtyPorcentage
    line.add((BigDecimal) bomline.getQtyBatch())//  8 BatchPercent
    line.add((BigDecimal) ((bomline.getQtyBOM()!=null) ? bomline.getQtyBOM() : new BigDecimal(0)))//  9 QtyBOM
    line.add(new Boolean(bomline.isCritical())); //  10 IsCritical                 
    line.add( (Integer) bomline.getLeadTimeOffset()); // 11 LTOffSet
    line.add( (BigDecimal) bomline.getAssay()); // 12 Assay
    line.add( (BigDecimal) (bomline.getScrap())); // 13 Scrap
    line.add( (String) bomline.getIssueMethod()); // 14 IssueMethod
    line.add( (String) bomline.getBackflushGroup())// 15 BackflushGroup
    line.add( (BigDecimal) bomline.getForecast()); // 16 Forecast

    /*CHANGES START HERE DOMINIC TARR 20081110*/
    MCost cost = getCostForBomLine(bomline);
    line.add( (BigDecimal) cost.getCurrentCostPrice()); //17 standard cost ***
    line.add( (BigDecimal) cost.getCurrentCostPriceLL()); //18 rolled up cost ***
    line.add( (BigDecimal) cost.getFutureCostPrice()); //19 future cost ***
    line.add( (BigDecimal.ZERO)); //20 standard cost ***
    line.add( (BigDecimal.ZERO)); //21 rolled up cost ***
    line.add( (BigDecimal.ZERO)); //22 future cost ***
    /*CHANGES END HERE DOMINIC TARR 20081110*/

    dataBOM.add(line);

    for (MPPProductBOM bom : getBOMs(bomproduct.getM_Product_ID(), false))
    {
      MProduct component = MProduct.get(getCtx(), bom.getM_Product_ID());
      return component(component, BigDecimal.ONE);
    }

View Full Code Here


        log.fine(product.getName());
        //  New Lines
        int lineNo = line.getLine ();

        //find default BOM with valid dates and to this product
        MPPProductBOM bom = MPPProductBOM.get(product, getAD_Org_ID(),getDateInvoiced(), get_TrxName());
        if(bom != null)
        {
          MPPProductBOMLine[] bomlines = bom.getLines(getDateInvoiced());
          for (int j = 0; j < bomlines.length; j++)
          {
            MPPProductBOMLine bomline = bomlines[j];
            MInvoiceLine newLine = new MInvoiceLine (this);
            newLine.setLine (++lineNo);
View Full Code Here

        MProduct product = MProduct.get (getCtx(), line.getM_Product_ID());
        log.fine(product.getName());
        //  New Lines
        int lineNo = line.getLine ();
        //find default BOM with valid dates and to this product
        MPPProductBOM bom = MPPProductBOM.get(product, getAD_Org_ID(),getDatePromised(), get_TrxName());
        if(bom != null)
        { 
          MPPProductBOMLine[] bomlines = bom.getLines(getDatePromised());
          for (int j = 0; j < bomlines.length; j++)
          {
            MPPProductBOMLine bomline = bomlines[j];
            MOrderLine newLine = new MOrderLine (this);
            newLine.setLine (++lineNo);
View Full Code Here

        }
        if (PP_Product_BOM_ID <= 0)
        {
          PP_Product_BOM_ID = MPPProductBOM.getBOMSearchKey(product);
        }
        MPPProductBOM bom = MPPProductBOM.get(getCtx(), PP_Product_BOM_ID);
        if (bom == null)
        {
          createNotice(product, "@NotFound@ @PP_Product_BOM_ID@");
        }
        rollup(product, bom);
View Full Code Here

   */
  protected String doIt() throws Exception
  {
    X_Z_Packs     pack     = new X_Z_Packs(getCtx(), getRecord_ID(), get_TrxName());
    MProduct      product  = new MProduct(getCtx(), pack.getM_Product_ID(), get_TrxName());
    MPPProductBOM bom      = MPPProductBOM.get(product, getAD_Client_ID(), get_TrxName());
    MLocator      loc      = new MLocator(getCtx(), p_M_Locator_ID, get_TrxName());
    int           chargeID = getChargeID();
   
    // Error Checking.  An error results in an exception thrown which is caught
    // by SrvProcess which then rolls back any changes to the database made as
    // part of the get_TrxName() transaction.
    if (bom.is_new())
      throw new AdempiereUserError("@Error@ Bill Of Materials does not exist for "+
                                   product.getName());
    if (product.getVolume() == null || product.getVolume().doubleValue() <= 0)
      throw new AdempiereUserError("@Error@ Volume value for product "+product.getName()+
                                   " is zero or less.");
    if (!product.isVerified())
      throw new AdempiereUserError("@Error@ Product "+product.getName()+" is not verified");

    // Create the Inventory record
    MInventory inv = new MInventory(getCtx(), 0, get_TrxName());
    inv.setM_Warehouse_ID(loc.getM_Warehouse_ID());
    inv.setClientOrg(getAD_Client_ID(), Env.getAD_Org_ID(getCtx()));
    inv.addDescription("From BOM " + bom.getValue());
    inv.setZPacksDocumentNo();
    inv.save(get_TrxName());
   
    // Add the packed product inventory line and then copy lines from the BOM
    addPackedProductLine(pack, product, inv, chargeID);
View Full Code Here

TOP

Related Classes of org.eevolution.model.MPPProductBOM

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.