Author: hansbak
Date: Mon May 17 07:22:30 2010
New Revision: 945000
URL:
http://svn.apache.org/viewvc?rev=945000&view=revLog:
creation of new purchase order from existing order resulted in a NPE because the productstore is missing: fixed
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl
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=945000&r1=944999&r2=945000&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 Mon May 17 07:22:30 2010
@@ -4758,12 +4758,15 @@ public class ShoppingCart implements Ite
}
GenericValue productStore = null;
+ String splitPayPrefPerShpGrp = null;
try {
productStore = delegator.findByPrimaryKey("ProductStore", UtilMisc.toMap("productStoreId", cart.getProductStoreId()));
} catch (GenericEntityException e) {
Debug.logError(e.toString(), module);
}
- String splitPayPrefPerShpGrp = productStore.getString("splitPayPrefPerShpGrp");
+ if (productStore != null) {
+ splitPayPrefPerShpGrp = productStore.getString("splitPayPrefPerShpGrp");
+ }
if (splitPayPrefPerShpGrp == null) {
splitPayPrefPerShpGrp = "N";
}
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl?rev=945000&r1=944999&r2=945000&view=diff==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl Mon May 17 07:22:30 2010
@@ -445,7 +445,8 @@ function toggleOrderIdList() {
<option value="${countryGeoId}">${geo.geoName?if_exists}</option>
<option value="${countryGeoId}">---</option>
</#if>
- ${screens.render("component://common/widget/CommonScreens.xml#countries")}
+ <option value="">---</option>
+S ${screens.render("component://common/widget/CommonScreens.xml#countries")}
</select>
<select name="includeCountry">
<#if requestParameters.includeCountry?has_content>