svn commit: r1742711 - in /ofbiz/trunk/applications/order: entitydef/entitymodel_view.xml webapp/ordermgr/WEB-INF/actions/return/ReturnItems.groovy

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

svn commit: r1742711 - in /ofbiz/trunk/applications/order: entitydef/entitymodel_view.xml webapp/ordermgr/WEB-INF/actions/return/ReturnItems.groovy

diveshdutta
Author: diveshdutta
Date: Sat May  7 13:35:35 2016
New Revision: 1742711

URL: http://svn.apache.org/viewvc?rev=1742711&view=rev
Log:
(OFBIZ-7047) Fixed: Un-shipped sales orders are getting listed for returns while creating sales return for another matching address order, now only thoes orders are shown which are partially shipped or completely shipped. Thanks Swapnil Shah for reporting the issue and Jagpreet Kaur for the patch.

Modified:
    ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnItems.groovy

Modified: ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml?rev=1742711&r1=1742710&r2=1742711&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml (original)
+++ ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml Sat May  7 13:35:35 2016
@@ -524,6 +524,7 @@ under the License.
       <alias entity-alias="OI" name="orderItemTypeId"/>
       <alias entity-alias="OI" name="itemDescription"/>
       <alias entity-alias="OI" name="orderItemSeqId"/>
+      <alias entity-alias="OI" name="orderItemStatusId" field="statusId"/>
       <view-link entity-alias="OT" rel-entity-alias="OH">
         <key-map field-name="orderId"/>
       </view-link>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnItems.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnItems.groovy?rev=1742711&r1=1742710&r2=1742711&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnItems.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnItems.groovy Sat May  7 13:35:35 2016
@@ -83,7 +83,7 @@ if (returnHeaderTypeId == "VENDOR_RETURN
     roleTypeId = "BILL_FROM_VENDOR";
     partyId = returnHeader.toPartyId;
 }
-partyOrders = from("OrderHeaderAndRoles").where("roleTypeId", roleTypeId, "partyId", partyId).orderBy("orderId").queryList();
+partyOrders = select("orderId","orderDate").from("OrderHeaderItemAndRoles").where("roleTypeId", roleTypeId, "partyId", partyId, "orderItemStatusId", "ITEM_COMPLETED").orderBy("orderId").distinct().queryList();
 context.partyOrders = partyOrders;
 context.partyId = partyId;