Fixes issue 30961: Warehouse rules will now make partial reservations
authorAlvaro Ferraz <alvaro.ferraz@openbravo.com>
Thu, 12 Nov 2015 17:32:58 +0100
changeset 27866 e991e8220a8a
parent 27865 425220984e4e
child 27867 2249174ff1b4
Fixes issue 30961: Warehouse rules will now make partial reservations

Warehouse rules will now make partial reservations in case it exists stock for the reservation but not enough to cover it completely.
src-db/database/model/functions/M_GET_STOCK_PARAM.xml
--- a/src-db/database/model/functions/M_GET_STOCK_PARAM.xml	Thu Nov 12 13:02:15 2015 +0100
+++ b/src-db/database/model/functions/M_GET_STOCK_PARAM.xml	Thu Nov 12 17:32:58 2015 +0100
@@ -567,7 +567,8 @@
         WHERE m_product_id = v_productid;
         v_message := '@NotEnoughStockedDueWHRule@';
       END IF;
-      RAISE_APPLICATION_ERROR(-20000, v_message);
+      DBMS_OUTPUT.PUT_LINE( v_message); --OBTG:-20000--
+      p_result := 2;
     END IF;
     IF (v_totalqty > v_finalqty) THEN
       -- IF these quantities are different there is some proposed stock with the isFinal flag = 'N'