Author: jleroux
Date: Sun Aug 19 15:49:00 2018
New Revision: 1838384

URL: http://svn.apache.org/viewvc?rev=1838384&view=rev
Log:
Improved: no functional change

We have agreed to have lines no longer than 120 characters. This splits where
necessary, at least for me. I find that a bit longer sometimes makes things more
legible, we are not robots.

Also automatically removes an unused import (thanks Eclipse)

Modified:
    
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java

Modified: 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=1838384&r1=1838383&r2=1838384&view=diff
==============================================================================
--- 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java
 Sun Aug 19 15:49:00 2018
@@ -65,7 +65,6 @@ import org.apache.ofbiz.product.product.
 import org.apache.ofbiz.product.store.ProductStoreWorker;
 import org.apache.ofbiz.service.GenericServiceException;
 import org.apache.ofbiz.service.LocalDispatcher;
-import org.apache.ofbiz.service.ModelService;
 import org.apache.ofbiz.service.ServiceUtil;
 
 /**
@@ -1065,7 +1064,9 @@ public class ShoppingCartItem implements
     public void calcDepositAdjustments() {
         List<GenericValue>itemAdjustments = this.getAdjustments();
         try {
-            GenericValue depositAmount = 
EntityQuery.use(delegator).from("ProductPrice").where("productId", 
this.getProductId(), "productPricePurposeId", "DEPOSIT", "productPriceTypeId", 
"DEFAULT_PRICE").filterByDate().queryFirst();
+            GenericValue depositAmount = 
EntityQuery.use(delegator).from("ProductPrice")
+                    .where("productId", this.getProductId(), 
"productPricePurposeId", "DEPOSIT", "productPriceTypeId", "DEFAULT_PRICE")
+                    .filterByDate().queryFirst();
             if (UtilValidate.isNotEmpty(depositAmount)) {
                 Boolean updatedDepositAmount = false;
                 BigDecimal adjustmentAmount = 
depositAmount.getBigDecimal("price").multiply(this.getQuantity(), 
generalRounding);


Reply via email to