Author: eckardjf
Date: Fri Apr 16 18:26:08 2010 New Revision: 935023 URL: http://svn.apache.org/viewvc?rev=935023&view=rev Log: set the supplierProductId Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=935023&r1=935022&r2=935023&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Fri Apr 16 18:26:08 2010 @@ -508,6 +508,7 @@ public class ShoppingCart implements Ite if (getOrderType().equals("PURCHASE_ORDER")) { supplierProduct = getSupplierProduct(productId, newQuantity, dispatcher); if (supplierProduct != null && supplierProduct.getBigDecimal("lastPrice") != null) { + sci.setSupplierProductId(supplierProduct.getString("supplierProductId")); sci.setBasePrice(supplierProduct.getBigDecimal("lastPrice")); sci.setName(ShoppingCartItem.getPurchaseOrderItemDescription(sci.getProduct(), supplierProduct, this.getLocale())); } else { @@ -3478,6 +3479,7 @@ public class ShoppingCart implements Ite orderItem.set("orderItemTypeId", item.getItemType()); if (item.getItemGroup() != null) orderItem.set("orderItemGroupSeqId", item.getItemGroup().getGroupNumber()); orderItem.set("productId", UtilValidate.isNotEmpty(aggregatedInstanceId) ? aggregatedInstanceId : item.getProductId()); + orderItem.set("supplierProductId", item.getSupplierProductId()); orderItem.set("prodCatalogId", item.getProdCatalogId()); orderItem.set("productCategoryId", item.getProductCategoryId()); orderItem.set("quantity", item.getQuantity()); 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=935023&r1=935022&r2=935023&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 Fri Apr 16 18:26:08 2010 @@ -769,6 +769,7 @@ public class ShoppingCartHelper { errorMsgs.add(errMsg); } } else { + item.setSupplierProductId(supplierProduct.getString("supplierProductId")); item.setQuantity(quantity, dispatcher, this.cart); item.setBasePrice(supplierProduct.getBigDecimal("lastPrice")); item.setName(ShoppingCartItem.getPurchaseOrderItemDescription(item.getProduct(), supplierProduct, cart.getLocale())); Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=935023&r1=935022&r2=935023&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Fri Apr 16 18:26:08 2010 @@ -253,6 +253,7 @@ public class ShoppingCartItem implements // specific for purchase orders - description is set to supplierProductId + supplierProductName, price set to lastPrice of SupplierProduct // if supplierProduct has no supplierProductName, use the regular supplierProductId if (supplierProduct != null) { + newItem.setSupplierProductId(supplierProduct.getString("supplierProductId")); newItem.setName(getPurchaseOrderItemDescription(product, supplierProduct, cart.getLocale())); newItem.setBasePrice(supplierProduct.getBigDecimal("lastPrice")); } else { |
Free forum by Nabble | Edit this page |