Fixed issue 21222.Fix issue in if clause.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Tue, 31 Jul 2012 12:18:51 +0200
changeset 17899 827ee476b859
parent 17898 90d2a49c5544
child 17900 cee8a341c19b
Fixed issue 21222.Fix issue in if clause.
src/org/openbravo/erpCommon/ad_callouts/SL_Order_Product.java
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Order_Product.java	Wed Jul 25 12:40:51 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Order_Product.java	Tue Jul 31 12:18:51 2012 +0200
@@ -104,8 +104,8 @@
     if (_strPriceStd.startsWith("\"")) {
       strPriceStd = _strPriceStd.substring(1, _strPriceStd.length() - 1);
     }
-    boolean isTaxIncludedPriceList = OBDal.getInstance().get(Order.class, strCOrderId).getPriceList()
-        .isPriceIncludesTax();
+    boolean isTaxIncludedPriceList = OBDal.getInstance().get(Order.class, strCOrderId)
+        .getPriceList().isPriceIncludesTax();
 
     if (!strMProductID.equals("")) {
       SLOrderProductData[] dataOrder = SLOrderProductData.select(this, strCOrderId);
@@ -115,12 +115,12 @@
           + strPriceStd.replace("\"", ""));
       if (isTaxIncludedPriceList) {
         strNetPriceList = "0";
+      } else {
+        strGrossPriceList = "0";
         strPriceActual = SLOrderProductData.getOffersPrice(this, dataOrder[0].dateordered,
             dataOrder[0].cBpartnerId, strMProductID, (strPriceStd.equals("undefined") ? "0"
                 : strPriceStd.replace("\"", "")), strQty, dataOrder[0].mPricelistId,
             dataOrder[0].id);
-      } else {
-        strGrossPriceList = "0";
       }
       log4j.debug("get Offers price:" + strPriceActual);