details:   https://code.openbravo.com/erp/devel/pi/rev/c91b0f28a286
changeset: 16875:c91b0f28a286
user:      Carlos Aristu <carlos.aristu <at> openbravo.com>
date:      Tue Jun 19 10:17:56 2012 +0200
summary:   fixes issue 20695: It would be necessary to show a different message 
when a product has no stock

details:   https://code.openbravo.com/erp/devel/pi/rev/aa0d7faac4a8
changeset: 16876:aa0d7faac4a8
user:      Carlos Aristu <carlos.aristu <at> openbravo.com>
date:      Tue Jun 19 16:33:08 2012 +0200
summary:   related to issue 20695: fixes indentation

diffstat:

 src-db/database/model/functions/M_INOUT_CREATE.xml |  18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 8b095a62669c -r aa0d7faac4a8 
src-db/database/model/functions/M_INOUT_CREATE.xml
--- a/src-db/database/model/functions/M_INOUT_CREATE.xml        Wed Jun 20 
10:57:48 2012 +0200
+++ b/src-db/database/model/functions/M_INOUT_CREATE.xml        Tue Jun 19 
16:33:08 2012 +0200
@@ -532,9 +532,15 @@
                           WHERE M_INOUT_ID = p_InOut_ID
                             AND C_ORDERLINE_ID = ol.C_ORDERLINE_ID;
                         ELSE
-                          IF (LENGTH(v_resultlinesstr || '<br>@OrderLine@: ' 
|| ol.Line || ' @ForProduct@ ' || ol.name || ': @notEnoughStockPartial@' || 
'.') <= 1800 ) THEN
-                           v_resultlinesstr := COALESCE(v_resultlinesstr, '') 
|| '<br>@OrderLine@: ' || ol.Line || ' @ForProduct@ ' || ol.name || ': 
@notEnoughStockPartial@' || '.' ;
-                         END IF;
+                          IF (v_lines <= 10) THEN
+                            IF (LENGTH(v_resultlinesstr || '<br>@OrderLine@: ' 
|| ol.Line || ' @ForProduct@ ' || ol.name || ': @notEnoughStockPartial@' || 
'.') <= 1800 ) THEN
+                              v_resultlinesstr := COALESCE(v_resultlinesstr, 
'') || '<br>@OrderLine@: ' || ol.Line || ' @NotEnoughStocked@ @ForProduct@ ' || 
ol.name || '.' ;
+                            END IF;
+                          ELSE
+                            IF (LENGTH(v_resultlinesstr || '<br>@OrderLine@: ' 
|| ol.Line || ' @ForProduct@ ' || ol.name || ': @notEnoughStockPartial@' || 
'.') <= 1800 ) THEN
+                              v_resultlinesstr := COALESCE(v_resultlinesstr, 
'') || '<br>@OrderLine@: ' || ol.Line || ' @ForProduct@ ' || ol.name || ': 
@notEnoughStockPartial@' || '.' ;
+                            END IF;
+                          END IF;
                           v_hasPartial := true;
                         END IF;
                       END IF;
@@ -660,7 +666,11 @@
           END IF;
         END LOOP; -- Order Header Loop
         IF (v_order_delivered_count = 0 AND v_order_partial_count = 0) THEN
-          v_Message := '@ZeroOrdersProcessed@';
+          IF (v_Message = '') THEN
+            v_Message := '@ZeroOrdersProcessed@';
+          ELSE
+            v_Message := COALESCE(v_Message, '@ZeroOrdersProcessed@');
+          END IF;
           v_result :=0;
         ELSIF (v_order_partial_count <> 0 OR v_order_delivered_count <> 
v_order_count) THEN
           v_result :=2;

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to