From: Si C. <si...@ea...> - 2008-03-04 01:13:43
|
Author: sichen Date: 2008-03-03 17:13:49 -0800 (Mon, 03 Mar 2008) New Revision: 7930 Modified: versions/1.0/trunk/hot-deploy/opentaps-tests/data/setup/TestingSetup.xml versions/1.0/trunk/hot-deploy/opentaps-tests/src/org/opentaps/tests/purchasing/MrpTests.java Log: fix this mrp unit test to use retail store, and add set up data to get that part to work. I don't think the purchase order factory works yet so this test fails still. Modified: versions/1.0/trunk/hot-deploy/opentaps-tests/data/setup/TestingSetup.xml =================================================================== --- versions/1.0/trunk/hot-deploy/opentaps-tests/data/setup/TestingSetup.xml 2008-03-03 23:01:49 UTC (rev 7929) +++ versions/1.0/trunk/hot-deploy/opentaps-tests/data/setup/TestingSetup.xml 2008-03-04 01:13:49 UTC (rev 7930) @@ -23,6 +23,7 @@ <!-- Minimal setup for CompanySub1 to enable an inventory transfer --> <GlAccountOrganization glAccountId="140000" organizationPartyId="CompanySub1" fromDate="2000-01-01 00:00:00"/> + <GlAccountOrganization glAccountId="214000" organizationPartyId="CompanySub1" fromDate="2000-01-01 00:00:00"/> <GlAccountOrganization glAccountId="215000" organizationPartyId="CompanySub1" fromDate="2000-01-01 00:00:00"/> <!-- Must have this or the getIncomeStatementByDates will fail for not finding PROFIT_LOSS_ACCOUNT for CompanySub1 --> <!-- GlAccountOrganization glAccountId="801000" organizationPartyId="CompanySub1" fromDate="2000-01-01 00:00:00"/ --> @@ -33,7 +34,8 @@ <GlAccountTypeDefault glAccountTypeId="INVENTORY_ACCOUNT" organizationPartyId="CompanySub1" glAccountId="140000" /> <GlAccountTypeDefault glAccountTypeId="INVENTORY_XFER_IN" organizationPartyId="CompanySub1" glAccountId="215000" /> - + <GlAccountTypeDefault glAccountTypeId="UNINVOICED_SHIP_RCPT" organizationPartyId="CompanySub1" glAccountId="214000" /> + <!-- Must have this or the getIncomeStatementByDates will fail for not finding PROFIT_LOSS_ACCOUNT for CompanySub1 --> <!-- GlAccountTypeDefault glAccountTypeId="PROFIT_LOSS_ACCOUNT" organizationPartyId="CompanySub1" glAccountId="801000" / --> <!-- Income/Loss from Business --> <GlAccountTypeDefault glAccountTypeId="RETAINED_EARNINGS" organizationPartyId="CompanySub1" glAccountId="336000" /> <!-- Retained Earnings --> Modified: versions/1.0/trunk/hot-deploy/opentaps-tests/src/org/opentaps/tests/purchasing/MrpTests.java =================================================================== --- versions/1.0/trunk/hot-deploy/opentaps-tests/src/org/opentaps/tests/purchasing/MrpTests.java 2008-03-03 23:01:49 UTC (rev 7929) +++ versions/1.0/trunk/hot-deploy/opentaps-tests/src/org/opentaps/tests/purchasing/MrpTests.java 2008-03-04 01:13:49 UTC (rev 7930) @@ -49,6 +49,7 @@ static final String organizationPartyId = "Company"; static final String productStoreId = "9000"; static final String facilityId = "WebStoreWarehouse"; + static final String retailStoreFacilityId = "MyRetailStore"; static final String thirdPartyFacilityId = "Demo3PL"; @Override @@ -410,12 +411,13 @@ Map productFacilityContext = UtilMisc.toMap("userLogin", admin, "productId", productId, "facilityId", facilityId, "minimumStock", new Double(0.0), "reorderQuantity", new Double(25.0), "daysToShip", new Long(1)); runAndAssertServiceSuccess("createProductFacility", productFacilityContext); - // 3. Receive 100 units of this product at $5 into Demo3PL warehouse - Map<String, String> result = receiveInventoryProduct(testProduct, 100.0, "NON_SERIAL_INV_ITEM", 1.0, thirdPartyFacilityId, demowarehouse1); + // 3. Receive 100 units of this product at $5 into MyRetailWarehouse warehouse + Map<String, String> result = receiveInventoryProduct(testProduct, 100.0, "NON_SERIAL_INV_ITEM", 1.0, retailStoreFacilityId, demowarehouse1); String inventoryItemId = (String) result.get("inventoryItemId"); // 4. Create an inventory transfer from Demo3PL to WebStoreWarehouse for 50 units of this product - Map transferContext = UtilMisc.toMap("facilityId", thirdPartyFacilityId, "facilityIdTo", facilityId, "inventoryItemId", inventoryItemId, "xferQty", new Double(50.0), "statusId", "IXF_REQUESTED", "userLogin", demowarehouse1); + Map transferContext = UtilMisc.toMap("facilityId", retailStoreFacilityId, "facilityIdTo", facilityId, "inventoryItemId", inventoryItemId, "xferQty", new Double(50.0), "statusId", "IXF_REQUESTED", "userLogin", demowarehouse1); + transferContext.put("sendDate", UtilDateTime.nowTimestamp()); result = runAndAssertServiceSuccess("createInventoryTransfer", transferContext); String inventoryTransferId = (String) result.get("inventoryTransferId"); |