svn commit: r703713 - /ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r703713 - /ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy

jleroux@apache.org
Author: jleroux
Date: Sat Oct 11 12:11:31 2008
New Revision: 703713

URL: http://svn.apache.org/viewvc?rev=703713&view=rev
Log:
Fix 3 bugs before being able to test "Packing Slip for Mktng pack pick assembly: the qty shown "In this Shipment" and "Total Shipped" is the sum of the components instead of the product ordered." (https://issues.apache.org/jira/browse/OFBIZ-1411) - OFBIZ-1411

I think I will look for similar TimeStmamps issues introduced during Groovy migration

Modified:
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy?rev=703713&r1=703712&r2=703713&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy Sat Oct 11 12:11:31 2008
@@ -52,11 +52,13 @@
             UtilMisc.toList(
                 EntityCondition.makeCondition("primaryOrderId", EntityOperator.EQUALS, shipment.getString("primaryOrderId")),
                 EntityCondition.makeCondition("shipmentTypeId", EntityOperator.EQUALS, "SALES_SHIPMENT"),
-                EntityCondition.makeCondition("createdDate", EntityOperator.LESS_THAN_EQUAL_TO, shipment.getString("createdDate"))
+                EntityCondition.makeCondition("createdDate", EntityOperator.LESS_THAN_EQUAL_TO,
+                        ObjectType.simpleTypeConvert(shipment.getString("createdDate"), "Timestamp", null, null))
             ),
         EntityOperator.AND), null, null, null, null);
+
 previousShipmentIter.each { previousShipmentItem ->
-    if (previousShipmentItem.shipmentId.equals(shipment.shipmentId) == false) {
+    if (!previousShipmentItem.shipmentId.equals(shipment.shipmentId)) {
         previousShipmentItems = previousShipmentItem.getRelated("ShipmentItem");
         previousShipmentItems.each { shipmentItem ->
             productId = shipmentItem.productId;
@@ -93,12 +95,12 @@
 }
 
 // for each package, we want to list the quantities and details of each product
-packages = [:]; // note we assume that the package number is simply the index + 1 of this list
+packages = []; // note we assume that the package number is simply the index + 1 of this list
 shipmentPackages.each { shipmentPackage ->
     contents = shipmentPackage.getRelated("ShipmentPackageContent", ['shipmentItemSeqId']);
 
     // each line is one logical Product and the quantities associated with it
-    lines = [:];
+    lines = [];
     contents.each { content ->
         shipmentItem = content.getRelatedOne("ShipmentItem");
         product = shipmentItem.getRelatedOne("Product");