IDEMPIERE-337 zkwebui - Improve Info Product window - fix NPE and problem with SQL statement (Could not remove ON ...)

This commit is contained in:
Carlos Ruiz 2012-08-07 15:51:17 -05:00
parent 34a80293b9
commit 3d2fa6c5aa
1 changed files with 3 additions and 2 deletions

View File

@ -431,7 +431,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener
list.add(new ColumnInfo(Msg.translate(Env.getCtx(), "PriceLimit"), "bomPriceLimit(pp.M_Product_ID, pp.M_PriceList_Version_ID) AS PriceLimit", Double.class)); list.add(new ColumnInfo(Msg.translate(Env.getCtx(), "PriceLimit"), "bomPriceLimit(pp.M_Product_ID, pp.M_PriceList_Version_ID) AS PriceLimit", Double.class));
ColumnInfo[] s_layoutProductPrice = new ColumnInfo[list.size()]; ColumnInfo[] s_layoutProductPrice = new ColumnInfo[list.size()];
list.toArray(s_layoutProductPrice); list.toArray(s_layoutProductPrice);
s_sqlFrom = "M_ProductPrice pp INNER JOIN M_PriceList_Version plv ON pp.M_PriceList_Version_ID = plv.M_PriceList_Version_ID"; s_sqlFrom = "M_ProductPrice pp INNER JOIN M_PriceList_Version plv ON (pp.M_PriceList_Version_ID = plv.M_PriceList_Version_ID)";
s_sqlWhere = "pp.M_Product_ID = ? AND plv.IsActive = 'Y' AND pp.IsActive = 'Y'"; s_sqlWhere = "pp.M_Product_ID = ? AND plv.IsActive = 'Y' AND pp.IsActive = 'Y'";
m_sqlProductprice = productpriceTbl.prepareTable(s_layoutProductPrice, s_sqlFrom, s_sqlWhere, false, "pp") + " ORDER BY plv.ValidFrom DESC"; m_sqlProductprice = productpriceTbl.prepareTable(s_layoutProductPrice, s_sqlFrom, s_sqlWhere, false, "pp") + " ORDER BY plv.ValidFrom DESC";
productpriceTbl.setMultiSelection(false); productpriceTbl.setMultiSelection(false);
@ -1328,6 +1328,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener
if (fieldValue.getText().length() == 0 && fieldName.getText().length() == 0 && contentPanel.getRowCount() == 0) if (fieldValue.getText().length() == 0 && fieldName.getText().length() == 0 && contentPanel.getRowCount() == 0)
execute = false; execute = false;
// Remove existing headers // Remove existing headers
if (contentPanel.getListhead() != null)
contentPanel.getListhead().detach(); contentPanel.getListhead().detach();
// Create Grid // Create Grid
int M_Warehouse_ID = 0; int M_Warehouse_ID = 0;