Solved bug [ 1613001 ] Matching PO-Receipt-Invoice Error

in postgres
https://sourceforge.net/tracker/?func=detail&atid=879332&aid=1613001&group_id=176962
This commit is contained in:
Carlos Ruiz 2006-12-13 09:20:52 +00:00
parent 6dbf73b55f
commit f3ed7e7417
1 changed files with 1 additions and 1 deletions

View File

@ -738,7 +738,7 @@ public class MMatchPO extends X_M_MatchPO
public static void consolidate(Properties ctx)
{
String sql = "SELECT * FROM M_MatchPO po "
+ "WHERE EXISTS (SELECT * FROM M_MatchPO x "
+ "WHERE EXISTS (SELECT 1 FROM M_MatchPO x "
+ "WHERE po.C_OrderLine_ID=x.C_OrderLine_ID AND po.Qty=x.Qty "
+ "GROUP BY C_OrderLine_ID, Qty "
+ "HAVING COUNT(*) = 2) "