details:   https://code.openbravo.com/erp/devel/pi/rev/4fa54a2fb83d
changeset: 32620:4fa54a2fb83d
user:      David Miguelez <david.miguelez <at> openbravo.com>
date:      Tue Sep 05 13:09:40 2017 +0200
summary:   Fixes Isue 36789. Uses lenght function to know if a String is empty
instead of performing a comparison, which does not work the same
way in Oracle as it does in Postgresql.

diffstat:

 src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml |  4 ++--
 src-db/database/model/functions/M_INOUT_POST.xml           |  8 ++++----
 src-db/database/model/functions/M_PRODUCTION_RUN.xml       |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diffs (75 lines):

diff -r 40185fb2080e -r 4fa54a2fb83d 
src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml
--- a/src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml        Tue Sep 
05 13:38:02 2017 +0200
+++ b/src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml        Tue Sep 
05 13:09:40 2017 +0200
@@ -330,12 +330,12 @@
             LOOP
               
v_Message_ProductLine:=v_Message_ProductLine||CUR_PL_Post.line||', ';
             END LOOP;
-            IF(v_Message_ProductLine != '') THEN
+            IF(length(v_Message_ProductLine) > 0) THEN
               
v_Message_ProductionRun:=v_Message_ProductionRun||'@ProductionRunLine@'||Cur_ProductionPlan.line||'
 @ProductLine@'||v_Message_ProductLine;
               v_Message_ProductLine:='';
             END IF;
           END LOOP;
-          IF v_Message_ProductionRun != '' THEN
+          IF length(v_Message_ProductionRun) > 0 THEN
             RAISE_APPLICATION_ERROR(-20000, 
v_Message_ProductionRun||'@InActiveProducts@');
           END IF;
         END;
diff -r 40185fb2080e -r 4fa54a2fb83d 
src-db/database/model/functions/M_INOUT_POST.xml
--- a/src-db/database/model/functions/M_INOUT_POST.xml  Tue Sep 05 13:38:02 
2017 +0200
+++ b/src-db/database/model/functions/M_INOUT_POST.xml  Tue Sep 05 13:09:40 
2017 +0200
@@ -206,7 +206,7 @@
                             ) LOOP
                v_Message_product:=v_Message_product||Cur_Lines.line||', ';
           END LOOP;
-          if v_Message_product != '' then
+          if length(v_Message_product) > 0 then
              RAISE_APPLICATION_ERROR(-20000, '@Inline@ '||v_Message_product||' 
'||'@ProductNullAndMovementQtyGreaterZero@') ;
           end if ;
             End ;
@@ -224,7 +224,7 @@
                             ) LOOP
           v_Message_Qty:=v_Message_Qty||Cur_Lines.line||', ';
           END LOOP;
-          IF v_Message_Qty != '' THEN
+          IF length(v_Message_Qty) > 0 THEN
              RAISE_APPLICATION_ERROR(-20000, '@Inline@ '||v_Message_Qty||' 
'||'@ProductNotNullAndMovementQtyZero@') ;
           END IF;
             End ;
@@ -244,7 +244,7 @@
                             ) LOOP
           v_Message_NotAvail:=v_Message_NotAvail||Cur_Lines.line||', ';
           END LOOP;
-          IF v_Message_NotAvail != '' THEN
+          IF length(v_Message_NotAvail) > 0 THEN
              RAISE_APPLICATION_ERROR(-20000, '@Inline@ 
'||v_Message_NotAvail||' '||'@LocatorWithNotAvailableStatus@') ;
           END IF;
             End ;
@@ -262,7 +262,7 @@
         LOOP
           
v_Message_Inactive_Products:=v_Message_Inactive_Products||Cur_Lines.line||', ';
         END LOOP;
-        IF v_Message_Inactive_Products != '' THEN
+        IF length(v_Message_Inactive_Products) > 0 THEN
           RAISE_APPLICATION_ERROR(-20000, '@Inline@ 
'||v_Message_Inactive_Products||' '||'@InActiveProducts@') ;
         END IF;
       END;
diff -r 40185fb2080e -r 4fa54a2fb83d 
src-db/database/model/functions/M_PRODUCTION_RUN.xml
--- a/src-db/database/model/functions/M_PRODUCTION_RUN.xml      Tue Sep 05 
13:38:02 2017 +0200
+++ b/src-db/database/model/functions/M_PRODUCTION_RUN.xml      Tue Sep 05 
13:09:40 2017 +0200
@@ -590,12 +590,12 @@
             LOOP
               
v_Message_ProductLine:=v_Message_ProductLine||CUR_PL_Post.line||', ';
             END LOOP;
-            IF(v_Message_ProductLine != '') THEN
+            IF(length(v_Message_ProductLine) > 0) THEN
               
v_Message_ProductionRun:=v_Message_ProductionRun||'@ProductionRunLine@'||Cur_ProductionPlan.line||'
 @ProductLine@'||v_Message_ProductLine;
               v_Message_ProductLine:='';
             END IF;
           END LOOP;
-          IF v_Message_ProductionRun != '' THEN
+          IF length(v_Message_ProductionRun) > 0 THEN
             RAISE_APPLICATION_ERROR(-20000, 
v_Message_ProductionRun||'@InActiveProducts@');
           END IF;
         END;

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to