This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "opentaps Open Source ERP CRM".
The branch, upgrade-1.5 has been updated
via 31aa0c1f1368a032199132dbba61e5bb1ff3a6ba (commit)
via 6167949b8a06734a97a7f929e87d3166b032666a (commit)
via fdb29a934e2a289046c2429d09bf28e5120e7327 (commit)
via 26e9a75782516d4b76567147eb60629d34c3d11a (commit)
via dbc6f06d46d5963779ea5251eeea4b1376a6f16c (commit)
from d4c6940dbdb372dcedcd6ae74d4d1016c32693be (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 31aa0c1f1368a032199132dbba61e5bb1ff3a6ba
Merge: 26e9a75 6167949
Author: Jeremy Wickersheimer <jwickers@...>
Date: Wed Oct 20 12:52:13 2010 +0800
Merge branch 'upgrade-1.5' of git://gitorious.org/~varunia/opentaps/varunia-opentaps-upgrade-15 into upgrade-1.5
commit 6167949b8a06734a97a7f929e87d3166b032666a
Author: varun.bhansaly <varun.bhansaly@...>
Date: Wed Oct 20 10:06:51 2010 +0530
reverting changes.
diff --git a/opentaps/crmsfa/src/com/opensourcestrategies/crmsfa/returns/ReturnServices.java b/opentaps/crmsfa/src/com/opensourcestrategies/crmsfa/returns/ReturnServices.java
index 22dd0c5..3af92fa 100644
--- a/opentaps/crmsfa/src/com/opensourcestrategies/crmsfa/returns/ReturnServices.java
+++ b/opentaps/crmsfa/src/com/opensourcestrategies/crmsfa/returns/ReturnServices.java
@@ -246,12 +246,11 @@ public final class ReturnServices {
}
BigDecimal unitCost = (BigDecimal) serviceResult.get("initialItemCost");
-// long serializedInvItems = delegator.findCountByAnd("InventoryItem", UtilMisc.toMap("productId", productId, "facilityId", destinationFacility.get("facilityId"), "inventoryItemTypeId", "SERIALIZED_INV_ITEM"));
-// boolean nonSerialized = serializedInvItems == 0 && "NON_SERIAL_INV_ITEM".equals(destinationFacility.getString("defaultInventoryItemTypeId"));
+ long serializedInvItems = delegator.findCountByAnd("InventoryItem", UtilMisc.toMap("productId", productId, "facilityId", destinationFacility.get("facilityId"), "inventoryItemTypeId", "SERIALIZED_INV_ITEM"));
+ boolean nonSerialized = serializedInvItems == 0 && "NON_SERIAL_INV_ITEM".equals(destinationFacility.getString("defaultInventoryItemTypeId"));
Map<String, Object> receiveContext = UtilMisc.<String, Object>toMap("userLogin", userLogin, "productId", productId, "returnId", returnId, "returnItemSeqId", returnItem.get("returnItemSeqId"));
-// receiveContext.put("inventoryItemTypeId", nonSerialized ? "NON_SERIAL_INV_ITEM" : "SERIALIZED_INV_ITEM");
- receiveContext.put("inventoryItemTypeId", "SERIALIZED_INV_ITEM");
+ receiveContext.put("inventoryItemTypeId", nonSerialized ? "NON_SERIAL_INV_ITEM" : "SERIALIZED_INV_ITEM");
receiveContext.put("statusId", UtilValidate.isEmpty(returnItem.getString("expectedItemStatus")) ? "INV_RETURNED" : UtilValidate.isEmpty(returnItem.getString("expectedItemStatus")));
receiveContext.put("facilityId", destinationFacility.get("facilityId"));
receiveContext.put("shipmentId", shipmentId);
@@ -260,15 +259,15 @@ public final class ReturnServices {
receiveContext.put("comments", "Returned Item RA# " + returnId);
receiveContext.put("unitCost", unitCost);
-// if (nonSerialized) {
-//
-// // Receive once for the full quantity
-// receiveContext.put("quantityAccepted", returnItem.getBigDecimal("returnQuantity"));
-// serviceResult = dispatcher.runSync("receiveInventoryProduct", receiveContext);
-// if (ServiceUtil.isError(serviceResult)) {
-// return serviceResult;
-// }
-// } else {
+ if (nonSerialized) {
+
+ // Receive once for the full quantity
+ receiveContext.put("quantityAccepted", returnItem.getBigDecimal("returnQuantity"));
+ serviceResult = dispatcher.runSync("receiveInventoryProduct", receiveContext);
+ if (ServiceUtil.isError(serviceResult)) {
+ return serviceResult;
+ }
+ } else {
// Receive with quantity 1 until the full quantity is received
receiveContext.put("quantityAccepted", BigDecimal.ONE);
@@ -279,7 +278,7 @@ public final class ReturnServices {
}
}
}
-// }
+ }
}
returnHeader.refresh();
diff --git a/opentaps/opentaps-tests/src/org/opentaps/tests/crmsfa/orders/ReturnTests.java b/opentaps/opentaps-tests/src/org/opentaps/tests/crmsfa/orders/ReturnTests.java
index 59ee79e..4e65c0e 100644
--- a/opentaps/opentaps-tests/src/org/opentaps/tests/crmsfa/orders/ReturnTests.java
+++ b/opentaps/opentaps-tests/src/org/opentaps/tests/crmsfa/orders/ReturnTests.java
@@ -176,10 +176,10 @@ public class ReturnTests extends ReturnTestCase {
assertReturnItemsStatusEquals(returnId, "RETURN_COMPLETED");
// 9b. Verify that the inventory of the item has increased by 2.0
-// assertProductAvailability(testProduct, new BigDecimal("7.0"), new BigDecimal("7.0"));
+ assertProductAvailability(testProduct, new BigDecimal("7.0"), new BigDecimal("7.0"));
// check the InventoryItem entity
-// List<GenericValue> inventoryItems = delegator.findByAnd("InventoryItem", UtilMisc.<String, Object>toMap("productId", productId, "statusId", "INV_RETURNED", "quantityOnHandTotal", 2, "availableToPromiseTotal", 2));
-// assertEquals("InventoryItem INV_RETURNED for product [" + productId + "]", 1, inventoryItems.size());
+ List<GenericValue> inventoryItems = delegator.findByAnd("InventoryItem", UtilMisc.<String, Object>toMap("productId", productId, "statusId", "INV_RETURNED", "quantityOnHandTotal", 2, "availableToPromiseTotal", 2));
+ assertEquals("InventoryItem INV_RETURNED for product [" + productId + "]", 1, inventoryItems.size());
// 9c. Verify that a payment of the type CUSTOMER_REFUND from Company to DemoCustomer for the amount of the return in the status of PMNT_SENT has been created
// The amount should be 2x 100 + 5.76% tax = 211.7
@@ -291,17 +291,11 @@ public class ReturnTests extends ReturnTestCase {
// 9a. Verify that the return is RETURN_RECEIVED
assertReturnStatusEquals(returnId, "RETURN_RECEIVED");
-// In ofbiz 10.04, for every returned serial inventory
-// 1. a new row is created in InventoryItem entity,
-// 2. status is set to returned, QOH is updated to 1,
-// 3. ATP is not updated to 1
-// these cause test case to fail, commenting for now.
-
// 9b. Inventory of the item has increased by 2.0
-// assertProductAvailability(testProduct, new BigDecimal("7.0"), new BigDecimal("7.0"));
+ assertProductAvailability(testProduct, new BigDecimal("7.0"), new BigDecimal("7.0"));
// check the InventoryItem entity
-// List<GenericValue> inventoryItems = delegator.findByAnd("InventoryItem", UtilMisc.<String, Object>toMap("productId", productId, "statusId", "INV_RETURNED", "quantityOnHandTotal", 2, "availableToPromiseTotal", 2));
-// assertEquals("InventoryItem INV_RETURNED for product [" + productId + "]", 1, inventoryItems.size());
+ List<GenericValue> inventoryItems = delegator.findByAnd("InventoryItem", UtilMisc.<String, Object>toMap("productId", productId, "statusId", "INV_RETURNED", "quantityOnHandTotal", 2, "availableToPromiseTotal", 2));
+ assertEquals("InventoryItem INV_RETURNED for product [" + productId + "]", 1, inventoryItems.size());
// 9c. A payment of the type CUSTOMER_REFUND from Company to DemoCustomer for the amount of the return in the status of PMNT_NOT_PAID has been created
// The amount should be 2x 200 + 5.76% tax = 423.00
@@ -389,10 +383,10 @@ public class ReturnTests extends ReturnTestCase {
assertReturnStatusEquals(returnId, "RETURN_RECEIVED");
// 9b. Verify that the inventory of the item has increased by 2.0
-// assertProductAvailability(testProduct, new BigDecimal("7.0"), new BigDecimal("7.0"));
+ assertProductAvailability(testProduct, new BigDecimal("7.0"), new BigDecimal("7.0"));
// check the InventoryItem entity
-// List<GenericValue> inventoryItems = delegator.findByAnd("InventoryItem", UtilMisc.<String, Object>toMap("productId", productId, "statusId", "INV_RETURNED", "quantityOnHandTotal", 2, "availableToPromiseTotal", 2));
-// assertEquals("InventoryItem INV_RETURNED for product [" + productId + "]", 1, inventoryItems.size());
+ List<GenericValue> inventoryItems = delegator.findByAnd("InventoryItem", UtilMisc.<String, Object>toMap("productId", productId, "statusId", "INV_RETURNED", "quantityOnHandTotal", 2, "availableToPromiseTotal", 2));
+ assertEquals("InventoryItem INV_RETURNED for product [" + productId + "]", 1, inventoryItems.size());
// 9c. Verify that a payment of the type CUSTOMER_REFUND from Company to DemoCustomer for the amount of the return in the status of PMNT_NOT_PAID has been created
// Amount is 2x300 + 5.76% (35.10) tax = 635.10
commit fdb29a934e2a289046c2429d09bf28e5120e7327
Author: varun.bhansaly <varun.bhansaly@...>
Date: Wed Oct 20 10:04:30 2010 +0530
From ofbiz 10.04, status for Non serial inventory items cannot be set to INV_RETURNED (for returned inventory).
With this behavior lot of test cases fail, commenting we can avoid changes to opentaps test cases & services.
diff --git a/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml b/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
index 2276c66..f798d6d 100644
--- a/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
+++ b/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
@@ -98,8 +98,10 @@ under the License.
<check-errors/>
<!-- Status for Non serialized and Serialized inventory are different, lets make sure correct status is stored in database -->
+ <!--
<if-compare field="parameters.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
- <if-compare field="parameters.statusId" operator="equals" value="INV_DEFECTIVE"><!-- This status may come from the Receive Return Screen -->
+ <if-compare field="parameters.statusId" operator="equals" value="INV_DEFECTIVE"> --><!-- This status may come from the Receive Return Screen -->
+ <!--
<set field="parameters.statusId" value="INV_NS_DEFECTIVE"/>
<else>
<if-compare field="parameters.statusId" operator="equals" value="INV_ON_HOLD">
@@ -107,7 +109,9 @@ under the License.
</if-compare>
</else>
</if-compare>
+ -->
<!-- Any other status should be just set to null, if it is not a valid status for Non Serialized inventory -->
+ <!--
<if>
<condition>
<and>
@@ -120,7 +124,7 @@ under the License.
</then>
</if>
</if-compare>
-
+ -->
<loop count="${loops}" field="currentLoop">
<log level="info" message="receiveInventoryProduct Looping and creating inventory info - ${currentLoop}"/>
commit 26e9a75782516d4b76567147eb60629d34c3d11a
Merge: d4c6940 dbc6f06
Author: Jeremy Wickersheimer <jwickers@...>
Date: Tue Oct 19 23:01:40 2010 +0800
Merge branch 'upgrade-1.5' of git://gitorious.org/~varunia/opentaps/varunia-opentaps-upgrade-15 into upgrade-1.5
commit dbc6f06d46d5963779ea5251eeea4b1376a6f16c
Author: varun.bhansaly <varun.bhansaly@...>
Date: Tue Oct 19 19:18:31 2010 +0530
product Id "PROD_COST" used to be defined in specialpurpose/ecommerce/data/DemoStandardCosting.xml, ofbiz 10.04 onwards this has been replaced with "PROD_MANUF".
diff --git a/opentaps/opentaps-tests/src/org/opentaps/tests/warehouse/ProductionRunTestCase.java b/opentaps/opentaps-tests/src/org/opentaps/tests/warehouse/ProductionRunTestCase.java
index b705a59..eb8def1 100644
--- a/opentaps/opentaps-tests/src/org/opentaps/tests/warehouse/ProductionRunTestCase.java
+++ b/opentaps/opentaps-tests/src/org/opentaps/tests/warehouse/ProductionRunTestCase.java
@@ -78,7 +78,7 @@ public class ProductionRunTestCase extends FinancialsTestCase {
* @param inventoryAsserts an <code>InventoryAsserts</code> value
*/
protected void assertAllInventoryValuesEqual(InventoryAsserts inventoryAsserts) {
- inventoryAsserts.assertInventoryValuesEqual("PROD_COST");
+ inventoryAsserts.assertInventoryValuesEqual("PROD_MANUF");
inventoryAsserts.assertInventoryValuesEqual("MAT_A_COST");
inventoryAsserts.assertInventoryValuesEqual("MAT_B_COST");
}
@@ -167,10 +167,10 @@ public class ProductionRunTestCase extends FinancialsTestCase {
// receive quantity PROD_COST into the warehouse TODO why is it 2 * quantity?
final double prodCostUnitCost = 164.0;
- receiveMaterial("PROD_COST", 2 * quantity, prodCostUnitCost);
+ receiveMaterial("PROD_MANUF", 2 * quantity, prodCostUnitCost);
// create the disassembly and confirm it
- return createDisassembly(name, quantity, "PROD_COST");
+ return createDisassembly(name, quantity, "PROD_MANUF");
}
/**
@@ -381,7 +381,7 @@ public class ProductionRunTestCase extends FinancialsTestCase {
receiveMaterial("MAT_A_COST", matARequiredQty * quantity, matAUnitCost);
receiveMaterial("MAT_B_COST", matBRequiredQty * quantity, matBUnitCost);
- return createProductionRunAndConfirm(name, quantity, "PROD_COST");
+ return createProductionRunAndConfirm(name, quantity, "PROD_MANUF");
}
/**
diff --git a/opentaps/opentaps-tests/src/org/opentaps/tests/warehouse/ProductionRunTests.java b/opentaps/opentaps-tests/src/org/opentaps/tests/warehouse/ProductionRunTests.java
index 514fe72..6c92550 100644
--- a/opentaps/opentaps-tests/src/org/opentaps/tests/warehouse/ProductionRunTests.java
+++ b/opentaps/opentaps-tests/src/org/opentaps/tests/warehouse/ProductionRunTests.java
@@ -80,7 +80,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
Timestamp start = UtilDateTime.nowTimestamp();
// note the initial inventory quantities
- Map origProdCostInventory = inventoryAsserts.getInventory("PROD_COST");
+ Map origProdCostInventory = inventoryAsserts.getInventory("PROD_MANUF");
Map origMatACostInventory = inventoryAsserts.getInventory("MAT_A_COST");
Map origMatBCostInventory = inventoryAsserts.getInventory("MAT_B_COST");
assertAllInventoryValuesEqual(inventoryAsserts);
@@ -89,7 +89,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
Map initInvValues = FastMap.newInstance();
initInvValues.put("MAT_A_COST", inventoryAsserts.getInventoryValueForProduct("MAT_A_COST", start));
initInvValues.put("MAT_B_COST", inventoryAsserts.getInventoryValueForProduct("MAT_B_COST", start));
- initInvValues.put("PROD_COST", inventoryAsserts.getInventoryValueForProduct("PROD_COST", start));
+ initInvValues.put("PROD_MANUF", inventoryAsserts.getInventoryValueForProduct("PROD_MANUF", start));
// note the initial balances
Map initialBalances = financialAsserts.getFinancialBalances(start);
@@ -121,7 +121,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
assertTransactionEquivalence(transactions, UtilMisc.toList("MFGTEST-1", "MFGTEST-2", "MFGTEST-3"));
// make sure the inventory quantity changes are correct_
- inventoryAsserts.assertInventoryChange("PROD_COST", new BigDecimal("2.0"), origProdCostInventory);
+ inventoryAsserts.assertInventoryChange("PROD_MANUF", new BigDecimal("2.0"), origProdCostInventory);
inventoryAsserts.assertInventoryChange("MAT_A_COST", new BigDecimal("-4.0"), origMatACostInventory);
inventoryAsserts.assertInventoryChange("MAT_B_COST", new BigDecimal("-6.0"), origMatBCostInventory);
@@ -137,8 +137,8 @@ public class ProductionRunTests extends ProductionRunTestCase {
Map finalInvValues = FastMap.newInstance();
finalInvValues.put("MAT_A_COST", inventoryAsserts.getInventoryValueForProduct("MAT_A_COST", UtilDateTime.nowTimestamp()));
finalInvValues.put("MAT_B_COST", inventoryAsserts.getInventoryValueForProduct("MAT_B_COST", UtilDateTime.nowTimestamp()));
- finalInvValues.put("PROD_COST", inventoryAsserts.getInventoryValueForProduct("PROD_COST", UtilDateTime.nowTimestamp()));
- Map expectedInvValues = UtilMisc.toMap("MAT_A_COST", "-36", "MAT_B_COST", "-42", "PROD_COST", "328");
+ finalInvValues.put("PROD_MANUF", inventoryAsserts.getInventoryValueForProduct("PROD_MANUF", UtilDateTime.nowTimestamp()));
+ Map expectedInvValues = UtilMisc.toMap("MAT_A_COST", "-36", "MAT_B_COST", "-42", "PROD_MANUF", "328");
assertMapDifferenceCorrect(initInvValues, finalInvValues, expectedInvValues);
// verify that the difference in balances work out
@@ -164,11 +164,11 @@ public class ProductionRunTests extends ProductionRunTestCase {
Timestamp start = UtilDateTime.nowTimestamp();
// note the initial inventory quantity and values
- Map originalProdCostInventory = inventoryAsserts.getInventory("PROD_COST");
+ Map originalProdCostInventory = inventoryAsserts.getInventory("PROD_MANUF");
Map initInvValues = FastMap.newInstance();
initInvValues.put("MAT_A_COST", inventoryAsserts.getInventoryValueForProduct("MAT_A_COST", start));
initInvValues.put("MAT_B_COST", inventoryAsserts.getInventoryValueForProduct("MAT_B_COST", start));
- initInvValues.put("PROD_COST", inventoryAsserts.getInventoryValueForProduct("PROD_COST", start));
+ initInvValues.put("PROD_MANUF", inventoryAsserts.getInventoryValueForProduct("PROD_MANUF", start));
assertAllInventoryValuesEqual(inventoryAsserts);
// note the initial balances
@@ -234,7 +234,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
assertTransactionEquivalence(transactions, UtilMisc.toList("MFGTEST-1", "MFGTEST-2", "MFGTEST-3"));
// make sure the PROD_COST inventory went up by 2
- inventoryAsserts.assertInventoryChange("PROD_COST", new BigDecimal("2.0"), originalProdCostInventory);
+ inventoryAsserts.assertInventoryChange("PROD_MANUF", new BigDecimal("2.0"), originalProdCostInventory);
// make sure the ledger and inventory item costs are the same for all products involved
assertAllInventoryValuesEqual(inventoryAsserts);
@@ -248,8 +248,8 @@ public class ProductionRunTests extends ProductionRunTestCase {
Map finalInvValues = FastMap.newInstance();
finalInvValues.put("MAT_A_COST", inventoryAsserts.getInventoryValueForProduct("MAT_A_COST", UtilDateTime.nowTimestamp()));
finalInvValues.put("MAT_B_COST", inventoryAsserts.getInventoryValueForProduct("MAT_B_COST", UtilDateTime.nowTimestamp()));
- finalInvValues.put("PROD_COST", inventoryAsserts.getInventoryValueForProduct("PROD_COST", UtilDateTime.nowTimestamp()));
- Map expectedInvValues = UtilMisc.toMap("MAT_A_COST", "-36", "MAT_B_COST", "-42", "PROD_COST", "328");
+ finalInvValues.put("PROD_MANUF", inventoryAsserts.getInventoryValueForProduct("PROD_MANUF", UtilDateTime.nowTimestamp()));
+ Map expectedInvValues = UtilMisc.toMap("MAT_A_COST", "-36", "MAT_B_COST", "-42", "PROD_MANUF", "328");
assertMapDifferenceCorrect(initInvValues, finalInvValues, expectedInvValues);
// verify that the difference in balances work out
@@ -275,14 +275,14 @@ public class ProductionRunTests extends ProductionRunTestCase {
Timestamp start = UtilDateTime.nowTimestamp();
// note the initial inventory quantities
- Map origProdCostInventory = inventoryAsserts.getInventory("PROD_COST");
+ Map origProdCostInventory = inventoryAsserts.getInventory("PROD_MANUF");
Map origMatACostInventory = inventoryAsserts.getInventory("MAT_A_COST");
Map origMatBCostInventory = inventoryAsserts.getInventory("MAT_B_COST");
assertAllInventoryValuesEqual(inventoryAsserts);
// note the initial inventory values
Map initInvValues = FastMap.newInstance();
- initInvValues.put("PROD_COST", inventoryAsserts.getInventoryValueForProduct("PROD_COST", start));
+ initInvValues.put("PROD_MANUF", inventoryAsserts.getInventoryValueForProduct("PROD_MANUF", start));
initInvValues.put("MAT_A_COST", inventoryAsserts.getInventoryValueForProduct("MAT_A_COST", start));
initInvValues.put("MAT_B_COST", inventoryAsserts.getInventoryValueForProduct("MAT_B_COST", start));
@@ -299,7 +299,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
// issue 2 of the PROD_COST
Map input = UtilMisc.toMap("userLogin", demowarehouse1);
input.put("workEffortId", taskId);
- input.put("productId", "PROD_COST");
+ input.put("productId", "PROD_MANUF");
input.put("quantity", new BigDecimal("2.0"));
runAndAssertServiceSuccess("issueProductionRunTaskComponent", input);
@@ -308,7 +308,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
assertAllInventoryValuesEqual(inventoryAsserts);
// make sure WEGS is completed
- List wegsList = delegator.findByAnd("WorkEffortGoodStandard", UtilMisc.toMap("workEffortId", taskId, "productId", "PROD_COST", "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED"));
+ List wegsList = delegator.findByAnd("WorkEffortGoodStandard", UtilMisc.toMap("workEffortId", taskId, "productId", "PROD_MANUF", "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED"));
assertTrue("WEGS for material requirement of 2 PROD_COST exists.", wegsList.size() == 1);
GenericValue wegs = EntityUtil.getFirst(wegsList);
assertEquals("Material Issuance failed: PROD_COST WorkEffortGoodStandard was not marked completed.", wegs.getString("statusId"), "WEGS_COMPLETED");
@@ -348,7 +348,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
assertAllInventoryValuesEqual(inventoryAsserts);
// ensure the inventory quantity changes are correct
- inventoryAsserts.assertInventoryChange("PROD_COST", new BigDecimal("-2.0"), origProdCostInventory);
+ inventoryAsserts.assertInventoryChange("PROD_MANUF", new BigDecimal("-2.0"), origProdCostInventory);
inventoryAsserts.assertInventoryChange("MAT_A_COST", new BigDecimal("4.0"), origMatACostInventory);
inventoryAsserts.assertInventoryChange("MAT_B_COST", new BigDecimal("6.0"), origMatBCostInventory);
@@ -364,10 +364,10 @@ public class ProductionRunTests extends ProductionRunTestCase {
// verify the expected cost change
Map finalInvValues = FastMap.newInstance();
- finalInvValues.put("PROD_COST", inventoryAsserts.getInventoryValueForProduct("PROD_COST", UtilDateTime.nowTimestamp()));
+ finalInvValues.put("PROD_MANUF", inventoryAsserts.getInventoryValueForProduct("PROD_MANUF", UtilDateTime.nowTimestamp()));
finalInvValues.put("MAT_A_COST", inventoryAsserts.getInventoryValueForProduct("MAT_A_COST", UtilDateTime.nowTimestamp()));
finalInvValues.put("MAT_B_COST", inventoryAsserts.getInventoryValueForProduct("MAT_B_COST", UtilDateTime.nowTimestamp()));
- Map expectedInvValues = UtilMisc.toMap("MAT_A_COST", "36", "MAT_B_COST", "42", "PROD_COST", "-328");
+ Map expectedInvValues = UtilMisc.toMap("MAT_A_COST", "36", "MAT_B_COST", "42", "PROD_MANUF", "-328");
assertMapDifferenceCorrect(initInvValues, finalInvValues, expectedInvValues);
// verify that the difference in balances work out
@@ -418,7 +418,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
// produce the products, which should trigger a posting
input = UtilMisc.toMap("userLogin", demowarehouse1);
input.put("workEffortId", productionRunId);
- input.put("productId", "PROD_COST");
+ input.put("productId", "PROD_MANUF");
runAndAssertServiceSuccess("opentaps.productionRunProduce", input);
assertAllInventoryValuesEqual(inventoryAsserts);
@@ -452,7 +452,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
receiveMaterial("MAT_B_COST", 1, matBUnitCost);
// note the initial inventory quantities
- Map origProdCostInventory = inventoryAsserts.getInventory("PROD_COST");
+ Map origProdCostInventory = inventoryAsserts.getInventory("PROD_MANUF");
Map origMatACostInventory = inventoryAsserts.getInventory("MAT_A_COST");
Map origMatBCostInventory = inventoryAsserts.getInventory("MAT_B_COST");
@@ -487,7 +487,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
// produce the products, which should trigger a posting
input = UtilMisc.toMap("userLogin", demowarehouse1);
input.put("workEffortId", productionRunId);
- input.put("productId", "PROD_COST");
+ input.put("productId", "PROD_MANUF");
Map results = runAndAssertServiceSuccess("opentaps.productionRunProduce", input);
assertAllInventoryValuesEqual(inventoryAsserts);
@@ -501,7 +501,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
assertTransactionEquivalence(transactions, UtilMisc.toList("MFGTEST-20", "MFGTEST-21", "MFGTEST-22", "MFGTEST-23", "MFGTEST-24", "MFGTEST-25"));
// verify that inventory changes include additional issuances
- inventoryAsserts.assertInventoryChange("PROD_COST", new BigDecimal("1.0"), origProdCostInventory);
+ inventoryAsserts.assertInventoryChange("PROD_MANUF", new BigDecimal("1.0"), origProdCostInventory);
inventoryAsserts.assertInventoryChange("MAT_A_COST", new BigDecimal("-3.0"), origMatACostInventory);
inventoryAsserts.assertInventoryChange("MAT_B_COST", new BigDecimal("-4.0"), origMatBCostInventory);
@@ -984,7 +984,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
// create the production run and confirm it
String name = "Production run to test average cost adjustment to production run costs.";
input = UtilMisc.toMap("userLogin", demowarehouse1);
- input.put("productId", "PROD_COST");
+ input.put("productId", "PROD_MANUF");
input.put("quantity", new BigDecimal("2.0"));
input.put("startDate", UtilDateTime.nowTimestamp());
input.put("facilityId", facilityId);
@@ -999,7 +999,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
runAndAssertServiceSuccess("changeProductionRunStatus", input);
// note the initial inventory quantities
- Map origProdCostInventory = inventoryAsserts.getInventory("PROD_COST");
+ Map origProdCostInventory = inventoryAsserts.getInventory("PROD_MANUF");
Map origMatACostInventory = inventoryAsserts.getInventory("MAT_A_COST");
Map origMatBCostInventory = inventoryAsserts.getInventory("MAT_B_COST");
assertAllInventoryValuesEqual(inventoryAsserts);
@@ -1013,7 +1013,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
Map initInvValues = FastMap.newInstance();
initInvValues.put("MAT_A_COST", inventoryAsserts.getInventoryValueForProduct("MAT_A_COST", start));
initInvValues.put("MAT_B_COST", inventoryAsserts.getInventoryValueForProduct("MAT_B_COST", start));
- initInvValues.put("PROD_COST", inventoryAsserts.getInventoryValueForProduct("PROD_COST", start));
+ initInvValues.put("PROD_MANUF", inventoryAsserts.getInventoryValueForProduct("PROD_MANUF", start));
// note the initial balances
Map initialBalances = financialAsserts.getFinancialBalances(start);
@@ -1043,7 +1043,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
// create and assign inventory for the products, which should trigger a posting
input = UtilMisc.toMap("userLogin", demowarehouse1);
input.put("workEffortId", productionRunId);
- input.put("productId", "PROD_COST");
+ input.put("productId", "PROD_MANUF");
results = runAndAssertServiceSuccess("opentaps.productionRunProduce", input);
pause("ran production");
@@ -1051,7 +1051,7 @@ public class ProductionRunTests extends ProductionRunTestCase {
List<String> inventoryItemIds = (List) results.get("inventoryItemIds");
// make sure the inventory quantity changes are correct_
- inventoryAsserts.assertInventoryChange("PROD_COST", new BigDecimal("2.0"), origProdCostInventory);
+ inventoryAsserts.assertInventoryChange("PROD_MANUF", new BigDecimal("2.0"), origProdCostInventory);
inventoryAsserts.assertInventoryChange("MAT_A_COST", new BigDecimal("-4.0"), origMatACostInventory);
inventoryAsserts.assertInventoryChange("MAT_B_COST", new BigDecimal("-6.0"), origMatBCostInventory);
@@ -1067,10 +1067,10 @@ public class ProductionRunTests extends ProductionRunTestCase {
Map finalInvValues = FastMap.newInstance();
finalInvValues.put("MAT_A_COST", inventoryAsserts.getInventoryValueForProduct("MAT_A_COST", UtilDateTime.nowTimestamp()));
finalInvValues.put("MAT_B_COST", inventoryAsserts.getInventoryValueForProduct("MAT_B_COST", UtilDateTime.nowTimestamp()));
- finalInvValues.put("PROD_COST", inventoryAsserts.getInventoryValueForProduct("PROD_COST", UtilDateTime.nowTimestamp()));
+ finalInvValues.put("PROD_MANUF", inventoryAsserts.getInventoryValueForProduct("PROD_MANUF", UtilDateTime.nowTimestamp()));
Map expectedInvValues = null;
- expectedInvValues = UtilMisc.toMap("MAT_A_COST", "-36", "MAT_B_COST", "-42", "PROD_COST", "328");
+ expectedInvValues = UtilMisc.toMap("MAT_A_COST", "-36", "MAT_B_COST", "-42", "PROD_MANUF", "328");
assertMapDifferenceCorrect(initInvValues, finalInvValues, expectedInvValues);
// verify that the difference in balances work out
-----------------------------------------------------------------------
Summary of changes:
.../shipment/receipt/ShipmentReceiptServices.xml | 8 ++-
.../crmsfa/returns/ReturnServices.java | 27 +++++-----
.../opentaps/tests/crmsfa/orders/ReturnTests.java | 24 +++-----
.../tests/warehouse/ProductionRunTestCase.java | 8 ++--
.../tests/warehouse/ProductionRunTests.java | 56 ++++++++++----------
5 files changed, 60 insertions(+), 63 deletions(-)
hooks/post-receive
--
opentaps Open Source ERP CRM
|