Author: jleroux
Date: Sat Jun 15 17:03:31 2013
New Revision: 1493399

URL: http://svn.apache.org/r1493399
Log:
"Applied fix from trunk for revision: 1493393" 
------------------------------------------------------------------------
r1493393 | jleroux | 2013-06-15 18:22:53 +0200 (sam., 15 juin 2013) | 7 lines

A fixing patch from Sergei Biletnikov for "Search orders by good 
identification" https://issues.apache.org/jira/browse/OFBIZ-5031

  currentCarrierShipmentMethod = delegator.findByAnd("CarrierShipmentMethod", 
[partyId : carrierPartyId, shipmentMethodTypeId : shipmentMethodTypeId], null, 
false);
is not correct, the result is the list, so the remedy is simple:
  currentCarrierShipmentMethod = 
EntityUtil.getFirst(delegator.findByAnd("CarrierShipmentMethod", [partyId : 
carrierPartyId, shipmentMethodTypeId : shipmentMethodTypeId], null, false));


------------------------------------------------------------------------


Modified:
    ofbiz/branches/release12.04/   (props changed)
    
ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy

Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1493393

Modified: 
ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy?rev=1493399&r1=1493398&r2=1493399&view=diff
==============================================================================
--- 
ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
 (original)
+++ 
ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
 Sat Jun 15 17:03:31 2013
@@ -21,6 +21,7 @@ import java.util.*;
 import java.sql.Timestamp;
 import org.ofbiz.entity.*;
 import org.ofbiz.base.util.*;
+import org.ofbiz.entity.util.*;
 
 module = "FindOrders.groovy";
 
@@ -96,7 +97,7 @@ if (shipmentMethod) {
     carrierPartyId = shipmentMethod.substring(0, shipmentMethod.indexOf("@"));
     shipmentMethodTypeId = 
shipmentMethod.substring(shipmentMethod.indexOf("@")+1);
     if (carrierPartyId && shipmentMethodTypeId) {
-        currentCarrierShipmentMethod = 
delegator.findByAnd("CarrierShipmentMethod", [partyId : carrierPartyId, 
shipmentMethodTypeId : shipmentMethodTypeId]);
+        currentCarrierShipmentMethod = 
EntityUtil.getFirst(delegator.findByAnd("CarrierShipmentMethod", [partyId : 
carrierPartyId, shipmentMethodTypeId : shipmentMethodTypeId], null, false));
         context.currentCarrierShipmentMethod = currentCarrierShipmentMethod;
     }
 }


Reply via email to