Author: sichen
Date: Sat Nov 18 17:53:46 2006
New Revision: 476685
URL:
http://svn.apache.org/viewvc?view=rev&rev=476685Log:
Slight improvement to order agreements to avoid highly improbable NPE if cart.getOrderType comes back null
Modified:
incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderagreements.bsh
Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderagreements.bsh
URL:
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderagreements.bsh?view=diff&rev=476685&r1=476684&r2=476685==============================================================================
--- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderagreements.bsh (original)
+++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/orderagreements.bsh Sat Nov 18 17:53:46 2006
@@ -49,7 +49,7 @@
partyId = shoppingCart.getOrderPartyId();
// get applicable agreements for order entry
- if (shoppingCart.getOrderType().equals("PURCHASE_ORDER")) {
+ if ("PURCHASE_ORDER".equals(shoppingCart.getOrderType())) {
// the agreement for a PO is from customer to payToParty (ie, us)
agreements = delegator.findByAndCache("Agreement", UtilMisc.toMap("partyIdTo", partyId, "partyIdFrom", payToPartyId));
} else {