src-db/database/model/functions/M_INOUT_POST.xml
changeset 23544 bca4e0f2c265
parent 22934 875ccb64c6c5
child 24291 4e55d4ef021a
--- a/src-db/database/model/functions/M_INOUT_POST.xml	Thu Jun 19 09:56:39 2014 +0530
+++ b/src-db/database/model/functions/M_INOUT_POST.xml	Thu Jun 19 11:53:52 2014 +0530
@@ -203,6 +203,24 @@
              RAISE_APPLICATION_ERROR(-20000, '@Inline@ '||v_Message_product||' '||'@ProductNullAndMovementQtyGreaterZero@') ;
           end if ;
 	     End ;
+	     Declare
+       v_Message_Qty VARCHAR(2000) :='';
+	     BEGIN
+					FOR Cur_Lines IN (
+                             SELECT M.line
+                             FROM M_InOut I,
+                                  M_InOutLine M
+                             WHERE I.M_InOut_ID=M.M_InOut_ID
+                               AND I.M_INOUT_ID=v_Record_ID
+                               AND (M.M_PRODUCT_ID IS NOT NULL AND M.MOVEMENTQTY = 0)
+                               ORDER BY M.line
+                            ) LOOP
+          v_Message_Qty:=v_Message_Qty||Cur_Lines.line||', ';
+          END LOOP;
+          IF v_Message_Qty != '' THEN
+             RAISE_APPLICATION_ERROR(-20000, '@Inline@ '||v_Message_Qty||' '||'@ProductNotNullAndMovementQtyZero@') ;
+          END IF;
+	     End ;
       if(v_isreturndoctype = 'N' AND v_isSoTrx = 'Y' and v_DocAction<>'RC') then
         v_message := null;
         for Cur_OrderLine in (