Example #1
0
 /**
  * Get Total Product Costs
  *
  * @param as accounting schema
  * @param AD_Org_ID trx org
  * @param zeroCostsOK zero/no costs are OK
  * @return costs
  */
 public BigDecimal getProductCosts(MAcctSchema as, int AD_Org_ID, boolean zeroCostsOK) {
   ProductCost pc = getProductCost();
   int C_OrderLine_ID = getC_OrderLine_ID();
   String costingMethod = null;
   BigDecimal costs =
       pc.getProductCosts(as, AD_Org_ID, costingMethod, C_OrderLine_ID, zeroCostsOK);
   if (costs != null) return costs;
   return Env.ZERO;
 } //  getProductCosts
Example #2
0
 /**
  * Get Product
  *
  * @return product or null if no product
  */
 public MProduct getProduct() {
   if (m_productCost == null)
     m_productCost =
         new ProductCost(
             Env.getCtx(), getM_Product_ID(), getM_AttributeSetInstance_ID(), p_po.get_TrxName());
   if (m_productCost != null) return m_productCost.getProduct();
   return null;
 } //	getProduct