You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2008/08/04 14:32:51 UTC
svn commit: r682361 - in /ofbiz/trunk/applications/order:
config/OrderUiLabels.xml
webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
webapp/ordermgr/order/orderitems.ftl
webapp/ordermgr/order/ordershippinginfo.ftl
Author: jacopoc
Date: Mon Aug 4 05:32:50 2008
New Revision: 682361
URL: http://svn.apache.org/viewvc?rev=682361&view=rev
Log:
Misc fixes/enhancements to the "order details" screen.
Moved all the links to run quick actions on shipments/returns that affect the whole order (instead of a shipment group) outside of the shipment group box.
I have created an independent box for this named "actions" and in it I have moved also the "edit items" and "cancel" links: I am not sure this is a good idea, and if there are objections I will move the two links back into the "items" box.
Also hidden the "quick receive PO" link if there is already a shipment associated to the order, in order to avoid the proliferation of shipments.
Modified:
ofbiz/trunk/applications/order/config/OrderUiLabels.xml
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl
ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl
Modified: ofbiz/trunk/applications/order/config/OrderUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/config/OrderUiLabels.xml?rev=682361&r1=682360&r2=682361&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/config/OrderUiLabels.xml (original)
+++ ofbiz/trunk/applications/order/config/OrderUiLabels.xml Mon Aug 4 05:32:50 2008
@@ -1466,6 +1466,9 @@
<value xml:lang="th">รหัสà¹à¸§à¹à¸à¹à¸à¸à¹</value>
<value xml:lang="zh">ç½ç«æ è¯</value>
</property>
+ <property key="OrderActions">
+ <value xml:lang="en">Actions</value>
+ </property>
<property key="OrderAddAllToCart">
<value xml:lang="cs">PÅidat vÅ¡echno do koÅ¡Ãku</value>
<value xml:lang="de">Alles in den Warenkorb legen</value>
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy?rev=682361&r1=682360&r2=682361&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy Mon Aug 4 05:32:50 2008
@@ -31,6 +31,8 @@
import org.ofbiz.product.catalog.CatalogWorker;
import org.ofbiz.accounting.payment.*;
+import javolution.util.FastMap;
+
orderId = parameters.orderId;
context.orderId = orderId;
@@ -270,6 +272,7 @@
if ("PURCHASE_ORDER".equals(orderType)) {
facilitiesForShipGroup = [:];
ownerPartyId = orderReadHelper.getBillToParty().partyId;
+ Map ownedFacilities = FastMap.newInstance();
shipGroups.each { shipGroup ->
lookupMap = [ownerPartyId : ownerPartyId];
if (shipGroup.contactMechId) {
@@ -277,8 +280,13 @@
}
facilities = delegator.findByAndCache("FacilityAndContactMech", lookupMap);
facilitiesForShipGroup[shipGroup.shipGroupSeqId] = facilities;
+ facilities.each { facility ->
+ ownedFacilities[facility.facilityId] = facility;
+ }
}
context.facilitiesForShipGroup = facilitiesForShipGroup;
+ // Now get the list of all the facilities owned by the bill-to-party
+ context.ownedFacilities = ownedFacilities.values();
}
// set the type of return based on type of order
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=682361&r1=682360&r2=682361&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl Mon Aug 4 05:32:50 2008
@@ -22,20 +22,6 @@
<div class="screenlet-title-bar">
<ul>
<li class="h3"> ${uiLabelMap.OrderOrderItems}</li>
- <#if security.hasEntityPermission("ORDERMGR", "_UPDATE", session) || security.hasRolePermission("ORDERMGR", "_UPDATE", "", "", session)>
- <#if orderHeader?has_content && orderHeader.statusId != "ORDER_CANCELLED">
- <#if orderHeader.statusId != "ORDER_COMPLETED">
- <#--
- <a href="<@o...@ofbizUrl>">${uiLabelMap.OrderCancelAllItems}</a>
- -->
- <li><a href="<@o...@ofbizUrl>">${uiLabelMap.OrderEditItems}</a></li>
- </#if>
- <li><a href="<@o...@ofbizUrl>">${uiLabelMap.OrderCreateAsNewOrder}</a></li>
- <#if returnableItems?has_content>
- <li><a href="<@o...@ofbizUrl>">${uiLabelMap.OrderCreateReturn}</a></li>
- </#if>
- </#if>
- </#if>
</ul>
<br class="clear"/>
</div>
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl?rev=682361&r1=682360&r2=682361&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl Mon Aug 4 05:32:50 2008
@@ -16,6 +16,80 @@
specific language governing permissions and limitations
under the License.
-->
+<#if security.hasEntityPermission("ORDERMGR", "_UPDATE", session) || security.hasRolePermission("ORDERMGR", "_UPDATE", "", "", session)>
+ <div class="screenlet">
+ <div class="screenlet-title-bar">
+ <ul><li class="h3"> ${uiLabelMap.OrderActions}</li></ul>
+ <br class="clear"/>
+ </div>
+ <div class="screenlet-body">
+ <ul>
+ <#if security.hasEntityPermission("FACILITY", "_CREATE", session) && ((orderHeader.statusId == "ORDER_APPROVED") || (orderHeader.statusId == "ORDER_SENT"))>
+ <#-- Special shipment options -->
+ <#if orderHeader.orderTypeId == "SALES_ORDER">
+ <#if !shipGroup.supplierPartyId?has_content>
+ <li><a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.OrderQuickShipEntireOrder}</a></li>
+ </#if>
+ <#else> <#-- PURCHASE_ORDER -->
+ <span class="label"> <#if orderHeader.orderTypeId == "PURCHASE_ORDER">${uiLabelMap.ProductDestinationFacility}</#if></span>
+ <#if ownedFacilities?has_content>
+ <#if !allShipments?has_content>
+ <form action="/facility/control/quickShipPurchaseOrder?externalLoginKey=${externalLoginKey}" method="POST">
+ <input type="hidden" name="initialSelected" value="Y"/>
+ <input type="hidden" name="orderId" value="${orderId}"/>
+ <#-- destination form (/facility/control/ReceiveInventory) wants purchaseOrderId instead of orderId, so we set it here as a workaround -->
+ <input type="hidden" name="purchaseOrderId" value="${orderId}"/>
+ <li>
+ <select name="facilityId">
+ <#list ownedFacilities as facility>
+ <option value="${facility.facilityId}">${facility.facilityName}</option>
+ </#list>
+ </select>
+ <input type="submit" class="smallSubmit" value="${uiLabelMap.OrderQuickReceivePurchaseOrder}"/>
+ </li>
+ </form>
+ </#if>
+ <#if orderHeader.statusId != "ORDER_COMPLETED">
+ <form action="<@o...@ofbizUrl>" method="POST">
+ <input type="hidden" name="orderId" value="${orderId}"/>
+ <li>
+ <select name="facilityId">
+ <#list ownedFacilities as facility>
+ <option value="${facility.facilityId}">${facility.facilityName}</option>
+ </#list>
+ </select>
+ <input type="submit" class="smallSubmit" value="${uiLabelMap.OrderForceCompletePurchaseOrder}"/>
+ </li>
+ </form>
+ </#if>
+ </#if>
+ </#if>
+ </#if>
+ <#-- Refunds/Returns for Sales Orders and Delivery Schedules -->
+ <#if orderHeader.statusId != "ORDER_COMPLETED" && orderHeader.statusId != "ORDER_CANCELLED">
+ <li><a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.OrderViewEditDeliveryScheduleInfo}</a></li>
+ </#if>
+ <#if security.hasEntityPermission("ORDERMGR", "_RETURN", session) && orderHeader.statusId == "ORDER_COMPLETED">
+ <li><a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.OrderQuickRefundEntireOrder}</a></li>
+ <li><a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.OrderCreateReturn}</a></li>
+ </#if>
+
+ <#if orderHeader?has_content && orderHeader.statusId != "ORDER_CANCELLED">
+ <#if orderHeader.statusId != "ORDER_COMPLETED">
+ <#--
+ <li><a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.OrderCancelAllItems}</a></li>
+ -->
+ <li><a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.OrderEditItems}</a></li>
+ </#if>
+ <li><a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.OrderCreateAsNewOrder}</a></li>
+ <#if returnableItems?has_content>
+ <li><a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.OrderCreateReturn}</a></li>
+ </#if>
+ </#if>
+ </ul>
+ </div>
+ </div>
+</#if>
<#if shipGroups?has_content>
<#list shipGroups as shipGroup>
@@ -260,49 +334,6 @@
<#-- shipment actions -->
<#if security.hasEntityPermission("ORDERMGR", "_UPDATE", session) && ((orderHeader.statusId == "ORDER_APPROVED") || (orderHeader.statusId == "ORDER_SENT"))>
- <#-- Special shipment options -->
- <#if security.hasEntityPermission("FACILITY", "_CREATE", session)>
- <tr><td colspan="3"><hr/></td></tr>
- <tr>
- <td colspan="3" valign="top" align="center">
- <div>
- <#if orderHeader.orderTypeId == "SALES_ORDER">
- <#if !shipGroup.supplierPartyId?has_content>
- <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.OrderQuickShipEntireOrder}</a>
- </#if>
- <#else> <#-- PURCHASE_ORDER -->
- <span class="label"> <#if orderHeader.orderTypeId == "PURCHASE_ORDER">${uiLabelMap.ProductDestinationFacility}</#if></span>
- <#assign facilities = facilitiesForShipGroup.get(shipGroup.shipGroupSeqId)>
- <#if facilities?has_content>
- <form action="/facility/control/quickShipPurchaseOrder?externalLoginKey=${externalLoginKey}" method="POST">
- <input type="hidden" name="initialSelected" value="Y"/>
- <input type="hidden" name="orderId" value="${orderId}"/>
- <#-- destination form (/facility/control/ReceiveInventory) wants purchaseOrderId instead of orderId, so we set it here as a workaround -->
- <input type="hidden" name="purchaseOrderId" value="${orderId}"/>
- <select name="facilityId">
- <#list facilities as facility>
- <option value="${facility.facilityId}">${facility.facilityName}</option>
- </#list>
- </select>
- <input type="submit" class="smallSubmit" value="${uiLabelMap.OrderQuickReceivePurchaseOrder}"/>
- </form>
- <#if orderHeader.statusId != "ORDER_COMPLETED">
- <form action="<@o...@ofbizUrl>" method="POST">
- <input type="hidden" name="orderId" value="${orderId}"/>
- <select name="facilityId">
- <#list facilities as facility>
- <option value="${facility.facilityId}">${facility.facilityName}</option>
- </#list>
- </select>
- <input type="submit" class="smallSubmit" value="${uiLabelMap.OrderForceCompletePurchaseOrder}"/>
- </form>
- </#if>
- </#if>
- </#if>
- </div>
- </td>
- </tr>
- </#if>
<#-- Manual shipment options -->
<tr><td colspan="3"><hr/></td></tr>
@@ -342,23 +373,6 @@
</#if>
- <#-- Refunds/Returns for Sales Orders and Delivery Schedules -->
- <#if !shipGroup_has_next>
- <tr><td colspan="3"><hr/></td></tr>
- <tr>
- <td colspan="3" valign="top" width="100%" align="center">
- <#if security.hasEntityPermission("ORDERMGR", "_UPDATE", session)>
- <#if orderHeader.statusId != "ORDER_COMPLETED" && orderHeader.statusId != "ORDER_CANCELLED">
- <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.OrderViewEditDeliveryScheduleInfo}</a>
- </#if>
- <#if security.hasEntityPermission("ORDERMGR", "_RETURN", session) && orderHeader.statusId == "ORDER_COMPLETED">
- <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.OrderQuickRefundEntireOrder}</a>
- <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.OrderCreateReturn}</a>
- </#if>
- </#if>
- </td>
- </tr>
- </#if>
</table>
</div>
</div>