Author: jacopoc
Date: Mon Jun 6 11:28:15 2011
New Revision: 1132600
URL:
http://svn.apache.org/viewvc?rev=1132600&view=revLog:
Backported from rev. 1132589:
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/branches/release11.04/applications/order/webapp/ordermgr/order/orderitems.ftl
Modified: ofbiz/branches/release11.04/applications/order/webapp/ordermgr/order/orderitems.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/order/webapp/ordermgr/order/orderitems.ftl?rev=1132600&r1=1132599&r2=1132600&view=diff==============================================================================
--- ofbiz/branches/release11.04/applications/order/webapp/ordermgr/order/orderitems.ftl (original)
+++ ofbiz/branches/release11.04/applications/order/webapp/ordermgr/order/orderitems.ftl Mon Jun 6 11:28:15 2011
@@ -171,6 +171,16 @@ under the License.
<div class="current-status">
<span class="label">${uiLabelMap.CommonCurrent}</span> ${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")>