svn commit: r1132589 - /ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl

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

svn commit: r1132589 - /ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl

jacopoc
Author: jacopoc
Date: Mon Jun  6 10:48:35 2011
New Revision: 1132589

URL: http://svn.apache.org/viewvc?rev=1132589&view=rev
Log:
Added ability to approve an order item if it is in an order already approved; this can happen if the Store is set to create order items in the "created" status and if an item is added to an already approved order; in this situation, with the existing ui it was impossible to approve and fulfill the order item.


Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl?rev=1132589&r1=1132588&r2=1132589&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl Mon Jun  6 10:48:35 2011
@@ -171,6 +171,16 @@ under the License.
                                             <div class="current-status">
                                                 <span class="label">${uiLabelMap.CommonCurrent}</span>&nbsp;${currentItemStatus.get("description",locale)?default(currentItemStatus.statusId)}
                                             </div>
+                                            <#if ("ITEM_CREATED" == (currentItemStatus.statusId) && "ORDER_APPROVED" == (orderHeader.statusId)) && (security.hasEntityPermission("ORDERMGR", "_UPDATE", session) || security.hasRolePermission("ORDERMGR", "_UPDATE", "", "", session))>
+                                                <div>
+                                                    <a href="javascript:document.OrderApproveOrderItem_${orderItem.orderItemSeqId?default("")}.submit()" class="buttontext">${uiLabelMap.OrderApproveOrder}</a>
+                                                    <form name="OrderApproveOrderItem_${orderItem.orderItemSeqId?default("")}" method="post" action="<@ofbizUrl>changeOrderItemStatus</@ofbizUrl>">
+                                                        <input type="hidden" name="statusId" value="ITEM_APPROVED"/>
+                                                        <input type="hidden" name="orderId" value="${orderId?if_exists}"/>
+                                                        <input type="hidden" name="orderItemSeqId" value="${orderItem.orderItemSeqId?if_exists}"/>
+                                                    </form>
+                                                </div>
+                                            </#if>
                                             <#assign orderItemStatuses = orderReadHelper.getOrderItemStatuses(orderItem)>
                                             <#list orderItemStatuses as orderItemStatus>
                                                 <#assign loopStatusItem = orderItemStatus.getRelatedOne("StatusItem")>