details:   https://code.openbravo.com/erp/devel/pi/rev/2c5f1b6d2be7
changeset: 14036:2c5f1b6d2be7
user:      Jon Alegría <jon.alegria <at> openbravo.com>
date:      Thu Oct 20 12:36:58 2011 +0200
summary:   Fixes issue 0018743: Error: value too long for type character 
varying(2000)
creating a shipment

diffstat:

 src-db/database/model/functions/M_INOUT_CREATE.xml |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r e7da8915d925 -r 2c5f1b6d2be7 
src-db/database/model/functions/M_INOUT_CREATE.xml
--- a/src-db/database/model/functions/M_INOUT_CREATE.xml        Thu Oct 20 
11:53:38 2011 +0200
+++ b/src-db/database/model/functions/M_INOUT_CREATE.xml        Thu Oct 20 
12:36:58 2011 +0200
@@ -522,13 +522,17 @@
                         ELSIF (Cur_order.deliveryrule = 'L') THEN
                           DBMS_OUTPUT.PUT_LINE('Not enough stocked products, 
delivery type Line');
                           v_lines := v_lines - v_lines_per_orderline;
-                          v_resultlinesstr := COALESCE(v_resultlinesstr, '') 
|| '<br>@OrderLine@: ' || ol.Line || ' @ForProduct@ ' || ol.name || ': 
@notEnoughStockDeliveryRuleLine@.' ;
+                          IF (LENGTH(v_resultlinesstr || '<br>@OrderLine@: ' 
|| ol.Line || ' @ForProduct@ ' || ol.name || ': 
@notEnoughStockDeliveryRuleLine@.') <= 1800 ) THEN
+                           v_resultlinesstr := COALESCE(v_resultlinesstr, '') 
|| '<br>@OrderLine@: ' || ol.Line || ' @ForProduct@ ' || ol.name || ': 
@notEnoughStockDeliveryRuleLine@.' ;
+                         END IF;
                           v_hasPartial := true;
                           DELETE FROM M_INOUTLINE
                           WHERE M_INOUT_ID = p_InOut_ID
                             AND C_ORDERLINE_ID = ol.C_ORDERLINE_ID;
                         ELSE
-                          v_resultlinesstr := COALESCE(v_resultlinesstr, '') 
|| '<br>@OrderLine@: ' || ol.Line || ' @ForProduct@ ' || ol.name || ': 
@notEnoughStockPartial@' || '.' ;
+                          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;
                           v_hasPartial := true;
                         END IF;
                       END IF;

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Ciosco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to