src-db/database/model/functions/M_RESERVATION_POST.xml
changeset 24152 bae6b944d95a
parent 21157 2e9ce78cf1e3
child 24270 e414f3f0e298
--- a/src-db/database/model/functions/M_RESERVATION_POST.xml	Fri Aug 01 11:48:12 2014 +0530
+++ b/src-db/database/model/functions/M_RESERVATION_POST.xml	Mon Aug 04 08:40:38 2014 +0200
@@ -25,7 +25,7 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2012-2013 Openbravo SLU
+* All portions are Copyright (C) 2012-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -232,6 +232,8 @@
                       JOIN m_reservation r ON rs2.m_reservation_id = r.m_reservation_id
                   WHERE rs2.c_orderline_id IS NOT NULL
                     AND r.res_status NOT IN ('DR')
+                    AND r.m_product_id = v_product_id
+                    AND r.c_uom_id = v_uom_id
                   GROUP BY rs2.c_orderline_id
                 ) pre ON rs.c_orderline_id = pre.c_orderline_id
           WHERE rs.m_reservation_id = v_reservation_id