Author: jacopoc
Date: Thu Dec 27 02:50:58 2007 New Revision: 607035 URL: http://svn.apache.org/viewvc?rev=607035&view=rev Log: The order terms screen is now available also in sales order checkout. Part of OFBIZ-266 Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetCheckOutTabBar.bsh Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java?rev=607035&r1=607034&r2=607035&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java Thu Dec 27 02:50:58 2007 @@ -884,7 +884,7 @@ boolean requireOptions = true; boolean requireShipGroups = false; boolean requirePayment = !cart.getOrderType().equals("PURCHASE_ORDER"); - boolean requireTerm = cart.getOrderType().equals("PURCHASE_ORDER"); + boolean requireTerm = true; boolean requireAdditionalParty = isAnonymousCheckout; boolean isSingleUsePayment = true; // these options are not available to anonymous shoppers (security) @@ -945,8 +945,7 @@ if (requireCustomer && (customerPartyId == null || customerPartyId.equals("_NA_"))) { return "customer"; } - } - else if (currProcess.equals("shipping")) { + } else if (currProcess.equals("shipping")) { if (requireShipping) { if (requireNewShippingAddress) { return "shippingAddress"; @@ -954,35 +953,29 @@ return "shipping"; } } - } - else if (currProcess.equals("shipGroups")) { + } else if (currProcess.equals("shipGroups")) { if (requireShipGroups) { return "shipGroups"; } - } - else if (currProcess.equals("options")) { + } else if (currProcess.equals("options")) { if (requireOptions && !shippingOptionsSet) { return "options"; } - } - else if (currProcess.equals("term")) { + } else if (currProcess.equals("term")) { if (requireTerm && !cart.isOrderTermSet()) { return "term"; } - } - else if (currProcess.equals("payment")) { + } else if (currProcess.equals("payment")) { List paymentMethodIds = cart.getPaymentMethodIds(); List paymentMethodTypeIds = cart.getPaymentMethodTypeIds(); if (requirePayment && (paymentMethodIds == null || paymentMethodIds.size() == 0) && (paymentMethodTypeIds == null || paymentMethodTypeIds.size() == 0)) { return "payment"; } - } - else if (currProcess.equals("addparty")) { + } else if (currProcess.equals("addparty")) { if (requireAdditionalParty && cart.getAttribute("addpty") == null) { return "addparty"; } - } - else if (currProcess.equals("paysplit")) { + } else if (currProcess.equals("paysplit")) { if (isSingleUsePayment) { return "paysplit"; } Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetCheckOutTabBar.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetCheckOutTabBar.bsh?rev=607035&r1=607034&r2=607035&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetCheckOutTabBar.bsh (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetCheckOutTabBar.bsh Thu Dec 27 02:50:58 2007 @@ -62,6 +62,7 @@ } addStep("CommonOptions", "/setOptions"); if ("SALES_ORDER".equals(shoppingCart.getOrderType())) { + addStep("OrderOrderTerms", "/setOrderTerm"); addStep("AccountingPayment", "/setBilling"); } addStep("PartyParties", "/setAdditionalParty"); |
Free forum by Nabble | Edit this page |