Related to Issue 32341: Prevents infinite loop if organization is null
authorDavid Miguelez <david.miguelez@openbravo.com>
Thu, 07 Apr 2016 11:26:17 +0200
changeset 28864 40c86fcd61ae
parent 28863 a770479abfb3
child 28865 075d80ce3160
child 29022 2872178cbaa9
Related to Issue 32341: Prevents infinite loop if organization is null
src-db/database/model/functions/AD_ORG_GETPERIODCONTROLALLOW.xml
--- a/src-db/database/model/functions/AD_ORG_GETPERIODCONTROLALLOW.xml	Wed Mar 02 10:18:21 2016 +0100
+++ b/src-db/database/model/functions/AD_ORG_GETPERIODCONTROLALLOW.xml	Thu Apr 07 11:26:17 2016 +0200
@@ -30,6 +30,11 @@
   v_parent_id ad_treenode.parent_id%TYPE;
 
 BEGIN
+
+  IF (p_organization IS NULL) THEN
+    RETURN NULL;
+  END IF;
+
   SELECT IsPeriodControlAllowed
   INTO v_isperiodcontrolallowed
   FROM AD_Org