IDEMPIERE-339 - Improve Info Product Window, fix exception when logging in with no warehouse
(transplanted from 326acd1094974d6d00a5571fddfa8bd805dcf16a)
This commit is contained in:
parent
d35b4f46c3
commit
71b4f04a62
|
@ -543,10 +543,15 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
|
||||||
setPriceListVersion (M_PriceList_Version_ID);
|
setPriceListVersion (M_PriceList_Version_ID);
|
||||||
|
|
||||||
// Create Grid
|
// Create Grid
|
||||||
|
String orderBy = null;
|
||||||
StringBuffer where = new StringBuffer();
|
StringBuffer where = new StringBuffer();
|
||||||
where.append("p.IsActive='Y'");
|
where.append("p.IsActive='Y'");
|
||||||
if (M_Warehouse_ID != 0)
|
if (M_Warehouse_ID != 0)
|
||||||
|
{
|
||||||
where.append(" AND p.IsSummary='N'");
|
where.append(" AND p.IsSummary='N'");
|
||||||
|
orderBy = "QtyAvailable DESC";
|
||||||
|
}
|
||||||
|
|
||||||
// dynamic Where Clause
|
// dynamic Where Clause
|
||||||
if (p_whereClause != null && p_whereClause.length() > 0)
|
if (p_whereClause != null && p_whereClause.length() > 0)
|
||||||
where.append(" AND ") // replace fully qualified name with alias
|
where.append(" AND ") // replace fully qualified name with alias
|
||||||
|
@ -555,7 +560,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
|
||||||
prepareTable(getProductLayout(),
|
prepareTable(getProductLayout(),
|
||||||
s_productFrom,
|
s_productFrom,
|
||||||
where.toString(),
|
where.toString(),
|
||||||
"QtyAvailable DESC");
|
orderBy);
|
||||||
p_table.setShowTotals(false);
|
p_table.setShowTotals(false);
|
||||||
//
|
//
|
||||||
pickWarehouse.addActionListener(this);
|
pickWarehouse.addActionListener(this);
|
||||||
|
|
Loading…
Reference in New Issue