src-db/database/model/functions/C_ORDER_POST1.xml
changeset 29855 956cd99a1937
parent 28978 c348f263a0a4
child 29420 78f3b49e0167
child 29566 04d238173afa
--- a/src-db/database/model/functions/C_ORDER_POST1.xml	Fri Apr 08 14:51:17 2016 +0530
+++ b/src-db/database/model/functions/C_ORDER_POST1.xml	Mon Apr 18 18:51:42 2016 +0200
@@ -181,17 +181,16 @@
     END LOOP;
   ELSE
      IF (v_DocAction IN ('CO', 'PR')) THEN
-				SELECT COUNT(1) 
-				INTO v_Count
-				FROM DUAL 
-				WHERE EXISTS(
-											SELECT 1
-											FROM C_ORDERLINE, M_PRODUCT
-											WHERE C_ORDERLINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID 
-											AND ISLINKEDTOPRODUCT = 'Y'
-											AND C_ORDER_ID = v_Record_ID
-											AND NOT EXISTS (SELECT 1 FROM C_ORDERLINE_SERVICERELATION WHERE C_ORDERLINE_SERVICERELATION.C_ORDERLINE_ID = C_ORDERLINE.C_ORDERLINE_ID));
-			 IF (v_Count <> 0) THEN
+       SELECT COUNT(1) 
+         INTO v_Count
+       FROM DUAL 
+       WHERE EXISTS(SELECT 1
+		      FROM C_ORDERLINE, M_PRODUCT
+		      WHERE C_ORDERLINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID 
+		      AND ISLINKEDTOPRODUCT = 'Y'
+		      AND C_ORDER_ID = v_Record_ID
+		      AND NOT EXISTS (SELECT 1 FROM C_ORDERLINE_SERVICERELATION WHERE C_ORDERLINE_SERVICERELATION.C_ORDERLINE_ID = C_ORDERLINE.C_ORDERLINE_ID));
+       IF (v_Count <> 0) THEN
          v_Message:='@MissingServiceRelation@';
          RAISE_APPLICATION_ERROR(-20000, '@MissingServiceRelation@') ;
        END IF;