From a8fd5f9e20aa0d15597e8835620aebc88cdc7965 Mon Sep 17 00:00:00 2001 From: "Redhuan D. Oon" Date: Mon, 28 Jan 2008 12:47:02 +0000 Subject: [PATCH] [ 1879530 ] Product info "other warehouse" error patched by Bojana to group other warehouse storage lines by warehouse. But my test still shows own warehouse in that bottom tab. But its no further impact. Thus i commit on behalf for review. --- client/src/org/compiere/apps/search/InfoProduct.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/src/org/compiere/apps/search/InfoProduct.java b/client/src/org/compiere/apps/search/InfoProduct.java index b703ddeb12..7c691ae4c1 100644 --- a/client/src/org/compiere/apps/search/InfoProduct.java +++ b/client/src/org/compiere/apps/search/InfoProduct.java @@ -222,14 +222,15 @@ public final class InfoProduct extends Info implements ActionListener ColumnInfo[] s_layoutWarehouse = new ColumnInfo[]{ new ColumnInfo(Msg.translate(Env.getCtx(), "Warehouse"), "Warehouse", String.class), - new ColumnInfo(Msg.translate(Env.getCtx(), "QtyAvailable"), "QtyAvailable", Double.class), - new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOnHand"), "QtyOnHand", Double.class), - new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "QtyReserved", Double.class)}; + new ColumnInfo(Msg.translate(Env.getCtx(), "QtyAvailable"), "sum(QtyAvailable)", Double.class), + new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOnHand"), "sum(QtyOnHand)", Double.class), + new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "sum(QtyReserved)", Double.class)}; /** From Clause */ String s_sqlFrom = " M_PRODUCT_STOCK_V "; /** Where Clause */ String s_sqlWhere = "Value = ?"; m_sqlWarehouse = warehouseTbl.prepareTable(s_layoutWarehouse, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_STOCK_V"); + m_sqlWarehouse += " Group By Warehouse, documentnote "; warehouseTbl.setRowSelectionAllowed(true); warehouseTbl.setMultiSelection(false); warehouseTbl.addMouseListener(this);