details:   https://code.openbravo.com/erp/devel/pi/rev/68b04c71056b
changeset: 15204:68b04c71056b
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Wed Jan 25 16:15:35 2012 +0100
summary:   fixed bug 19381: Fixed conversion rate return in Work Req window

diffstat:

 src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_ProcessPlan.java |  
9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 5c371119f42f -r 68b04c71056b 
src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_ProcessPlan.java
--- 
a/src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_ProcessPlan.java   
    Wed Jan 25 15:53:30 2012 +0100
+++ 
b/src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_ProcessPlan.java   
    Wed Jan 25 16:15:35 2012 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2012 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -26,6 +26,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.lang.StringUtils;
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.utils.FormatUtilities;
@@ -73,8 +74,10 @@
     if (data != null && data.length > 0) {
       resultado.append("new Array(\"inpexplodephases\", \""
           + FormatUtilities.replaceJS(data[0].explodephases) + "\"),");
-      resultado.append("new Array(\"inpconversionrate\", \""
-          + FormatUtilities.replaceJS(data[0].conversionrate) + "\"),");
+
+      final String conversionRate = 
StringUtils.isNotEmpty(data[0].conversionrate) ? FormatUtilities
+          .replaceJS(data[0].conversionrate) : "\"\"";
+      resultado.append("new Array(\"inpconversionrate\", " + conversionRate + 
"),");
       resultado.append("new Array(\"inpsecondaryunit\", \""
           + FormatUtilities.replaceJS(data[0].secondaryunit) + "\")");
     } else {

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to