Author: jacopoc
Date: Thu May 6 15:56:40 2010
New Revision: 941785
URL:
http://svn.apache.org/viewvc?rev=941785&view=revLog:
Small fix to prevent a NPE if the store is not set in an order header.
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy?rev=941785&r1=941784&r2=941785&view=diff==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy Thu May 6 15:56:40 2010
@@ -309,11 +309,13 @@ if (orderHeader) {
context.returnHeaderTypeId = "CUSTOMER_RETURN";
// also set the product store facility Id for sales orders
productStore = orderHeader.getRelatedOne("ProductStore");
- context.storeFacilityId = productStore.inventoryFacilityId;
- if (productStore.reqReturnInventoryReceive) {
- context.needsInventoryReceive = productStore.reqReturnInventoryReceive;
- } else {
- context.needsInventoryReceive = "Y";
+ if (productStore) {
+ context.storeFacilityId = productStore.inventoryFacilityId;
+ if (productStore.reqReturnInventoryReceive) {
+ context.needsInventoryReceive = productStore.reqReturnInventoryReceive;
+ } else {
+ context.needsInventoryReceive = "Y";
+ }
}
} else {
context.returnHeaderTypeId = "VENDOR_RETURN";