details:   https://code.openbravo.com/erp/devel/pi/rev/f1b0fc389b29
changeset: 18994:f1b0fc389b29
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Mon Dec 10 17:18:50 2012 +0100
summary:   Fixes issue 22316: Product selector works fine after deleting its 
contents

The product selector of the Lines tab of the Sales Invoice window was being 
broken after deleting the contents of its text input. When the last character 
was
deleted, the SL_Invoice_Product was called with a null product, which resulted 
in the inpcCurrencyId to being set to ''. This property is used in the filter l
ogic of the product, and after it was set to '' the selector did not return any 
product.

This has been fixed in the same way that the issue 20811 was fixed, by only 
returning in the callout the inpcCurrencyId property if it is not null.

diffstat:

 src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Product.java |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (17 lines):

diff -r 5270d6777557 -r f1b0fc389b29 
src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Product.java
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Product.java   Mon Dec 
10 16:39:25 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Product.java   Mon Dec 
10 17:18:50 2012 +0100
@@ -169,9 +169,10 @@
       resultado.append("new Array(\"inpattrsetvaluetype\", \"\"),\n");
     }
     String strHasSecondaryUOM = SLOrderProductData.hasSecondaryUOM(this, 
strMProductID);
-    resultado.append("new Array(\"inphasseconduom\", " + strHasSecondaryUOM + 
"),\n");
-    resultado.append("new Array(\"inpcCurrencyId\", "
-        + (strCurrency.equals("") ? "\"\"" : strCurrency) + ")");
+    resultado.append("new Array(\"inphasseconduom\", " + strHasSecondaryUOM + 
")");
+    if (!"".equals(strCurrency)) {
+      resultado.append(",\n new Array(\"inpcCurrencyId\", " + strCurrency + 
")");
+    }
 
     SLInvoiceTaxData[] data = SLInvoiceTaxData.select(this, strCInvoiceID);
     if (data != null && data.length > 0) {

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to