public static MWarehousePrice[] find(MBPartner bPartner,boolean IsSOTrx,Timestamp valid,int M_Warehouse_ID,String Value,String Name,String UPC,String SKU,String trxName){
  int M_PriceList_ID=IsSOTrx ? bPartner.getM_PriceList_ID() : bPartner.getPO_PriceList_ID();
  MPriceList pl=null;
  if (M_PriceList_ID == 0)   pl=MPriceList.getDefault(bPartner.getCtx(),IsSOTrx);
 else   pl=MPriceList.get(bPartner.getCtx(),M_PriceList_ID,trxName);
  if (pl == null) {
    s_log.severe("No PriceList found");
    return null;
  }
  MPriceListVersion plv=pl.getPriceListVersion(valid);
  if (plv == null) {
    s_log.severe("No PriceListVersion found for M_PriceList_ID=" + pl.getM_PriceList_ID());
    return null;
  }
  return find(bPartner.getCtx(),plv.getM_PriceList_Version_ID(),M_Warehouse_ID,Value,Name,UPC,SKU,trxName);
}

public static MWarehousePrice [ ] find ( MBPartner bPartner , boolean IsSOTrx , Timestamp valid , int M_Warehouse_ID , String Value , String Name , String UPC , String SKU , String trxName ) { int M_PriceList_ID = IsSOTrx ? bPartner . getM_PriceList_ID ( ) : bPartner . getPO_PriceList_ID ( ) ; MPriceList pl = null ; if ( M_PriceList_ID == 0 ) pl = MPriceList . getDefault ( bPartner . getCtx ( ) , IsSOTrx ) ; else pl = MPriceList . get ( bPartner . getCtx ( ) , M_PriceList_ID , trxName ) ; if ( pl == null ) { s_log . severe ( "No PriceList found" ) ; return null ; } MPriceListVersion plv = pl . getPriceListVersion ( valid ) ; if ( plv == null ) { s_log . severe ( "No PriceListVersion found for M_PriceList_ID=" + pl . getM_PriceList_ID ( ) ) ; return null ; } return find ( bPartner . getCtx ( ) , plv . getM_PriceList_Version_ID ( ) , M_Warehouse_ID , Value , Name , UPC , SKU , trxName ) ; }
find products in warehouse with price for customer
