Author: jonesde
Date: Wed Aug 16 19:31:14 2006
New Revision: 432121
URL:
http://svn.apache.org/viewvc?rev=432121&view=revLog:
Based on feedback from Eriks Dobelis added checkIncludeVat attribute to calculateProductPrice service call so that the displayPrice in a cart item will now have tax included if the store is configured for such; Apache Jira #OFBIZ-113
Modified:
incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
URL:
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=432121&r1=432120&r2=432121&view=diff==============================================================================
--- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original)
+++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Wed Aug 16 19:31:14 2006
@@ -17,11 +17,19 @@
package org.ofbiz.order.shoppingcart;
import java.sql.Timestamp;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
import javolution.util.FastMap;
-import org.apache.commons.collections.set.ListOrderedSet;
+import org.apache.commons.collections.set.ListOrderedSet;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.base.util.UtilDateTime;
@@ -877,6 +885,7 @@
priceContext.put("webSiteId", cart.getWebSiteId());
priceContext.put("productStoreId", cart.getProductStoreId());
priceContext.put("agreementId", cart.getAgreementId());
+ priceContext.put("checkIncludeVat", "Y");
Map priceResult = dispatcher.runSync("calculateProductPrice", priceContext);
if (ServiceUtil.isError(priceResult)) {
throw new CartItemModifyException("There was an error while calculating the price: " + ServiceUtil.getErrorMessage(priceResult));