Author: jleroux
Date: Sat Nov 15 08:30:36 2008
New Revision: 717877
URL:
http://svn.apache.org/viewvc?rev=717877&view=revLog:
Another one (bug) coming from r712916 "First set of actual generics markup, only on product/product."
We are in luck it's only on product :o)
This close
https://issues.apache.org/jira/browse/OFBIZ-2047Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=717877&r1=717876&r2=717877&view=diff==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Sat Nov 15 08:30:36 2008
@@ -861,7 +861,7 @@
List<GenericValue> shipmentAndItems = delegator.findByAnd("ShipmentAndItem", UtilMisc.toMap("shipmentId", shipmentId, "statusId", "PURCH_SHIP_SHIPPED"));
if (shipmentAndItems.size() == 0) return ServiceUtil.returnSuccess();
- // store the quanitity of each product shipped in a hashmap keyed to productId
+ // store the quantity of each product shipped in a hashmap keyed to productId
Map<String, Double> shippedCountMap = FastMap.newInstance();
for (GenericValue item: shipmentAndItems) {
double shippedQuantity = item.getDouble("quantity").doubleValue();
@@ -870,9 +870,9 @@
shippedCountMap.put(item.getString("productId"), quantity);
}
- // store the quanitity of each product received in a hashmap keyed to productId
+ // store the quantity of each product received in a hashmap keyed to productId
Map<String, Double> receivedCountMap = FastMap.newInstance();
- for (GenericValue item: shipmentAndItems) {
+ for (GenericValue item: shipmentReceipts) {
double receivedQuantity = item.getDouble("quantityAccepted").doubleValue();
Double quantity = receivedCountMap.get(item.getString("productId"));
quantity = Double.valueOf(quantity == null ? receivedQuantity : receivedQuantity + quantity.doubleValue());