Bug fix [ 1577943 ] Create Invoice (Vendor) lines from problem

http://sourceforge.net/tracker/index.php?func=detail&aid=1577943&group_id=176962&atid=879332
This commit is contained in:
Carlos Ruiz 2006-12-11 08:19:27 +00:00
parent 94021da928
commit 75cd8f0d89
1 changed files with 7 additions and 7 deletions

View File

@ -188,9 +188,9 @@ public class VCreateFromInvoice extends VCreateFrom implements VetoableChangeLis
//
Vector<Vector<Object>> data = new Vector<Vector<Object>>();
StringBuffer sql = new StringBuffer("SELECT " // QtyEntered
+ "l.MovementQty-SUM(NVL(mi.Qty,0)),l.QtyEntered/l.MovementQty,"
+ " l.C_UOM_ID,COALESCE(uom.UOMSymbol,uom.Name)," // 3..4
+ " l.M_Product_ID,p.Name, l.M_InOutLine_ID,l.Line," // 5..8
+ "l.MovementQty-SUM(NVL(mi.Qty, 0)), l.QtyEntered/l.MovementQty,"
+ " l.C_UOM_ID, COALESCE(uom.UOMSymbol, uom.Name)," // 3..4
+ " l.M_Product_ID, p.Name, l.M_InOutLine_ID, l.Line," // 5..8
+ " l.C_OrderLine_ID "); // 9
if (Env.isBaseLanguage(Env.getCtx(), "C_UOM"))
{
@ -204,10 +204,10 @@ public class VCreateFromInvoice extends VCreateFrom implements VetoableChangeLis
}
sql.append(" AND l.M_Product_ID=p.M_Product_ID")
.append(" AND l.M_InOutLine_ID=mi.M_InOutLine_ID(+)")
.append("AND l.M_InOut_ID=? ") // #1
.append("GROUP BY l.MovementQty,l.QtyEntered/l.MovementQty,"
+ "l.C_UOM_ID,COALESCE(uom.UOMSymbol,uom.Name),"
+ "l.M_Product_ID,p.Name, l.M_InOutLine_ID,l.Line,l.C_OrderLine_ID ")
.append(" AND l.M_InOut_ID=? ") // #1
.append("GROUP BY l.MovementQty, l.QtyEntered/l.MovementQty, "
+ "l.C_UOM_ID, COALESCE(uom.UOMSymbol, uom.Name), "
+ "l.M_Product_ID, p.Name, l.M_InOutLine_ID, l.Line, l.C_OrderLine_ID ")
.append("ORDER BY l.Line");
try