protected void createSupply(int AD_Org_ID,int PP_MRP_ID,MProduct product,BigDecimal QtyPlanned,Timestamp DemandDateStartSchedule,String trxName) throws AdempiereException, SQLException {
  if (isSynchronize() && m_product_planning.getDD_NetworkDistribution_ID() > 0) {
    createDDOrder(AD_Org_ID,PP_MRP_ID,product,QtyPlanned,DemandDateStartSchedule,trxName);
  }
 else   if (product.isPurchased()) {
    createRequisition(AD_Org_ID,PP_MRP_ID,product,QtyPlanned,DemandDateStartSchedule,trxName);
  }
 else   if (product.isBOM()) {
    createPPOrder(AD_Org_ID,PP_MRP_ID,product,QtyPlanned,DemandDateStartSchedule,trxName);
  }
 else {
    throw new IllegalStateException("MRP Internal Error: Don't know what document to " + "create for " + product + "("+ m_product_planning+ ")");
  }
}

protected void createSupply ( int AD_Org_ID , int PP_MRP_ID , MProduct product , BigDecimal QtyPlanned , Timestamp DemandDateStartSchedule , String trxName ) throws AdempiereException , SQLException { if ( isSynchronize ( ) && m_product_planning . getDD_NetworkDistribution_ID ( ) > 0 ) { createDDOrder ( AD_Org_ID , PP_MRP_ID , product , QtyPlanned , DemandDateStartSchedule , trxName ) ; } else if ( product . isPurchased ( ) ) { createRequisition ( AD_Org_ID , PP_MRP_ID , product , QtyPlanned , DemandDateStartSchedule , trxName ) ; } else if ( product . isBOM ( ) ) { createPPOrder ( AD_Org_ID , PP_MRP_ID , product , QtyPlanned , DemandDateStartSchedule , trxName ) ; } else { throw new IllegalStateException ( "MRP Internal Error: Don't know what document to " + "create for " + product + "(" + m_product_planning + ")" ) ; } }
create supply document to balance qtyplnned
