Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java?rev=757091&r1=757090&r2=757091&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java Sat Mar 21 23:44:41 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -33,7 +33,7 @@ import javolution.util.FastList; public class PurchaseOrderTest extends TestCase { - + protected LocalDispatcher dispatcher = null; protected GenericDelegator delegator = null; protected GenericValue userLogin = null; @@ -43,16 +43,16 @@ public PurchaseOrderTest(String name) { super(name); } - + protected void setUp() throws Exception { delegator = GenericDelegator.getGenericDelegator("test"); dispatcher = GenericDispatcher.getLocalDispatcher("test-dispatcher", delegator); userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system")); - } - + } + protected void tearDown() throws Exception { } - + public void testCreatePurchaseOrder() throws Exception { Map <String, Object> ctx = FastMap.newInstance(); ctx.put("partyId", "Company"); @@ -68,29 +68,29 @@ List <GenericValue> orderItems = FastList.newInstance(); orderItems.add(orderItem); ctx.put("orderItems", orderItems); - + GenericValue orderContactMech = delegator.makeValue("OrderContactMech", UtilMisc.toMap("contactMechPurposeTypeId", "SHIPPING_LOCATION", "contactMechId", "9000")); List <GenericValue> orderContactMechs = FastList.newInstance(); orderContactMechs.add(orderContactMech); ctx.put("orderContactMechs", orderContactMechs); - + GenericValue orderItemContactMech = delegator.makeValue("OrderItemContactMech", UtilMisc.toMap("contactMechPurposeTypeId", "SHIPPING_LOCATION", "contactMechId", "9000", "orderItemSeqId", "00001")); List <GenericValue> orderItemContactMechs = FastList.newInstance(); orderItemContactMechs.add(orderItemContactMech); ctx.put("orderItemContactMechs", orderItemContactMechs); - + GenericValue orderItemShipGroup = delegator.makeValue("OrderItemShipGroup", UtilMisc.toMap("carrierPartyId", "UPS", "contactMechId", "9000", "isGift", "N", "maySplit", "N", "shipGroupSeqId", "00001", "shipmentMethodTypeId", "NEXT_DAY")); orderItemShipGroup.set("carrierRoleTypeId","CARRIER"); List <GenericValue> orderItemShipGroupInfo = FastList.newInstance(); orderItemShipGroupInfo.add(orderItemShipGroup); ctx.put("orderItemShipGroupInfo", orderItemShipGroupInfo); - + List <GenericValue> orderTerms = FastList.newInstance(); ctx.put("orderTerms", orderTerms); - + List <GenericValue> orderAdjustments = FastList.newInstance(); ctx.put("orderAdjustments", orderAdjustments); - + ctx.put("billToCustomerPartyId", "Company"); ctx.put("billFromVendorPartyId", "DemoSupplier"); ctx.put("shipFromVendorPartyId", "Company"); Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java?rev=757091&r1=757090&r2=757091&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java Sat Mar 21 23:44:41 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -52,31 +52,31 @@ public void testCreateSalesOrder() throws Exception { Map ctx = UtilMisc.toMap("partyId", "DemoCustomer", "orderTypeId", "SALES_ORDER", "currencyUom", "USD", "productStoreId", "9000"); - + List orderPaymentInfo = new ArrayList(); GenericValue orderContactMech = delegator.makeValue("OrderContactMech", UtilMisc.toMap("contactMechId", "9015", "contactMechPurposeTypeId", "BILLING_LOCATION")); orderPaymentInfo.add(orderContactMech); - + GenericValue orderPaymentPreference = delegator.makeValue("OrderPaymentPreference", UtilMisc.toMap("paymentMethodId", "9015", "paymentMethodTypeId", "CREDIT_CARD", "statusId", "PAYMENT_NOT_AUTH", "overflowFlag", "N", "maxAmount", new BigDecimal("49.26"))); orderPaymentInfo.add(orderPaymentPreference); ctx.put("orderPaymentInfo", orderPaymentInfo); - + List orderItemShipGroupInfo = new ArrayList(); orderContactMech.set("contactMechPurposeTypeId", "SHIPPING_LOCATION"); orderItemShipGroupInfo.add(orderContactMech); - + GenericValue orderItemShipGroup = delegator.makeValue("OrderItemShipGroup", UtilMisc.toMap("carrierPartyId", "UPS", "contactMechId", "9015", "isGift", "N", "shipGroupSeqId", "00001", "shipmentMethodTypeId", "NEXT_DAY")); orderItemShipGroupInfo.add(orderItemShipGroup); - + GenericValue orderItemShipGroupAssoc = delegator.makeValue("OrderItemShipGroupAssoc", UtilMisc.toMap("orderItemSeqId", "00001", "quantity", BigDecimal.ONE, "shipGroupSeqId", "00001")); orderItemShipGroupInfo.add(orderItemShipGroupAssoc); - + GenericValue orderAdjustment = null; orderAdjustment = delegator.makeValue("OrderAdjustment", UtilMisc.toMap("orderAdjustmentTypeId", "SHIPPING_CHARGES", "shipGroupSeqId", "00001", "amount", new BigDecimal("12.45"))); orderItemShipGroupInfo.add(orderAdjustment); - + orderAdjustment = delegator.makeValue("OrderAdjustment", UtilMisc.toMap("orderAdjustmentTypeId", "SALES_TAX", "orderItemSeqId", "00001", "overrideGlAccountId", "224153", "primaryGeoId", "UT", "shipGroupSeqId", "00001", "sourcePercentage", new BigDecimal(4.7))); orderAdjustment.set("taxAuthGeoId", "UT"); @@ -85,7 +85,7 @@ orderAdjustment.set("amount", new BigDecimal(1.824)); orderAdjustment.set("comments", "Utah State Sales Tax"); orderItemShipGroupInfo.add(orderAdjustment); - + orderAdjustment = delegator.makeValue("OrderAdjustment", UtilMisc.toMap("orderAdjustmentTypeId", "SALES_TAX", "orderItemSeqId", "00001", "overrideGlAccountId", "224153", "primaryGeoId", "UT-UTAH", "shipGroupSeqId", "00001", "sourcePercentage", new BigDecimal(0.1))); orderAdjustment.set("taxAuthGeoId", "UT-UTAH"); @@ -103,9 +103,9 @@ orderAdjustment.set("amount", new BigDecimal(0.384)); orderAdjustment.set("comments", "1% OFB _NA_ Tax"); orderItemShipGroupInfo.add(orderAdjustment); - + ctx.put("orderItemShipGroupInfo", orderItemShipGroupInfo); - + List orderAdjustments = new ArrayList(); orderAdjustment = delegator.makeValue("OrderAdjustment", UtilMisc.toMap("orderAdjustmentTypeId", "PROMOTION_ADJUSTMENT", "productPromoActionSeqId", "01", "productPromoId", "9011", "productPromoRuleId", "01", "amount", new BigDecimal(-3.84))); orderAdjustments.add(orderAdjustment); @@ -118,10 +118,10 @@ orderItem.set("unitPrice", new BigDecimal("38.4")); orderItem.set("unitListPrice", new BigDecimal("48.0")); orderItem.set("statusId", "ITEM_CREATED"); - + orderItems.add(orderItem); ctx.put("orderItems", orderItems); - + List orderTerms = new ArrayList(); ctx.put("orderTerms", orderTerms); @@ -130,13 +130,13 @@ OrderContactMech.set("contactMechId", "10000"); List orderContactMechs = new ArrayList(); orderContactMechs.add(OrderContactMech); - + ctx.put("placingCustomerPartyId", "DemoCustomer"); ctx.put("endUserCustomerPartyId", "DemoCustomer"); ctx.put("shipToCustomerPartyId", "DemoCustomer"); ctx.put("billToCustomerPartyId", "DemoCustomer"); ctx.put("billFromVendorPartyId", "Company"); - + ctx.put("userLogin", userLogin); Map resp = dispatcher.runSync("storeOrder", ctx); String orderId = (String) resp.get("orderId"); Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareException.java?rev=757091&r1=757090&r2=757091&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareException.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareException.java Sat Mar 21 23:44:41 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareServices.java?rev=757091&r1=757090&r2=757091&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareServices.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareServices.java Sat Mar 21 23:44:41 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareUTL.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareUTL.java?rev=757091&r1=757090&r2=757091&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareUTL.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/taxware/TaxwareUTL.java Sat Mar 21 23:44:41 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java?rev=757091&r1=757090&r2=757091&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java Sat Mar 21 23:44:41 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
Free forum by Nabble | Edit this page |