src-db/database/model/functions/M_INOUT_POST.xml
changeset 19387 2ea55d9cc882
parent 19206 0ce3b01ec4eb
child 19392 03c4c13bb0f0
--- a/src-db/database/model/functions/M_INOUT_POST.xml	Mon Jan 21 10:31:14 2013 +0100
+++ b/src-db/database/model/functions/M_INOUT_POST.xml	Thu Jan 17 12:44:05 2013 +0100
@@ -236,9 +236,9 @@
         INTO v_Count
         FROM M_INOUT IO, M_INOUTLINE IOL
         WHERE IO.M_INOUT_ID = IOL.M_INOUT_ID
-        AND AD_ISORGINCLUDED(IOL.AD_Org_ID, IO.AD_Org_ID, IO.AD_Client_ID) <> -1
+        AND AD_ISORGINCLUDED(IOL.AD_Org_ID, IO.AD_Org_ID, IO.AD_Client_ID) = -1
         AND IO.M_INOUT_ID = v_Record_ID;
-        IF (v_Count=0) THEN
+        IF (v_Count>0) THEN
           RAISE_APPLICATION_ERROR(-20000, '@NotCorrectOrgLines@') ;
         END IF;
       END IF;