Author: deepak
Date: Sat Mar 19 07:15:24 2016
New Revision: 1735734
URL:
http://svn.apache.org/viewvc?rev=1735734&view=revLog:
(OFBIZ-6933) Applied slightly modified patch from jira issue.
============================================================
When we update the Allow order decimal quantity to N for product store and update the unit price of item in shopping cart then its shown error.
============================================================
Thanks Yashwant Dhakad for reporting issue and providing the patch.
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java?rev=1735734&r1=1735733&r2=1735734&view=diff==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java Sat Mar 19 07:15:24 2016
@@ -771,7 +771,7 @@ public class ShoppingCartHelper {
quantity = (BigDecimal) ObjectType.simpleTypeConvert(quantString, "BigDecimal", null, locale);
//For quantity we should test if we allow to add decimal quantity for this product an productStore :
// if not and if quantity is in decimal format then return error.
- if(! ProductWorker.isDecimalQuantityOrderAllowed(delegator, item.getProductId(), cart.getProductStoreId())){
+ if (!ProductWorker.isDecimalQuantityOrderAllowed(delegator, item.getProductId(), cart.getProductStoreId()) && parameterName.startsWith("update")) {
BigDecimal remainder = quantity.remainder(BigDecimal.ONE);
if (remainder.compareTo(BigDecimal.ZERO) != 0) {
String errMsg = UtilProperties.getMessage(resource_error, "cart.addToCart.quantityInDecimalNotAllowed", this.cart.getLocale());