|
Modified: ofbiz/branches/jquery/applications/marketing/widget/sfa/forms/LookupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/marketing/widget/sfa/forms/LookupForms.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/marketing/widget/sfa/forms/LookupForms.xml (original) +++ ofbiz/branches/jquery/applications/marketing/widget/sfa/forms/LookupForms.xml Wed Aug 11 13:22:40 2010 @@ -39,4 +39,4 @@ under the License. </field> <field name="relatedCompany"><hidden/></field> </form> -</forms> \ No newline at end of file +</forms> Modified: ofbiz/branches/jquery/applications/marketing/widget/sfa/forms/OpportunityForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/marketing/widget/sfa/forms/OpportunityForms.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/marketing/widget/sfa/forms/OpportunityForms.xml (original) +++ ofbiz/branches/jquery/applications/marketing/widget/sfa/forms/OpportunityForms.xml Wed Aug 11 13:22:40 2010 @@ -162,4 +162,4 @@ under the License. <field name="description" position="1" title="${uiLabelMap.MarketingSegmentGroupDescription}"><display/></field> <field name="nextStep" position="1" title="${uiLabelMap.SfaNextStep}"><display/></field> </form> -</forms> \ No newline at end of file +</forms> Modified: ofbiz/branches/jquery/applications/order/config/OrderUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/config/OrderUiLabels.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/config/OrderUiLabels.xml (original) +++ ofbiz/branches/jquery/applications/order/config/OrderUiLabels.xml Wed Aug 11 13:22:40 2010 @@ -2696,6 +2696,10 @@ <value xml:lang="pt_BR">Criar envio de devolução</value> <value xml:lang="zh">å建éè´§è¿è¾</value> </property> + <property key="OrderCreateShipGroup"> + <value xml:lang="en">Create New Ship Group</value> + <value xml:lang="it">Creare Nuovo Gruppo di Spedizione</value> + </property> <property key="OrderCreateShippingAddress"> <value xml:lang="de">Neue Versandadresse erstellen</value> <value xml:lang="en">Create New Shipping Address</value> Modified: ofbiz/branches/jquery/applications/order/entitydef/entitymodel_view.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/entitydef/entitymodel_view.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/entitydef/entitymodel_view.xml (original) +++ ofbiz/branches/jquery/applications/order/entitydef/entitymodel_view.xml Wed Aug 11 13:22:40 2010 @@ -1695,4 +1695,4 @@ under the License. </view-entity> -</entitymodel> \ No newline at end of file +</entitymodel> Modified: ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml (original) +++ ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml Wed Aug 11 13:22:40 2010 @@ -180,7 +180,7 @@ under the License. <result-to-result result-name="paymentMethodId"/> </call-service> <!-- Set Payment Method--> - <set field="cardSecurityCode" from-field="parameters.billToCardSecurityCode"/> + <set field="cardSecurityCode" from-field="parameters.billToCardSecurityCode" set-if-null="true" set-if-empty="true"/> <create-object class-name="org.ofbiz.order.shoppingcart.CheckOutHelper" field="checkOutHelper"> <field field="dispatcher" type="org.ofbiz.service.LocalDispatcher"/> <field field="delegator" type="org.ofbiz.entity.Delegator"/> @@ -209,4 +209,4 @@ under the License. <field field="dispatcher" type="org.ofbiz.service.LocalDispatcher"/> </call-object-method> </simple-method> -</simple-methods> \ No newline at end of file +</simple-methods> Modified: ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml (original) +++ ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml Wed Aug 11 13:22:40 2010 @@ -1094,4 +1094,4 @@ under the License. <now-timestamp field="newEntity.statusDatetime"/> <create-value value-field="newEntity"/> </simple-method> -</simple-methods> \ No newline at end of file +</simple-methods> Modified: ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/OrderServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/OrderServices.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/OrderServices.xml (original) +++ ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/order/OrderServices.xml Wed Aug 11 13:22:40 2010 @@ -183,7 +183,7 @@ under the License. <entity-one entity-name="Product" auto-field-map="true" value-field="product"/> <set from-field="product.requirementMethodEnumId" field="requirementMethodId"/> <if-empty field="requirementMethodId"> - <set field="isMarketingPkg" value="${groovy: org.ofbiz.common.CommonWorkers.hasParentType(delegator, 'ProductType', 'productTypeId', product.productTypeId, 'parentTypeId', 'MARKETING_PKG')}" type="Boolean"/> + <set field="isMarketingPkg" value="${groovy: org.ofbiz.entity.util.EntityTypeUtil.hasParentType(delegator, 'ProductType', 'productTypeId', product.productTypeId, 'parentTypeId', 'MARKETING_PKG')}" type="Boolean"/> <if> <condition> <and> @@ -762,6 +762,20 @@ under the License. </simple-method> <!-- OrderItemShipGroup --> + <simple-method method-name="createOrderItemShipGroup" short-description="Create OrderItemShipGroup"> + <check-permission permission="ORDERMGR" action="_CREATE"> + <fail-property resource="OrderErrorUiLabels" property="OrderSecurityErrorToRunCreateOrderItemShipGroup"/> + </check-permission> + <check-errors/> + <make-value value-field="newEntity" entity-name="OrderItemShipGroup"/> + <set-pk-fields map="parameters" value-field="newEntity"/> + <set-nonpk-fields map="parameters" value-field="newEntity"/> + <if-empty field="newEntity.shipGroupSeqId"> + <make-next-seq-id value-field="newEntity" seq-field-name="shipGroupSeqId"/> <!-- this finds the next sub-sequence ID --> + <field-to-result field="newEntity.shipGroupSeqId" result-name="shipGroupSeqId"/> + </if-empty> + <create-value value-field="newEntity"/> + </simple-method> <simple-method method-name="updateOrderItemShipGroup" short-description="Update OrderItemShipGroup"> <check-permission permission="ORDERMGR" action="_UPDATE"> <fail-property resource="OrderErrorUiLabels" property="OrderSecurityErrorToRunUpdateOrderItemShipGroup"/> Modified: ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/test/ShoppingListTests.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/test/ShoppingListTests.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/test/ShoppingListTests.xml (original) +++ ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/test/ShoppingListTests.xml Wed Aug 11 13:22:40 2010 @@ -162,4 +162,4 @@ under the License. </assert> <check-errors/> </simple-method> -</simple-methods> \ No newline at end of file +</simple-methods> Modified: ofbiz/branches/jquery/applications/order/servicedef/secas.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/servicedef/secas.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/servicedef/secas.xml (original) +++ ofbiz/branches/jquery/applications/order/servicedef/secas.xml Wed Aug 11 13:22:40 2010 @@ -418,4 +418,4 @@ under the License. <eca service="createUpdateCustomerAndShippingAddress" event="invoke"> <action service="setAnonUserLogin" mode="sync"/> </eca> -</service-eca> \ No newline at end of file +</service-eca> Modified: ofbiz/branches/jquery/applications/order/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/servicedef/services.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/servicedef/services.xml (original) +++ ofbiz/branches/jquery/applications/order/servicedef/services.xml Wed Aug 11 13:22:40 2010 @@ -670,6 +670,13 @@ under the License. </service> <!-- Order Shipping and Contacts --> + <service name="createOrderItemShipGroup" default-entity-name="OrderItemShipGroup" engine="simple" + location="component://order/script/org/ofbiz/order/order/OrderServices.xml" invoke="createOrderItemShipGroup" auth="true"> + <description>Creates a new OrderItemShipGroup.</description> + <auto-attributes mode="IN" include="nonpk" optional="true"/> + <attribute name="orderId" type="String" mode="IN" optional="false"/> + <attribute name="shipGroupSeqId" type="String" mode="INOUT" optional="true"/> + </service> <service name="updateOrderItemShipGroup" default-entity-name="OrderItemShipGroup" engine="simple" location="component://order/script/org/ofbiz/order/order/OrderServices.xml" invoke="updateOrderItemShipGroup" auth="true"> <description>Updates OrderItemShipGroup. The shipmentMethod field is of the format ${shipmentMethodTypeId}@${carrierPartyId}</description> Modified: ofbiz/branches/jquery/applications/order/servicedef/services_checkout.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/servicedef/services_checkout.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/servicedef/services_checkout.xml (original) +++ ofbiz/branches/jquery/applications/order/servicedef/services_checkout.xml Wed Aug 11 13:22:40 2010 @@ -56,4 +56,4 @@ under the License. <attribute name="partyId" type="String" mode="IN" optional="true"/> </service> -</services> \ No newline at end of file +</services> Modified: ofbiz/branches/jquery/applications/order/servicedef/services_quote.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/servicedef/services_quote.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/servicedef/services_quote.xml (original) +++ ofbiz/branches/jquery/applications/order/servicedef/services_quote.xml Wed Aug 11 13:22:40 2010 @@ -249,4 +249,4 @@ under the License. <attribute name="quoteAdjustments" type="List" mode="IN" optional="true"/> <attribute name="quoteId" type="String" mode="OUT" optional="false"/> </service> -</services> \ No newline at end of file +</services> Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/OrderManagerEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/OrderManagerEvents.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/OrderManagerEvents.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/OrderManagerEvents.java Wed Aug 11 13:22:40 2010 @@ -19,7 +19,6 @@ package org.ofbiz.order; import java.math.BigDecimal; -import java.text.NumberFormat; import java.util.Iterator; import java.util.LinkedList; import java.util.List; Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java Wed Aug 11 13:22:40 2010 @@ -19,28 +19,37 @@ package org.ofbiz.order.order; +import java.math.BigDecimal; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + import javolution.util.FastList; -import org.ofbiz.base.util.*; + +import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.GeneralException; +import org.ofbiz.base.util.ObjectType; +import org.ofbiz.base.util.StringUtil; +import org.ofbiz.base.util.UtilMisc; +import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; -import org.ofbiz.entity.condition.*; +import org.ofbiz.entity.condition.EntityComparisonOperator; +import org.ofbiz.entity.condition.EntityCondition; +import org.ofbiz.entity.condition.EntityConditionList; +import org.ofbiz.entity.condition.EntityExpr; +import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.entity.model.DynamicViewEntity; import org.ofbiz.entity.model.ModelKeyMap; import org.ofbiz.entity.util.EntityFindOptions; import org.ofbiz.entity.util.EntityListIterator; -import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.security.Security; import org.ofbiz.service.DispatchContext; import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ServiceUtil; -import java.math.BigDecimal; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - /** * OrderLookupServices */ Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Wed Aug 11 13:22:40 2010 @@ -110,7 +110,11 @@ public class OrderReadHelper { } } if (this.orderHeader == null) { - throw new IllegalArgumentException("Order header passed in is not valid for orderId [" + orderHeader.getString("orderId") + "]"); + if (orderHeader == null) { + throw new IllegalArgumentException("Order header passed is null, or is otherwise invalid"); + } else { + throw new IllegalArgumentException("Order header passed in is not valid for orderId [" + orderHeader.getString("orderId") + "]"); + } } } @@ -1329,6 +1333,10 @@ public class OrderReadHelper { return getOrderHeaderAdjustments(getAdjustments(), shipGroupSeqId); } + public List<GenericValue> getOrderHeaderAdjustmentsTax(String shipGroupSeqId) { + return filterOrderAdjustments(getOrderHeaderAdjustments(getAdjustments(), shipGroupSeqId), false, true, false, false, false); + } + public List<GenericValue> getOrderHeaderAdjustmentsToShow() { return filterOrderAdjustments(getOrderHeaderAdjustments(), true, false, false, false, false); } Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java Wed Aug 11 13:22:40 2010 @@ -48,7 +48,6 @@ import org.ofbiz.base.util.UtilNumber; import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.collections.ResourceBundleMapWrapper; -import org.ofbiz.common.CommonWorkers; import org.ofbiz.common.DataModelConstants; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntity; @@ -62,6 +61,7 @@ import org.ofbiz.entity.transaction.Gene import org.ofbiz.entity.transaction.TransactionUtil; import org.ofbiz.entity.util.EntityFindOptions; import org.ofbiz.entity.util.EntityListIterator; +import org.ofbiz.entity.util.EntityTypeUtil; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.order.shoppingcart.CartItemModifyException; import org.ofbiz.order.shoppingcart.CheckOutHelper; @@ -1171,7 +1171,7 @@ public class OrderServices { } if (reserveInventory) { // for MARKETING_PKG_PICK reserve the components - if (CommonWorkers.hasParentType(delegator, "ProductType", "productTypeId", product.getString("productTypeId"), "parentTypeId", "MARKETING_PKG_PICK")) { + if (EntityTypeUtil.hasParentType(delegator, "ProductType", "productTypeId", product.getString("productTypeId"), "parentTypeId", "MARKETING_PKG_PICK")) { Map componentsRes = dispatcher.runSync("getAssociatedProducts", UtilMisc.toMap("productId", orderItem.getString("productId"), "type", "PRODUCT_COMPONENT")); if (ServiceUtil.isError(componentsRes)) { resErrorMessages.add(componentsRes.get(ModelService.ERROR_MESSAGE)); @@ -1231,7 +1231,7 @@ public class OrderServices { } // Reserving inventory or not we still need to create a marketing package // If the product is a marketing package auto, attempt to create enough packages to bring ATP back to 0, won't necessarily create enough to cover this order. - if (CommonWorkers.hasParentType(delegator, "ProductType", "productTypeId", product.getString("productTypeId"), "parentTypeId", "MARKETING_PKG_AUTO")) { + if (EntityTypeUtil.hasParentType(delegator, "ProductType", "productTypeId", product.getString("productTypeId"), "parentTypeId", "MARKETING_PKG_AUTO")) { // do something tricky here: run as the "system" user // that can actually create and run a production run GenericValue permUserLogin = delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId", "system")); @@ -3365,6 +3365,7 @@ public class OrderServices { // set the item in the selected ship group item.setShipBeforeDate(itemDesiredDeliveryDate); + cart.clearItemShipInfo(item); cart.setItemShipGroupQty(item, item.getQuantity(), shipGroupIdx); } } catch (CartItemModifyException e) { Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/quote/QuoteServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/quote/QuoteServices.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/quote/QuoteServices.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/quote/QuoteServices.java Wed Aug 11 13:22:40 2010 @@ -265,4 +265,4 @@ public class QuoteServices { return result; } -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java Wed Aug 11 13:22:40 2010 @@ -1166,4 +1166,4 @@ public class CheckOutEvents { return "success"; } } -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Wed Aug 11 13:22:40 2010 @@ -35,6 +35,7 @@ import org.ofbiz.base.util.ObjectType; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilFormatOut; +import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilNumber; import org.ofbiz.base.util.UtilProperties; @@ -85,7 +86,7 @@ public class CheckOutHelper { } public Map<String, Object> setCheckOutShippingAddress(String shippingContactMechId) { - List errorMessages = new ArrayList(); + List<String> errorMessages = new ArrayList<String>(); Map<String, Object> result; String errMsg = null; @@ -106,8 +107,8 @@ public class CheckOutHelper { return result; } - private List setCheckOutShippingAddressInternal(String shippingContactMechId) { - List errorMessages = new ArrayList(); + private List<String> setCheckOutShippingAddressInternal(String shippingContactMechId) { + List<String> errorMessages = new ArrayList<String>(); String errMsg = null; // set the shipping address @@ -122,10 +123,10 @@ public class CheckOutHelper { return errorMessages; } - public Map setCheckOutShippingOptions(String shippingMethod, String shippingInstructions, + public Map<String, Object> setCheckOutShippingOptions(String shippingMethod, String shippingInstructions, String orderAdditionalEmails, String maySplit, String giftMessage, String isGift, String internalCode, String shipBeforeDate, String shipAfterDate) { - List errorMessages = new ArrayList(); - Map result; + List<String> errorMessages = new ArrayList<String>(); + Map<String, Object> result; String errMsg = null; if (UtilValidate.isNotEmpty(this.cart)) { @@ -147,9 +148,9 @@ public class CheckOutHelper { return result; } - private List setCheckOutShippingOptionsInternal(String shippingMethod, String shippingInstructions, String orderAdditionalEmails, + private List<String> setCheckOutShippingOptionsInternal(String shippingMethod, String shippingInstructions, String orderAdditionalEmails, String maySplit, String giftMessage, String isGift, String internalCode, String shipBeforeDate, String shipAfterDate) { - List errorMessages = new ArrayList(); + List<String> errorMessages = new ArrayList<String>(); String errMsg = null; // set the general shipping options @@ -218,9 +219,9 @@ public class CheckOutHelper { return errorMessages; } - public Map setCheckOutPayment(Map selectedPaymentMethods, List singleUsePayments, String billingAccountId) { - List errorMessages = new ArrayList(); - Map result; + public Map<String, Object> setCheckOutPayment(Map<String, Map<String, Object>> selectedPaymentMethods, List<String> singleUsePayments, String billingAccountId) { + List<String> errorMessages = new ArrayList<String>(); + Map<String, Object> result; String errMsg = null; if (UtilValidate.isNotEmpty(this.cart)) { @@ -241,12 +242,12 @@ public class CheckOutHelper { return result; } - public List setCheckOutPaymentInternal(Map selectedPaymentMethods, List singleUsePayments, String billingAccountId) { - List errorMessages = new ArrayList(); + public List<String> setCheckOutPaymentInternal(Map<String, Map<String, Object>> selectedPaymentMethods, List<String> singleUsePayments, String billingAccountId) { + List<String> errorMessages = new ArrayList<String>(); String errMsg = null; if (singleUsePayments == null) { - singleUsePayments = new ArrayList(); + singleUsePayments = new ArrayList<String>(); } // set the payment method option @@ -255,17 +256,17 @@ public class CheckOutHelper { cart.clearPayments(); if (UtilValidate.isNotEmpty(billingAccountId)) { - Map billingAccountMap = (Map)selectedPaymentMethods.get("EXT_BILLACT"); + Map<String, Object> billingAccountMap = selectedPaymentMethods.get("EXT_BILLACT"); BigDecimal billingAccountAmt = (BigDecimal)billingAccountMap.get("amount"); // set cart billing account data and generate a payment method containing the amount we will be charging cart.setBillingAccount(billingAccountId, (billingAccountAmt != null ? billingAccountAmt: BigDecimal.ZERO)); // copy the billing account terms as order terms try { - List billingAccountTerms = delegator.findByAnd("BillingAccountTerm", UtilMisc.toMap("billingAccountId", billingAccountId)); + List<GenericValue> billingAccountTerms = delegator.findByAnd("BillingAccountTerm", UtilMisc.toMap("billingAccountId", billingAccountId)); if (UtilValidate.isNotEmpty(billingAccountTerms)) { - Iterator billingAccountTermsIt = billingAccountTerms.iterator(); + Iterator<GenericValue> billingAccountTermsIt = billingAccountTerms.iterator(); while (billingAccountTermsIt.hasNext()) { - GenericValue billingAccountTerm = (GenericValue)billingAccountTermsIt.next(); + GenericValue billingAccountTerm = billingAccountTermsIt.next(); // the term is not copied if in the cart a term of the same type is already set if (!cart.hasOrderTerm(billingAccountTerm.getString("termTypeId"))) { cart.addOrderTerm(billingAccountTerm.getString("termTypeId"), billingAccountTerm.getBigDecimal("termValue"), billingAccountTerm.getLong("termDays")); @@ -311,14 +312,14 @@ public class CheckOutHelper { // XXX: Note that this step is critical for the billing account to be charged correctly if (amountToUse.compareTo(BigDecimal.ZERO) > 0) { cart.setBillingAccount(billingAccountId, amountToUse); - selectedPaymentMethods.put("EXT_BILLACT", UtilMisc.toMap("amount", amountToUse, "securityCode", null)); + selectedPaymentMethods.put("EXT_BILLACT", UtilMisc.<String, Object>toMap("amount", amountToUse, "securityCode", null)); } } - Set paymentMethods = selectedPaymentMethods.keySet(); - Iterator i = paymentMethods.iterator(); + Set<String> paymentMethods = selectedPaymentMethods.keySet(); + Iterator<String> i = paymentMethods.iterator(); while (i.hasNext()) { - String checkOutPaymentId = (String) i.next(); + String checkOutPaymentId = i.next(); String finAccountId = null; if (checkOutPaymentId.indexOf("|") > -1) { @@ -335,7 +336,7 @@ public class CheckOutHelper { BigDecimal paymentAmount = null; String securityCode = null; if (selectedPaymentMethods.get(checkOutPaymentId) != null) { - Map checkOutPaymentInfo = (Map) selectedPaymentMethods.get(checkOutPaymentId); + Map<String, Object> checkOutPaymentInfo = selectedPaymentMethods.get(checkOutPaymentId); paymentAmount = (BigDecimal) checkOutPaymentInfo.get("amount"); securityCode = (String) checkOutPaymentInfo.get("securityCode"); } @@ -359,9 +360,9 @@ public class CheckOutHelper { return errorMessages; } - public Map setCheckOutDates(Timestamp shipBefore, Timestamp shipAfter) { - List errorMessages = new ArrayList(); - Map result = null; + public Map<String, Object> setCheckOutDates(Timestamp shipBefore, Timestamp shipAfter) { + List<String> errorMessages = new ArrayList<String>(); + Map<String, Object> result = null; String errMsg = null; if (UtilValidate.isNotEmpty(this.cart)) { @@ -384,11 +385,11 @@ public class CheckOutHelper { } - public Map setCheckOutOptions(String shippingMethod, String shippingContactMechId, Map selectedPaymentMethods, - List singleUsePayments, String billingAccountId, String shippingInstructions, + public Map<String, Object> setCheckOutOptions(String shippingMethod, String shippingContactMechId, Map<String, Map<String, Object>> selectedPaymentMethods, + List<String> singleUsePayments, String billingAccountId, String shippingInstructions, String orderAdditionalEmails, String maySplit, String giftMessage, String isGift, String internalCode, String shipBeforeDate, String shipAfterDate) { - List errorMessages = new ArrayList(); - Map result = null; + List<String> errorMessages = new ArrayList<String>(); + Map<String, Object> result = null; String errMsg = null; @@ -401,7 +402,7 @@ public class CheckOutHelper { errorMessages.addAll(setCheckOutShippingAddressInternal(shippingContactMechId)); // Recalc shipping costs before setting payment - Map shipEstimateMap = ShippingEvents.getShipGroupEstimate(dispatcher, delegator, cart, 0); + Map<String, Object> shipEstimateMap = ShippingEvents.getShipGroupEstimate(dispatcher, delegator, cart, 0); BigDecimal shippingTotal = (BigDecimal) shipEstimateMap.get("shippingTotal"); if (shippingTotal == null) { shippingTotal = BigDecimal.ZERO; @@ -434,10 +435,10 @@ public class CheckOutHelper { return result; } - public Map checkGiftCard(Map params, Map selectedPaymentMethods) { - List errorMessages = new ArrayList(); - Map errorMaps = new HashMap(); - Map result = new HashMap(); + public Map<String, Object> checkGiftCard(Map<String, Object> params, Map<String, Map<String, Object>> selectedPaymentMethods) { + List<String> errorMessages = new ArrayList<String>(); + Map<String, Object> errorMaps = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<String, Object>(); String errMsg = null; // handle gift card payment if (params.get("addGiftCard") != null) { @@ -505,14 +506,14 @@ public class CheckOutHelper { if (gcFieldsOkay) { // store the gift card - Map gcCtx = new HashMap(); + Map<String, Object> gcCtx = new HashMap<String, Object>(); gcCtx.put("partyId", params.get("partyId")); gcCtx.put("cardNumber", gcNum); if (cart.isPinRequiredForGC(delegator)) { gcCtx.put("pinNumber", gcPin); } gcCtx.put("userLogin", cart.getUserLogin()); - Map gcResult = null; + Map<String, Object> gcResult = null; try { gcResult = dispatcher.runSync("createGiftCard", gcCtx); } catch (GenericServiceException e) { @@ -561,7 +562,7 @@ public class CheckOutHelper { // Create order event - uses createOrder service for processing public Map<String, Object> createOrder(GenericValue userLogin, String distributorId, String affiliateId, - List trackingCodeOrders, boolean areOrderItemsExploded, String visitId, String webSiteId) { + List<GenericValue> trackingCodeOrders, boolean areOrderItemsExploded, String visitId, String webSiteId) { if (this.cart == null) { return null; } @@ -574,7 +575,7 @@ public class CheckOutHelper { BigDecimal grandTotal = this.cart.getGrandTotal(); // store the order - build the context - Map context = this.cart.makeCartMap(this.dispatcher, areOrderItemsExploded); + Map<String, Object> context = this.cart.makeCartMap(this.dispatcher, areOrderItemsExploded); //get the TrackingCodeOrder List context.put("trackingCodeOrders", trackingCodeOrders); @@ -595,7 +596,7 @@ public class CheckOutHelper { String productStoreId = cart.getProductStoreId(); // store the order - invoke the service - Map storeResult = null; + Map<String, Object> storeResult = null; try { storeResult = dispatcher.runSync("storeOrder", context); @@ -608,7 +609,7 @@ public class CheckOutHelper { } } catch (GenericServiceException e) { String service = e.getMessage(); - Map messageMap = UtilMisc.toMap("service", service); + Map<String, Object> messageMap = UtilMisc.<String, Object>toMap("service", service); String errMsg = UtilProperties.getMessage(resource_error, "checkhelper.could_not_create_order_invoking_service", messageMap, (cart != null ? cart.getLocale() : Locale.getDefault())); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -617,7 +618,7 @@ public class CheckOutHelper { // check for error message(s) if (ServiceUtil.isError(storeResult)) { String errMsg = UtilProperties.getMessage(resource_error, "checkhelper.did_not_complete_order_following_occurred", (cart != null ? cart.getLocale() : Locale.getDefault())); - List resErrorMessages = new LinkedList(); + List<String> resErrorMessages = new LinkedList<String>(); resErrorMessages.add(errMsg); resErrorMessages.add(ServiceUtil.getErrorMessage(storeResult)); return ServiceUtil.returnError(resErrorMessages); @@ -626,10 +627,11 @@ public class CheckOutHelper { // ---------- // If needed, the production runs are created and linked to the order lines. // - Iterator orderItems = ((List)context.get("orderItems")).iterator(); + List<GenericValue> orderItems = UtilGenerics.checkList(context.get("orderItems")); + Iterator<GenericValue> orderItemsIt = orderItems.iterator(); int counter = 0; - while (orderItems.hasNext()) { - GenericValue orderItem = (GenericValue) orderItems.next(); + while (orderItemsIt.hasNext()) { + GenericValue orderItem = orderItemsIt.next(); String productId = orderItem.getString("productId"); if (productId != null) { try { @@ -640,7 +642,7 @@ public class CheckOutHelper { GenericValue product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId)); if ("AGGREGATED_CONF".equals(product.getString("productTypeId"))) { org.ofbiz.product.config.ProductConfigWrapper config = this.cart.findCartItem(counter).getConfigWrapper(); - Map inputMap = new HashMap(); + Map<String, Object> inputMap = new HashMap<String, Object>(); inputMap.put("config", config); inputMap.put("facilityId", productStore.getString("inventoryFacilityId")); inputMap.put("orderId", orderId); @@ -648,14 +650,14 @@ public class CheckOutHelper { inputMap.put("quantity", orderItem.getBigDecimal("quantity")); inputMap.put("userLogin", permUserLogin); - Map prunResult = dispatcher.runSync("createProductionRunFromConfiguration", inputMap); + Map<String, Object> prunResult = dispatcher.runSync("createProductionRunFromConfiguration", inputMap); if (ServiceUtil.isError(prunResult)) { Debug.logError(ServiceUtil.getErrorMessage(prunResult) + " for input:" + inputMap, module); } } } catch (Exception e) { String service = e.getMessage(); - Map messageMap = UtilMisc.toMap("service", service); + Map<String, String> messageMap = UtilMisc.toMap("service", service); String errMsg = UtilProperties.getMessage(resource_error, "checkhelper.could_not_create_order_invoking_service", messageMap, (cart != null ? cart.getLocale() : Locale.getDefault())); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -668,19 +670,19 @@ public class CheckOutHelper { // ---------- // The status of the requirement associated to the shopping cart lines is set to "ordered". // - Iterator shoppingCartItems = this.cart.items().iterator(); + Iterator<ShoppingCartItem> shoppingCartItems = this.cart.items().iterator(); while (shoppingCartItems.hasNext()) { - ShoppingCartItem shoppingCartItem = (ShoppingCartItem)shoppingCartItems.next(); + ShoppingCartItem shoppingCartItem = shoppingCartItems.next(); String requirementId = shoppingCartItem.getRequirementId(); if (requirementId != null) { try { - Map inputMap = UtilMisc.toMap("requirementId", requirementId, "statusId", "REQ_ORDERED"); + Map<String, Object> inputMap = UtilMisc.<String, Object>toMap("requirementId", requirementId, "statusId", "REQ_ORDERED"); inputMap.put("userLogin", userLogin); // TODO: check service result for an error return - Map outMap = dispatcher.runSync("updateRequirement", inputMap); + Map<String, Object> outMap = dispatcher.runSync("updateRequirement", inputMap); } catch (Exception e) { String service = e.getMessage(); - Map messageMap = UtilMisc.toMap("service", service); + Map<String, String> messageMap = UtilMisc.toMap("service", service); String errMsg = UtilProperties.getMessage(resource_error, "checkhelper.could_not_create_order_invoking_service", messageMap, (cart != null ? cart.getLocale() : Locale.getDefault())); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); @@ -690,26 +692,25 @@ public class CheckOutHelper { // ---------- // set the orderId for use by chained events - Map result = ServiceUtil.returnSuccess(); + Map<String, Object> result = ServiceUtil.returnSuccess(); result.put("orderId", orderId); result.put("orderAdditionalEmails", this.cart.getOrderAdditionalEmails()); // save the emails to the order - List toBeStored = new LinkedList(); + List<GenericValue> toBeStored = new LinkedList<GenericValue>(); GenericValue party = null; try { party = this.delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId)); } catch (GenericEntityException e) { Debug.logWarning(e, UtilProperties.getMessage(resource_error,"OrderProblemsGettingPartyRecord", cart.getLocale()), module); - party = null; } // create order contact mechs for the email address(s) if (party != null) { - Iterator emailIter = UtilMisc.toIterator(ContactHelper.getContactMechByType(party, "EMAIL_ADDRESS", false)); + Iterator<GenericValue> emailIter = UtilMisc.toIterator(ContactHelper.getContactMechByType(party, "EMAIL_ADDRESS", false)); while (emailIter != null && emailIter.hasNext()) { - GenericValue email = (GenericValue) emailIter.next(); + GenericValue email = emailIter.next(); GenericValue orderContactMech = this.delegator.makeValue("OrderContactMech", UtilMisc.toMap("orderId", orderId, "contactMechId", email.getString("contactMechId"), "contactMechPurposeTypeId", "ORDER_EMAIL")); toBeStored.add(orderContactMech); @@ -718,11 +719,11 @@ public class CheckOutHelper { // create dummy contact mechs and order contact mechs for the additional emails String additionalEmails = this.cart.getOrderAdditionalEmails(); - List emailList = StringUtil.split(additionalEmails, ","); - if (emailList == null) emailList = new ArrayList(); - Iterator eli = emailList.iterator(); + List<String> emailList = StringUtil.split(additionalEmails, ","); + if (emailList == null) emailList = new ArrayList<String>(); + Iterator<String> eli = emailList.iterator(); while (eli.hasNext()) { - String email = (String) eli.next(); + String email = eli.next(); String contactMechId = this.delegator.getNextSeqId("ContactMech"); GenericValue contactMech = this.delegator.makeValue("ContactMech", UtilMisc.toMap("contactMechId", contactMechId, "contactMechTypeId", "EMAIL_ADDRESS", "infoString", email)); @@ -757,22 +758,22 @@ public class CheckOutHelper { int shipGroups = this.cart.getShipGroupSize(); for (int i = 0; i < shipGroups; i++) { - Map shoppingCartItemIndexMap = new HashMap(); - Map serviceContext = this.makeTaxContext(i, shipAddress, shoppingCartItemIndexMap); - List taxReturn = this.getTaxAdjustments(dispatcher, "calcTax", serviceContext); + Map<Integer, ShoppingCartItem> shoppingCartItemIndexMap = new HashMap<Integer, ShoppingCartItem>(); + Map<String, Object> serviceContext = this.makeTaxContext(i, shipAddress, shoppingCartItemIndexMap); + List<List<? extends Object>> taxReturn = this.getTaxAdjustments(dispatcher, "calcTax", serviceContext); if (Debug.verboseOn()) Debug.logVerbose("ReturnList: " + taxReturn, module); ShoppingCart.CartShipInfo csi = cart.getShipInfo(i); - List orderAdj = (List) taxReturn.get(0); - List itemAdj = (List) taxReturn.get(1); + List<GenericValue> orderAdj = UtilGenerics.checkList(taxReturn.get(0)); + List<List<GenericValue>> itemAdj = UtilGenerics.checkList(taxReturn.get(1)); // set the item adjustments if (itemAdj != null) { for (int x = 0; x < itemAdj.size(); x++) { - List adjs = (List) itemAdj.get(x); - ShoppingCartItem item = (ShoppingCartItem) shoppingCartItemIndexMap.get(Integer.valueOf(x)); + List<GenericValue> adjs = itemAdj.get(x); + ShoppingCartItem item = shoppingCartItemIndexMap.get(Integer.valueOf(x)); if (adjs == null) { - adjs = new LinkedList(); + adjs = new LinkedList<GenericValue>(); } csi.setItemInfo(item, adjs); if (Debug.verboseOn()) Debug.logVerbose("Added item adjustments to ship group [" + i + " / " + x + "] - " + adjs, module); @@ -785,14 +786,14 @@ public class CheckOutHelper { } } - private Map makeTaxContext(int shipGroup, GenericValue shipAddress, Map shoppingCartItemIndexMap) throws GeneralException { + private Map<String, Object> makeTaxContext(int shipGroup, GenericValue shipAddress, Map<Integer, ShoppingCartItem> shoppingCartItemIndexMap) { ShoppingCart.CartShipInfo csi = cart.getShipInfo(shipGroup); int totalItems = csi.shipItemInfo.size(); - List product = new ArrayList(totalItems); - List amount = new ArrayList(totalItems); - List price = new ArrayList(totalItems); - List shipAmt = new ArrayList(totalItems); + List<GenericValue> product = new ArrayList<GenericValue>(totalItems); + List<BigDecimal> amount = new ArrayList<BigDecimal>(totalItems); + List<BigDecimal> price = new ArrayList<BigDecimal>(totalItems); + List<BigDecimal> shipAmt = new ArrayList<BigDecimal>(totalItems); // Debug.logInfo("====== makeTaxContext passed in shipAddress=" + shipAddress, module); @@ -812,7 +813,7 @@ public class CheckOutHelper { } //add promotion adjustments - List allAdjustments = cart.getAdjustments(); + List<GenericValue> allAdjustments = cart.getAdjustments(); BigDecimal orderPromoAmt = OrderReadHelper.calcOrderPromoAdjustmentsBd(allAdjustments); BigDecimal shipAmount = csi.shipEstimate; @@ -834,7 +835,7 @@ public class CheckOutHelper { } } - Map serviceContext = UtilMisc.toMap("productStoreId", cart.getProductStoreId()); + Map<String, Object> serviceContext = UtilMisc.<String, Object>toMap("productStoreId", cart.getProductStoreId()); serviceContext.put("payToPartyId", cart.getBillFromVendorPartyId()); serviceContext.put("billToPartyId", cart.getBillToCustomerPartyId()); serviceContext.put("itemProductList", product); @@ -849,8 +850,8 @@ public class CheckOutHelper { } // Calc the tax adjustments. - private List getTaxAdjustments(LocalDispatcher dispatcher, String taxService, Map serviceContext) throws GeneralException { - Map serviceResult = null; + private List<List<? extends Object>> getTaxAdjustments(LocalDispatcher dispatcher, String taxService, Map<String, Object> serviceContext) throws GeneralException { + Map<String, Object> serviceResult = null; try { serviceResult = dispatcher.runSync(taxService, serviceContext); @@ -864,8 +865,8 @@ public class CheckOutHelper { } // the adjustments (returned in order) from taxware. - List orderAdj = (List) serviceResult.get("orderAdjustments"); - List itemAdj = (List) serviceResult.get("itemAdjustments"); + List<GenericValue> orderAdj = UtilGenerics.checkList(serviceResult.get("orderAdjustments")); + List<List<GenericValue>> itemAdj = UtilGenerics.checkList(serviceResult.get("itemAdjustments")); return UtilMisc.toList(orderAdj, itemAdj); } @@ -899,17 +900,17 @@ public class CheckOutHelper { } // filter out cancelled preferences - List canExpr = UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED")); + List<EntityExpr> canExpr = UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED")); allPaymentPreferences = EntityUtil.filterByAnd(allPaymentPreferences, canExpr); // check for online payment methods or in-hand payment types with verbal or external refs - List exprs = UtilMisc.toList(EntityCondition.makeCondition("manualRefNum", EntityOperator.NOT_EQUAL, null)); - List manualRefPaymentPrefs = EntityUtil.filterByAnd(allPaymentPreferences, exprs); + List<EntityExpr> exprs = UtilMisc.toList(EntityCondition.makeCondition("manualRefNum", EntityOperator.NOT_EQUAL, null)); + List<GenericValue> manualRefPaymentPrefs = EntityUtil.filterByAnd(allPaymentPreferences, exprs); if (UtilValidate.isNotEmpty(manualRefPaymentPrefs)) { - Iterator i = manualRefPaymentPrefs.iterator(); + Iterator<GenericValue> i = manualRefPaymentPrefs.iterator(); while (i.hasNext()) { - GenericValue opp = (GenericValue) i.next(); - Map authCtx = new HashMap(); + GenericValue opp = i.next(); + Map<String, Object> authCtx = new HashMap<String, Object>(); authCtx.put("orderPaymentPreference", opp); if (opp.get("paymentMethodId") == null) { authCtx.put("serviceTypeEnum", "PRDS_PAY_EXTERNAL"); @@ -920,7 +921,7 @@ public class CheckOutHelper { authCtx.put("userLogin", userLogin); authCtx.put("currencyUomId", currencyUomId); - Map authResp = dispatcher.runSync("processAuthResult", authCtx); + Map<String, Object> authResp = dispatcher.runSync("processAuthResult", authCtx); if (authResp != null && ServiceUtil.isError(authResp)) { throw new GeneralException(ServiceUtil.getErrorMessage(authResp)); } @@ -929,7 +930,7 @@ public class CheckOutHelper { OrderChangeHelper.approveOrder(dispatcher, userLogin, orderId, manualHold); if ("Y".equalsIgnoreCase(productStore.getString("manualAuthIsCapture"))) { - Map captCtx = new HashMap(); + Map<String, Object> captCtx = new HashMap<String, Object>(); captCtx.put("orderPaymentPreference", opp); if (opp.get("paymentMethodId") == null) { captCtx.put("serviceTypeEnum", "PRDS_PAY_EXTERNAL"); @@ -941,7 +942,7 @@ public class CheckOutHelper { captCtx.put("userLogin", userLogin); captCtx.put("currencyUomId", currencyUomId); - Map capResp = dispatcher.runSync("processCaptureResult", captCtx); + Map<String, Object> capResp = dispatcher.runSync("processCaptureResult", captCtx); if (capResp != null && ServiceUtil.isError(capResp)) { throw new GeneralException(ServiceUtil.getErrorMessage(capResp)); } @@ -961,8 +962,8 @@ public class CheckOutHelper { } // check for online payment methods needing authorization - Map paymentFields = UtilMisc.toMap("statusId", "PAYMENT_NOT_AUTH"); - List onlinePaymentPrefs = EntityUtil.filterByAnd(allPaymentPreferences, paymentFields); + Map<String, Object> paymentFields = UtilMisc.<String, Object>toMap("statusId", "PAYMENT_NOT_AUTH"); + List<GenericValue> onlinePaymentPrefs = EntityUtil.filterByAnd(allPaymentPreferences, paymentFields); // Check the payment preferences; if we have ANY w/ status PAYMENT_NOT_AUTH invoke payment service. // Invoke payment processing. @@ -977,7 +978,7 @@ public class CheckOutHelper { } // now there should be something to authorize; go ahead - Map paymentResult = null; + Map<String, Object> paymentResult = null; try { // invoke the payment gateway service. paymentResult = dispatcher.runSync("authOrderPayments", @@ -992,10 +993,11 @@ public class CheckOutHelper { throw new GeneralException(ServiceUtil.getErrorMessage(paymentResult)); } - // grab the customer messages -- only passed back in the case of an error or failure - List messages = (List) paymentResult.get("authResultMsgs"); if (paymentResult != null && paymentResult.containsKey("processResult")) { + // grab the customer messages -- only passed back in the case of an error or failure + List<String> messages = UtilGenerics.checkList(paymentResult.get("authResultMsgs")); + String authResp = (String) paymentResult.get("processResult"); if (authResp.equals("FAILED")) { @@ -1059,19 +1061,19 @@ public class CheckOutHelper { } } else { // Get the paymentMethodTypeIds - this will need to change when ecom supports multiple payments - List cashCodPcBaExpr = UtilMisc.toList(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, "CASH"), + List<EntityExpr> cashCodPcBaExpr = UtilMisc.toList(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, "CASH"), EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, "EXT_COD"), EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, "PERSONAL_CHECK"), EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, "EXT_BILLACT")); - List cashCodPcBaPaymentPreferences = EntityUtil.filterByOr(allPaymentPreferences, cashCodPcBaExpr); + List<GenericValue> cashCodPcBaPaymentPreferences = EntityUtil.filterByOr(allPaymentPreferences, cashCodPcBaExpr); if (UtilValidate.isNotEmpty(cashCodPcBaPaymentPreferences) && UtilValidate.isNotEmpty(allPaymentPreferences) && cashCodPcBaPaymentPreferences.size() == allPaymentPreferences.size()) { //if there are Check type, approve the order only if it is face to face - List checkPareferences = EntityUtil.filterByAnd(cashCodPcBaPaymentPreferences, UtilMisc.toMap("paymentMethodTypeId", "PERSONAL_CHECK")); - if (UtilValidate.isNotEmpty(checkPareferences)) { + List<GenericValue> checkPreferences = EntityUtil.filterByAnd(cashCodPcBaPaymentPreferences, UtilMisc.toMap("paymentMethodTypeId", "PERSONAL_CHECK")); + if (UtilValidate.isNotEmpty(checkPreferences)) { if (faceToFace) { boolean ok = OrderChangeHelper.approveOrder(dispatcher, userLogin, orderId, manualHold); if (!ok) { @@ -1104,12 +1106,12 @@ public class CheckOutHelper { return ServiceUtil.returnSuccess(); } - public static void adjustFaceToFacePayment(String orderId, BigDecimal cartTotal, List allPaymentPrefs, GenericValue userLogin, Delegator delegator) throws GeneralException { + public static void adjustFaceToFacePayment(String orderId, BigDecimal cartTotal, List<GenericValue> allPaymentPrefs, GenericValue userLogin, Delegator delegator) throws GeneralException { BigDecimal prefTotal = BigDecimal.ZERO; if (allPaymentPrefs != null) { - Iterator i = allPaymentPrefs.iterator(); + Iterator<GenericValue> i = allPaymentPrefs.iterator(); while (i.hasNext()) { - GenericValue pref = (GenericValue) i.next(); + GenericValue pref = i.next(); BigDecimal maxAmount = pref.getBigDecimal("maxAmount"); if (maxAmount == null) maxAmount = BigDecimal.ZERO; prefTotal = prefTotal.add(maxAmount); @@ -1131,7 +1133,7 @@ public class CheckOutHelper { } } - public Map checkOrderBlacklist(GenericValue userLogin) { + public Map<String, Object> checkOrderBlackList() { if (cart == null) { return ServiceUtil.returnSuccess("success"); } @@ -1141,16 +1143,16 @@ public class CheckOutHelper { } String shippingAddress = UtilFormatOut.checkNull(shippingAddressObj.getString("address1")).toUpperCase(); shippingAddress = UtilFormatOut.makeSqlSafe(shippingAddress); - List exprs = UtilMisc.toList(EntityCondition.makeCondition( + List<EntityExpr> exprs = UtilMisc.toList(EntityCondition.makeCondition( EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("blacklistString"), EntityOperator.EQUALS, EntityFunction.UPPER(shippingAddress)), EntityOperator.AND, EntityCondition.makeCondition("orderBlacklistTypeId", EntityOperator.EQUALS, "BLACKLIST_ADDRESS"))); String errMsg=null; - List paymentMethods = this.cart.getPaymentMethods(); - Iterator i = paymentMethods.iterator(); + List<GenericValue> paymentMethods = this.cart.getPaymentMethods(); + Iterator<GenericValue> i = paymentMethods.iterator(); while (i.hasNext()) { - GenericValue paymentMethod = (GenericValue) i.next(); + GenericValue paymentMethod = i.next(); if ((paymentMethod != null) && ("CREDIT_CARD".equals(paymentMethod.getString("paymentMethodTypeId")))) { GenericValue creditCard = null; GenericValue billingAddress = null; @@ -1180,10 +1182,10 @@ public class CheckOutHelper { } } - List blacklistFound = null; + List<GenericValue> blacklistFound = null; if (exprs.size() > 0) { try { - EntityConditionList ecl = EntityCondition.makeCondition(exprs, EntityOperator.AND); + EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(exprs, EntityOperator.AND); blacklistFound = this.delegator.findList("OrderBlacklist", ecl, null, null, null, false); } catch (GenericEntityException e) { Debug.logError(e, "Problems with OrderBlacklist lookup.", module); @@ -1199,8 +1201,13 @@ public class CheckOutHelper { } } - public Map failedBlacklistCheck(GenericValue userLogin, GenericValue productStore) { - Map result; + @Deprecated + public Map<String, Object> checkOrderBlacklist(GenericValue userLogin) { + return checkOrderBlackList(); + } + + public Map<String, Object> failedBlacklistCheck(GenericValue userLogin, GenericValue productStore) { + Map<String, Object> result; String errMsg=null; String REJECT_MESSAGE = productStore.getString("authFraudMessage"); String orderId = this.cart.getOrderId(); @@ -1230,9 +1237,9 @@ public class CheckOutHelper { return result; } - public Map checkExternalPayment(String orderId) { - Map result; - String errMsg=null; + public Map<String, Object> checkExternalPayment(String orderId) { + Map<String, Object> result; + String errMsg = null; // warning there can only be ONE payment preference for this to work // you cannot accept multiple payment type when using an external gateway GenericValue orderHeader = null; @@ -1245,7 +1252,7 @@ public class CheckOutHelper { return result; } if (orderHeader != null) { - List paymentPrefs = null; + List<GenericValue> paymentPrefs = null; try { paymentPrefs = orderHeader.getRelated("OrderPaymentPreference"); } catch (GenericEntityException e) { @@ -1410,8 +1417,8 @@ public class CheckOutHelper { * @return A Map conforming to the OFBiz Service conventions containing * any error messages. */ - public Map finalizeOrderEntryPayment(String checkOutPaymentId, BigDecimal amount, boolean singleUse, boolean append) { - Map result = ServiceUtil.returnSuccess(); + public Map<String, Object> finalizeOrderEntryPayment(String checkOutPaymentId, BigDecimal amount, boolean singleUse, boolean append) { + Map<String, Object> result = ServiceUtil.returnSuccess(); if (UtilValidate.isNotEmpty(checkOutPaymentId)) { if (!append) { @@ -1426,7 +1433,7 @@ public class CheckOutHelper { public static BigDecimal availableAccountBalance(String billingAccountId, LocalDispatcher dispatcher) { if (billingAccountId == null) return BigDecimal.ZERO; try { - Map res = dispatcher.runSync("calcBillingAccountBalance", UtilMisc.toMap("billingAccountId", billingAccountId)); + Map<String, Object> res = dispatcher.runSync("calcBillingAccountBalance", UtilMisc.toMap("billingAccountId", billingAccountId)); BigDecimal availableBalance = (BigDecimal) res.get("accountBalance"); if (availableBalance != null) { return availableBalance; @@ -1441,12 +1448,12 @@ public class CheckOutHelper { return availableAccountBalance(billingAccountId, dispatcher); } - public Map makeBillingAccountMap(List paymentPrefs) { - Map accountMap = new HashMap(); + public Map<String, BigDecimal> makeBillingAccountMap(List<GenericValue> paymentPrefs) { + Map<String, BigDecimal> accountMap = new HashMap<String, BigDecimal>(); if (paymentPrefs != null) { - Iterator i = accountMap.keySet().iterator(); + Iterator<GenericValue> i = paymentPrefs.iterator(); while (i.hasNext()) { - GenericValue pp = (GenericValue) i.next(); + GenericValue pp = i.next(); if (pp.get("billingAccountId") != null) { accountMap.put(pp.getString("billingAccountId"), pp.getBigDecimal("maxAmount")); } @@ -1461,14 +1468,14 @@ public class CheckOutHelper { BigDecimal billingAccountAmt = cart.getBillingAccountAmount(); BigDecimal availableAmount = this.availableAccountBalance(billingAccountId); if (billingAccountAmt.compareTo(availableAmount) > 0) { - Map messageMap = UtilMisc.toMap("billingAccountId", billingAccountId); + Map<String, String> messageMap = UtilMisc.toMap("billingAccountId", billingAccountId); errMsg = UtilProperties.getMessage(resource_error, "checkevents.not_enough_available_on_account", messageMap, (cart != null ? cart.getLocale() : Locale.getDefault())); return ServiceUtil.returnError(errMsg); } // payment by billing account only requires more checking - List paymentMethods = cart.getPaymentMethodIds(); - List paymentTypes = cart.getPaymentMethodTypeIds(); + List<String> paymentMethods = cart.getPaymentMethodIds(); + List<String> paymentTypes = cart.getPaymentMethodTypeIds(); if (paymentTypes.contains("EXT_BILLACT") && paymentTypes.size() == 1 && paymentMethods.size() == 0) { if (cart.getGrandTotal().compareTo(availableAmount) > 0) { errMsg = UtilProperties.getMessage(resource_error, "checkevents.insufficient_credit_available_on_account", (cart != null ? cart.getLocale() : Locale.getDefault())); @@ -1481,19 +1488,19 @@ public class CheckOutHelper { // update the selected payment methods amount with valid numbers if (paymentMethods != null) { - List nullPaymentIds = new ArrayList(); - Iterator i = paymentMethods.iterator(); + List<String> nullPaymentIds = new ArrayList<String>(); + Iterator<String> i = paymentMethods.iterator(); while (i.hasNext()) { - String paymentMethodId = (String) i.next(); + String paymentMethodId = i.next(); BigDecimal paymentAmount = cart.getPaymentAmount(paymentMethodId); if (paymentAmount == null || paymentAmount.compareTo(BigDecimal.ZERO) == 0) { if (Debug.verboseOn()) Debug.logVerbose("Found null paymentMethodId - " + paymentMethodId, module); nullPaymentIds.add(paymentMethodId); } } - Iterator npi = nullPaymentIds.iterator(); + Iterator<String> npi = nullPaymentIds.iterator(); while (npi.hasNext()) { - String paymentMethodId = (String) npi.next(); + String paymentMethodId = npi.next(); BigDecimal selectedPaymentTotal = cart.getPaymentTotal(); BigDecimal requiredAmount = cart.getGrandTotal(); BigDecimal newAmount = requiredAmount.subtract(selectedPaymentTotal); @@ -1534,7 +1541,7 @@ public class CheckOutHelper { return ServiceUtil.returnError(errMsg); } else { int cashIndex = paymentTypes.indexOf("CASH"); - String cashId = (String) paymentTypes.get(cashIndex); + String cashId = paymentTypes.get(cashIndex); BigDecimal cashAmount = cart.getPaymentAmount(cashId); if (cashAmount.compareTo(changeAmount) < 0) { Debug.logError("Change Amount : " + changeAmount + " / Cash Amount : " + cashAmount, module); @@ -1559,13 +1566,13 @@ public class CheckOutHelper { String balanceField = null; // get the gift card objects to check - Iterator i = cart.getGiftCards().iterator(); + Iterator<GenericValue> i = cart.getGiftCards().iterator(); while (i.hasNext()) { - GenericValue gc = (GenericValue) i.next(); - Map gcBalanceMap = null; + GenericValue gc = i.next(); + Map<String, Object> gcBalanceMap = null; BigDecimal gcBalance = BigDecimal.ZERO; try { - Map ctx = UtilMisc.toMap("userLogin", cart.getUserLogin()); + Map<String, Object> ctx = UtilMisc.<String, Object>toMap("userLogin", cart.getUserLogin()); ctx.put("currency", cart.getCurrency()); if ("ofbiz".equalsIgnoreCase(giftCardType)) { balanceField = "balance"; Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Wed Aug 11 13:22:40 2010 @@ -1755,7 +1755,7 @@ public class ShoppingCart implements Ite } /** Returns the Payment Method Ids */ - public List getPaymentMethodIds() { + public List<String> getPaymentMethodIds() { List pmi = new LinkedList(); Iterator i = paymentInfo.iterator(); while (i.hasNext()) { @@ -1768,7 +1768,7 @@ public class ShoppingCart implements Ite } /** Returns the Payment Method Ids */ - public List getPaymentMethodTypeIds() { + public List<String> getPaymentMethodTypeIds() { List pmt = FastList.newInstance(); Iterator i = paymentInfo.iterator(); while (i.hasNext()) { @@ -1781,7 +1781,7 @@ public class ShoppingCart implements Ite } /** Returns a list of PaymentMethod value objects selected in the cart */ - public List getPaymentMethods() { + public List<GenericValue> getPaymentMethods() { List methods = FastList.newInstance(); if (UtilValidate.isNotEmpty(paymentInfo)) { Iterator paymentMethodIdIter = getPaymentMethodIds().iterator(); @@ -1842,7 +1842,7 @@ public class ShoppingCart implements Ite return creditCards; } - public List getGiftCards() { + public List<GenericValue> getGiftCards() { List paymentMethods = this.getPaymentMethods(); List giftCards = new LinkedList(); if (paymentMethods != null) { @@ -4007,7 +4007,7 @@ public class ShoppingCart implements Ite } /** Returns a Map of cart values to pass to the storeOrder service */ - public Map makeCartMap(LocalDispatcher dispatcher, boolean explodeItems) { + public Map<String, Object> makeCartMap(LocalDispatcher dispatcher, boolean explodeItems) { Map result = new HashMap(); result.put("orderTypeId", this.getOrderType()); @@ -4996,4 +4996,4 @@ public class ShoppingCart implements Ite } return minQuantity; } -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java Wed Aug 11 13:22:40 2010 @@ -50,7 +50,6 @@ import org.ofbiz.product.config.ProductC import org.ofbiz.product.config.ProductConfigWrapper; import org.ofbiz.product.product.ProductWorker; import org.ofbiz.security.Security; -import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ModelService; import org.ofbiz.service.ServiceUtil; Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Wed Aug 11 13:22:40 2010 @@ -324,7 +324,7 @@ public class ShoppingCartItem implements // first see if there is a purchase allow category and if this product is in it or not String purchaseProductCategoryId = CatalogWorker.getCatalogPurchaseAllowCategoryId(delegator, prodCatalogId); - if (product != null && purchaseProductCategoryId != null) { + if (!skipProductChecks.booleanValue() && product != null && purchaseProductCategoryId != null) { if (!CategoryWorker.isProductInCategory(delegator, product.getString("productId"), purchaseProductCategoryId)) { // a Purchase allow productCategoryId was found, but the product is not in the category, axe it... Debug.logWarning("Product [" + productId + "] is not in the purchase allow category [" + purchaseProductCategoryId + "] and cannot be purchased", module); Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java Wed Aug 11 13:22:40 2010 @@ -332,6 +332,7 @@ public class ShoppingCartServices { cartShipInfo.setFacilityId(orderItemShipGroup.getString("facilityId")); cartShipInfo.setVendorPartyId(orderItemShipGroup.getString("vendorPartyId")); cartShipInfo.setShipGroupSeqId(orderItemShipGroup.getString("shipGroupSeqId")); + cartShipInfo.shipTaxAdj.addAll(orh.getOrderHeaderAdjustmentsTax(orderItemShipGroup.getString("shipGroupSeqId"))); } List<GenericValue> orderItems = orh.getValidOrderItems(); @@ -538,6 +539,9 @@ public class ShoppingCartServices { List<GenericValue> itemAdjustments = orh.getOrderItemAdjustments(item); if (itemAdjustments != null) { for(GenericValue itemAdjustment : itemAdjustments) { + if ("SALES_TAX".equals(itemAdjustment.get("orderAdjustmentTypeId"))) { + continue; + } cartItem.addAdjustment(itemAdjustment); } } @@ -548,6 +552,7 @@ public class ShoppingCartServices { int itemIndex = 0; for (GenericValue item : orderItems) { + List<GenericValue> orderItemAdjustments = orh.getOrderItemAdjustments(item); // set the item's ship group info List<GenericValue> shipGroupAssocs = orh.getOrderItemShipGroupAssocs(item); for (int g = 0; g < shipGroupAssocs.size(); g++) { @@ -566,6 +571,16 @@ public class ShoppingCartServices { } cart.setItemShipGroupQty(itemIndex, shipGroupQty, cartShipGroupIndex); + + List<GenericValue> shipGroupItemAdjustments = EntityUtil.filterByAnd(orderItemAdjustments, UtilMisc.toMap("shipGroupSeqId", cartShipGroupIndexStr)); + ShoppingCart.CartShipInfo csi = cart.getShipInfo(cartShipGroupIndex); + List itemTaxAdj = csi.getShipItemInfo(cart.findCartItem(itemIndex)).itemTaxAdj; + for(GenericValue shipGroupItemAdjustment : shipGroupItemAdjustments) { + if ("SALES_TAX".equals(shipGroupItemAdjustment.get("orderAdjustmentTypeId"))) { + itemTaxAdj.add(shipGroupItemAdjustment); + continue; + } + } } itemIndex ++; } Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEstimateWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEstimateWrapper.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEstimateWrapper.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEstimateWrapper.java Wed Aug 11 13:22:40 2010 @@ -19,8 +19,6 @@ package org.ofbiz.order.shoppingcart.shipping; import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Iterator; import java.util.List; import java.util.Map; Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java Wed Aug 11 13:22:40 2010 @@ -23,37 +23,30 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilMisc; -import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.UtilProperties; +import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityConditionList; -import org.ofbiz.entity.condition.EntityExpr; import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.order.order.OrderReadHelper; import org.ofbiz.order.shoppingcart.ShoppingCart; +import org.ofbiz.order.shoppingcart.product.ProductPromoWorker; import org.ofbiz.product.store.ProductStoreWorker; import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ModelService; import org.ofbiz.service.ServiceUtil; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.ofbiz.order.shoppingcart.product.ProductPromoWorker; - /** * ShippingEvents - Events used for processing shipping fees */ Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java Wed Aug 11 13:22:40 2010 @@ -18,45 +18,43 @@ *******************************************************************************/ package org.ofbiz.order.shoppinglist; -import java.util.Map; -import java.util.List; -import java.util.Locale; -import java.util.Iterator; -import java.util.HashMap; import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; -import org.ofbiz.service.DispatchContext; -import org.ofbiz.service.ServiceUtil; -import org.ofbiz.service.LocalDispatcher; -import org.ofbiz.service.GenericServiceException; -import org.ofbiz.service.calendar.RecurrenceInfo; -import org.ofbiz.service.calendar.RecurrenceInfoException; -import org.ofbiz.order.shoppingcart.ShoppingCart; -import org.ofbiz.order.shoppingcart.CartItemModifyException; -import org.ofbiz.order.shoppingcart.ItemNotFoundException; -import org.ofbiz.order.shoppingcart.CheckOutHelper; -import org.ofbiz.order.order.OrderReadHelper; +import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.GeneralException; +import org.ofbiz.base.util.UtilDateTime; +import org.ofbiz.base.util.UtilMisc; +import org.ofbiz.base.util.UtilProperties; +import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; -import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.GenericEntityException; -import org.ofbiz.entity.condition.EntityExpr; -import org.ofbiz.entity.condition.EntityOperator; +import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.condition.EntityCondition; -import org.ofbiz.entity.condition.EntityConditionList; +import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.entity.transaction.TransactionUtil; import org.ofbiz.entity.util.EntityListIterator; import org.ofbiz.entity.util.EntityUtil; -import org.ofbiz.base.util.UtilMisc; -import org.ofbiz.base.util.Debug; -import org.ofbiz.base.util.UtilValidate; -import org.ofbiz.base.util.UtilDateTime; -import org.ofbiz.base.util.GeneralException; -import org.ofbiz.base.util.UtilProperties; +import org.ofbiz.order.order.OrderReadHelper; +import org.ofbiz.order.shoppingcart.CartItemModifyException; +import org.ofbiz.order.shoppingcart.CheckOutHelper; +import org.ofbiz.order.shoppingcart.ItemNotFoundException; +import org.ofbiz.order.shoppingcart.ShoppingCart; import org.ofbiz.product.config.ProductConfigWorker; import org.ofbiz.product.config.ProductConfigWrapper; import org.ofbiz.product.product.ProductWorker; import org.ofbiz.product.store.ProductStoreWorker; +import org.ofbiz.service.DispatchContext; +import org.ofbiz.service.GenericServiceException; +import org.ofbiz.service.LocalDispatcher; +import org.ofbiz.service.ServiceUtil; +import org.ofbiz.service.calendar.RecurrenceInfo; +import org.ofbiz.service.calendar.RecurrenceInfoException; /** * Shopping List Services Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java Wed Aug 11 13:22:40 2010 @@ -98,4 +98,4 @@ public class PurchaseOrderTest extends O assertNotNull(orderId); assertNotNull(statusId); } -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java Wed Aug 11 13:22:40 2010 @@ -140,4 +140,4 @@ public class SalesOrderTest extends OFBi assertNotNull(orderId); assertNotNull(statusId); } -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java Wed Aug 11 13:22:40 2010 @@ -230,4 +230,4 @@ public class ExpressCheckoutEvents { return CheckoutType.NONE; } -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java Wed Aug 11 13:22:40 2010 @@ -21,7 +21,6 @@ package org.ofbiz.order.thirdparty.zipsa import java.math.BigDecimal; import java.net.URL; import java.sql.Timestamp; -import java.text.DecimalFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; Modified: ofbiz/branches/jquery/applications/order/testdef/CustRequestTests.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/testdef/CustRequestTests.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/testdef/CustRequestTests.xml (original) +++ ofbiz/branches/jquery/applications/order/testdef/CustRequestTests.xml Wed Aug 11 13:22:40 2010 @@ -25,4 +25,4 @@ under the License. <test-case case-name="custrequest-tests"> <simple-method-test location="component://order/script/org/ofbiz/order/test/CustRequestTests.xml"/> </test-case> -</test-suite> \ No newline at end of file +</test-suite> Modified: ofbiz/branches/jquery/applications/order/testdef/ShoppingListTests.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/testdef/ShoppingListTests.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/testdef/ShoppingListTests.xml (original) +++ ofbiz/branches/jquery/applications/order/testdef/ShoppingListTests.xml Wed Aug 11 13:22:40 2010 @@ -29,4 +29,4 @@ under the License. <test-case case-name="shoppingList-test"> <simple-method-test location="component://order/script/org/ofbiz/order/test/ShoppingListTests.xml"/> </test-case> -</test-suite> \ No newline at end of file +</test-suite> Modified: ofbiz/branches/jquery/applications/order/testdef/data/QuoteTestData.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/testdef/data/QuoteTestData.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/testdef/data/QuoteTestData.xml (original) +++ ofbiz/branches/jquery/applications/order/testdef/data/QuoteTestData.xml Wed Aug 11 13:22:40 2010 @@ -21,4 +21,4 @@ under the License. <entity-engine-xml> <Quote quoteId="9000" quoteTypeId="PRODUCT_QUOTE" partyId="DemoCustomer" issueDate="2009-12-11 12:00:00.000" statusId="QUO_CREATED" currencyUomId="USD" productStoreId="9000" salesChannelEnumId="EMAIL_SALES_CHANNEL" validFromDate="2009-12-11 12:00:00.000" quoteName="Most competitive quote ever"/> <WorkEffort workEffortId="9007" workEffortTypeId="TASK" currentStatusId="PTS_CREATED" workEffortName="Quote WorkEffort"/> -</entity-engine-xml> \ No newline at end of file +</entity-engine-xml> Modified: ofbiz/branches/jquery/applications/order/testdef/data/ShoppingListTestData.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/testdef/data/ShoppingListTestData.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/testdef/data/ShoppingListTestData.xml (original) +++ ofbiz/branches/jquery/applications/order/testdef/data/ShoppingListTestData.xml Wed Aug 11 13:22:40 2010 @@ -23,4 +23,4 @@ under the License. <ShoppingListItem shoppingListId="DemoWishList" shoppingListItemSeqId="00001" productId="GZ-2644" quantity="5" productStoreId="9000"/> <ShoppingListItem shoppingListId="DemoWishList" shoppingListItemSeqId="00002" productId="WG-1111" quantity="2" productStoreId="9000"/> <ShoppingListItem shoppingListId="DemoWishList" shoppingListItemSeqId="00003" productId="WG-5569" quantity="10" productStoreId="9000"/> -</entity-engine-xml> \ No newline at end of file +</entity-engine-xml> Modified: ofbiz/branches/jquery/applications/order/testdef/quotetests.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/testdef/quotetests.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/testdef/quotetests.xml (original) +++ ofbiz/branches/jquery/applications/order/testdef/quotetests.xml Wed Aug 11 13:22:40 2010 @@ -29,4 +29,4 @@ under the License. <test-case case-name="quote-tests"> <simple-method-test location="component://order/script/org/ofbiz/order/test/QuoteTests.xml"/> </test-case> -</test-suite> \ No newline at end of file +</test-suite> |
| Free forum by Nabble | Edit this page |
