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 2009/12/11 15:51:06 UTC

svn commit: r889644 - in /ofbiz/trunk/applications/order: src/org/ofbiz/order/shoppingcart/ webapp/ordermgr/WEB-INF/actions/entry/ webapp/ordermgr/entry/ webapp/ordermgr/order/

Author: jacopoc
Date: Fri Dec 11 14:51:06 2009
New Revision: 889644

URL: http://svn.apache.org/viewvc?rev=889644&view=rev
Log:
Misc enhancements to the ship group item management and other misc cleanups:
* added ability to set and edit shipBefore and shipBy dates
* enhancements to the checkout ship options screens
* fixed forms in ship groups screenlet of order detail to support orders with more than one ship group
* fixed uri of checkout tabs (removed an extra /)




Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetCheckOutTabBar.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java?rev=889644&r1=889643&r2=889644&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java Fri Dec 11 14:51:06 2009
@@ -803,8 +803,8 @@
                     giftMessage = request.getParameter(shipGroupIndex + "_gift_message");
                     isGift = request.getParameter(shipGroupIndex + "_is_gift");
                     internalCode = request.getParameter("internalCode"); // FIXME
-                    shipBeforeDate = request.getParameter(shipGroupIndex + "_shipBeforeDate");
-                    shipAfterDate = request.getParameter(shipGroupIndex + "_shipAfterDate");
+                    shipBeforeDate = request.getParameter("sgi" + shipGroupIndex + "_shipBeforeDate");
+                    shipAfterDate = request.getParameter("sgi" + shipGroupIndex + "_shipAfterDate");
                     internalOrderNotes = request.getParameter("internal_order_notes");
                     shippingNotes = request.getParameter("shippingNotes");
 

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetCheckOutTabBar.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetCheckOutTabBar.groovy?rev=889644&r1=889643&r2=889644&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetCheckOutTabBar.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetCheckOutTabBar.groovy Fri Dec 11 14:51:06 2009
@@ -28,22 +28,22 @@
 // ----------------------------------
 // The ordered list of steps is prepared here
 // ----------------------------------
-checkoutSteps.add([label : "OrderOrderItems", uri : "/orderentry", enabled : "Y"])
+checkoutSteps.add([label : "OrderOrderItems", uri : "orderentry", enabled : "Y"])
 
 if ("PURCHASE_ORDER".equals(shoppingCart.getOrderType())) {
-    checkoutSteps.add([label : "OrderOrderTerms", uri : "/setOrderTerm", enabled : "Y"])
+    checkoutSteps.add([label : "OrderOrderTerms", uri : "setOrderTerm", enabled : "Y"])
 }
-checkoutSteps.add([label : "FacilityShipping", uri : "/setShipping", enabled : "Y"])
+checkoutSteps.add([label : "FacilityShipping", uri : "setShipping", enabled : "Y"])
 if (shoppingCart.getShipGroupSize() > 1) {
-    checkoutSteps.add([label : "OrderShipGroups", uri : "/SetItemShipGroups", enabled : "Y"])
+    checkoutSteps.add([label : "OrderShipGroups", uri : "SetItemShipGroups", enabled : "Y"])
 }
-checkoutSteps.add([label : "CommonOptions", uri : "/setOptions", enabled : "Y"])
+checkoutSteps.add([label : "CommonOptions", uri : "setOptions", enabled : "Y"])
 if ("SALES_ORDER".equals(shoppingCart.getOrderType())) {
-    checkoutSteps.add([label : "OrderOrderTerms", uri : "/setOrderTerm", enabled : "Y"])
-    checkoutSteps.add([label : "AccountingPayment", uri : "/setBilling", enabled : "Y"])
+    checkoutSteps.add([label : "OrderOrderTerms", uri : "setOrderTerm", enabled : "Y"])
+    checkoutSteps.add([label : "AccountingPayment", uri : "setBilling", enabled : "Y"])
 }
-checkoutSteps.add([label : "PartyParties", uri : "/setAdditionalParty", enabled : "Y"])
-checkoutSteps.add([label : "OrderReviewOrder", uri : "/confirmOrder", enabled : "Y"])
+checkoutSteps.add([label : "PartyParties", uri : "setAdditionalParty", enabled : "Y"])
+checkoutSteps.add([label : "OrderReviewOrder", uri : "confirmOrder", enabled : "Y"])
 
 // ---------------------------------------
 

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl?rev=889644&r1=889643&r2=889644&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl Fri Dec 11 14:51:06 2009
@@ -25,6 +25,28 @@
       <table width='100%' border='0' cellspacing='0' cellpadding='0' class='boxbottom'>
         <tr>
           <td>
+            <table width="100%" cellpadding="1" border="0" cellpadding="0" cellspacing="0">
+              <tr>
+                <td colspan="2">
+                  <h2>${uiLabelMap.OrderInternalNote}</h2>
+                </td>
+                <td colspan="2">
+                  <h2>${uiLabelMap.OrderShippingNotes}</h2>
+                </td>
+              </tr>
+              <tr>
+                <td colspan="2">
+                  <textarea cols="30" rows="3" name="internal_order_notes"></textarea>
+                </td>
+                <td colspan="2">
+                  <textarea cols="30" rows="3" name="shippingNotes"></textarea>
+                </td>
+              </tr>
+            </table>
+          </td>
+        </tr>
+        <tr>
+          <td>
             <form method="post" action="<@o...@ofbizUrl>" name="checkoutsetupform">
               <input type="hidden" name="finalizeMode" value="options"/>
 <#list 1..cart.getShipGroupSize() as currIndex>
@@ -37,29 +59,7 @@
 <#assign supplier =  delegator.findByPrimaryKey("PartyGroup", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", supplierPartyId))?if_exists />
 
               <table width="100%" cellpadding="1" border="0" cellpadding="0" cellspacing="0">
-                <tr>
-                  <td colspan="2">
-                    <table width="100%" cellpadding="1" border="0" cellpadding="0" cellspacing="0">
-                      <tr>
-                        <td colspan="2">
-                          <h2>${uiLabelMap.OrderInternalNote}</h2>
-                        </td>
-                        <td colspan="2">
-                          <h2>${uiLabelMap.OrderShippingNotes}</h2>
-                        </td>
-                      </tr>
-                      <tr>
-                        <td colspan="2">
-                          <textarea cols="30" rows="3" name="internal_order_notes"></textarea>
-                        </td>
-                        <td colspan="2">
-                          <textarea cols="30" rows="3" name="shippingNotes"></textarea>
-                        </td>
-                      </tr>
-                    </table>
-                  </td>
-                </tr>
-                <tr><td colspan="2"><hr/></td></tr>
+              <tr><td colspan="2"><hr/></td></tr>
               <tr>
                 <td colspan="2">
                     <h1><b>${uiLabelMap.OrderShipGroup} ${uiLabelMap.CommonNbr} ${currIndex}</b><#if supplier?has_content> - ${supplier.groupName?default(supplier.partyId)}</#if></h1>
@@ -67,6 +67,11 @@
               </tr>
 
                <#if cart.getOrderType() != "PURCHASE_ORDER">
+                <tr>
+                  <td colspan="2">
+                    <h2>${uiLabelMap.ProductShipmentMethod}</h2>
+                  </td>
+                </tr>
                 <#assign shipEstimateWrapper = Static["org.ofbiz.order.shoppingcart.shipping.ShippingEstimateWrapper"].getWrapper(dispatcher, cart, 0)>
                 <#assign carrierShipmentMethods = shipEstimateWrapper.getShippingMethods()>
                 <#list carrierShipmentMethods as carrierShipmentMethod>
@@ -103,7 +108,6 @@
                   </td>
                 </tr>
                 </#if>
-                <tr><td colspan='2'><hr/></td></tr>
                <#else>
                    <input type='hidden' name='${shipGroupIndex?default("0")}_shipping_method' value="NO_SHIPPING@_NA_">
                </#if>
@@ -128,7 +132,32 @@
                     <div>${uiLabelMap.FacilityShipAvailable}</div>
                   </td>
                 </tr>
-                <tr><td colspan="2"><hr/></td></tr>
+                <tr>
+                  <td colspan="2">
+                    <h2>${uiLabelMap.OrderShipBeforeDate}</h2>
+                  </td>
+                </tr>
+                <tr>
+                    <td colspan="2">
+                    <div>
+                      <input type="text" size="25" maxlength="30" name="sgi${shipGroupIndex?default('0')}_shipBeforeDate"/>
+                      <a href="javascript:call_cal(document.checkoutsetupform.sgi${shipGroupIndex?default("0")}_shipBeforeDate,'');"><img src="<@o...@ofbizContentUrl>" width="16" height="16" border="0" alt="${uiLabelMap.OrderCalendarClickHereForCalendar}"/></a>
+                    </div>
+                    </td>
+                </tr>
+                <tr>
+                  <td colspan="2">
+                    <h2>${uiLabelMap.OrderShipAfterDate}</h2>
+                  </td>
+                </tr>
+                <tr>
+                    <td colspan="2">
+                    <div>
+                      <input type="text" size="25" maxlength="30" name="sgi${shipGroupIndex?default('0')}_shipAfterDate"/>
+                      <a href="javascript:call_cal(document.checkoutsetupform.sgi${shipGroupIndex?default("0")}_shipAfterDate,'');"><img src="<@o...@ofbizContentUrl>" width="16" height="16" border="0" alt="${uiLabelMap.OrderCalendarClickHereForCalendar}"/></a>
+                    </div>
+                    </td>
+                </tr>
                 <tr>
                   <td colspan="2">
                     <h2>${uiLabelMap.FacilitySpecialInstructions}</h2>
@@ -154,7 +183,6 @@
                             </td>
                         </tr>
                     </#if>
-                    <tr><td colspan="2"><hr /></td></tr>
                     <tr>
                         <td colspan="2">
                             <h2>${uiLabelMap.OrderGiftMessage}</h2>

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=889644&r1=889643&r2=889644&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl Fri Dec 11 14:51:06 2009
@@ -517,7 +517,9 @@
             </td>
           </form>
         </#if>
-        <#if shipGroup.shipAfterDate?has_content>
+        <form name="setShipGroupDates_${shipGroup.shipGroupSeqId}" method="post" action="<@o...@ofbizUrl>">
+        <input type="hidden" name="orderId" value="${orderHeader.orderId}"/>
+        <input type="hidden" name="shipGroupSeqId" value="${shipGroup.shipGroupSeqId}"/>
          <tr><td colspan="3"><hr/></td></tr>
          <tr>
             <td align="right" valign="top" width="15%">
@@ -525,22 +527,22 @@
             </td>
             <td width="5">&nbsp;</td>
             <td valign="top" width="80%">
-              ${shipGroup.shipAfterDate}
+              <input type="text" size="23" name="shipAfterDate" value="${shipGroup.shipAfterDate?if_exists}"/>
+              <a href="javascript:call_cal(document.setShipGroupDates_${shipGroup.shipGroupSeqId}.shipAfterDate,'');"><img src="<@o...@ofbizContentUrl>" width="16" height="16" border="0" alt="${uiLabelMap.OrderCalendarClickHereForCalendar}"/></a>
             </td>
          </tr>
-         </#if>
-        <#if shipGroup.shipByDate?has_content>
-        <tr><td colspan="3"><hr/></td></tr>
-        <tr>
+         <tr>
             <td align="right" valign="top" width="15%">
               <span class="label">&nbsp;${uiLabelMap.OrderShipBeforeDate}<span>
             </td>
             <td width="5">&nbsp;</td>
             <td valign="top" width="80%">
-              ${shipGroup.shipByDate}
+              <input type="text" size="23" name="shipByDate" value="${shipGroup.shipByDate?if_exists}"/>
+              <a href="javascript:call_cal(document.setShipGroupDates_${shipGroup.shipGroupSeqId}.shipByDate,'');"><img src="<@o...@ofbizContentUrl>" width="16" height="16" border="0" alt="${uiLabelMap.OrderCalendarClickHereForCalendar}"/></a>
+              <input type="submit" value="${uiLabelMap.CommonUpdate}"/>
             </td>
          </tr>
-         </#if>
+        </form>
        <#assign shipGroupShipments = shipGroup.getRelated("PrimaryShipment")>
        <#if shipGroupShipments?has_content>
           <tr><td colspan="3"><hr/></td></tr>
@@ -575,7 +577,7 @@
        </#if>
 
        <#-- shipment actions -->
-       <#if security.hasEntityPermission("ORDERMGR", "_UPDATE", session) && ((orderHeader.statusId == "ORDER_APPROVED") || (orderHeader.statusId == "ORDER_SENT"))>
+       <#if security.hasEntityPermission("ORDERMGR", "_UPDATE", session) && ((orderHeader.statusId == "ORDER_CREATED") || (orderHeader.statusId == "ORDER_APPROVED") || (orderHeader.statusId == "ORDER_SENT"))>
 
 
          <#-- Manual shipment options -->
@@ -584,22 +586,26 @@
             <td colspan="3" valign="top" width="100%" align="center">
              <#if orderHeader.orderTypeId == "SALES_ORDER">
                <#if !shipGroup.supplierPartyId?has_content>
-                 <a href="/facility/control/PackOrder?facilityId=${storeFacilityId?if_exists}&amp;orderId=${orderId}&amp;shipGroupSeqId=${shipGroup.shipGroupSeqId}&amp;externalLoginKey=${externalLoginKey}" class="buttontext">${uiLabelMap.OrderPackShipmentForShipGroup} [${shipGroup.shipGroupSeqId}]</a>
+                 <#if orderHeader.statusId == "ORDER_APPROVED">
+                 <a href="/facility/control/PackOrder?facilityId=${storeFacilityId?if_exists}&amp;orderId=${orderId}&amp;shipGroupSeqId=${shipGroup.shipGroupSeqId}&amp;externalLoginKey=${externalLoginKey}" class="buttontext">${uiLabelMap.OrderPackShipmentForShipGroup}</a>
                  <br/>
-                 <a href="javascript:document.createShipment.submit()" class="buttontext">${uiLabelMap.OrderNewShipmentForShipGroup}</a>
-                 <form name="createShipment" method="post" action="/facility/control/createShipment">
+                 </#if>
+                 <a href="javascript:document.createShipment_${shipGroup.shipGroupSeqId}.submit()" class="buttontext">${uiLabelMap.OrderNewShipmentForShipGroup}</a>
+                 <form name="createShipment_${shipGroup.shipGroupSeqId}" method="post" action="/facility/control/createShipment">
                    <input type="hidden" name="primaryOrderId" value="${orderId}"/>
                    <input type="hidden" name="primaryShipGroupSeqId" value="${shipGroup.shipGroupSeqId}"/>
                    <input type="hidden" name="statusId" value="SHIPMENT_INPUT">
                    <input type="hidden" name="facilityId" value=${storeFacilityId?if_exists}>
+                   <input type="hidden" name="estimatedShipDate" value="${shipGroup.shipByDate?if_exists}"/>
                  </form>
                </#if>
              <#else>
+               <#if (orderHeader.statusId == "ORDER_APPROVED") || (orderHeader.statusId == "ORDER_SENT")>
                <#assign facilities = facilitiesForShipGroup.get(shipGroup.shipGroupSeqId)>
                <#if facilities?has_content>
                    <div>
-                    <a href="javascript:document.createShipment2.submit()" class="buttontext">${uiLabelMap.OrderNewShipmentForShipGroup}</a>
-                    <form name="createShipment2" method="post" action="/facility/control/createShipment">
+                    <a href="javascript:document.createShipment2_${shipGroup.shipGroupSeqId}.submit()" class="buttontext">${uiLabelMap.OrderNewShipmentForShipGroup}</a>
+                    <form name="createShipment2_${shipGroup.shipGroupSeqId}" method="post" action="/facility/control/createShipment">
                        <input type="hidden" name="primaryOrderId" value="${orderId}"/>
                        <input type="hidden" name="primaryShipGroupSeqId" value="${shipGroup.shipGroupSeqId}"/>
                        <input type="hidden" name="shipmentTypeId" value="PURCHASE_SHIPMENT"/>
@@ -617,13 +623,13 @@
                     </div>
                <#else>
                    <a href="javascript:document.quickDropShipOrder_${shipGroup_index}.submit();" class="buttontext">${uiLabelMap.ProductShipmentQuickComplete}</a>
-                   <a href="javascript:document.createShipment3.submit();" class="buttontext">${uiLabelMap.OrderNewDropShipmentForShipGroup} [${shipGroup.shipGroupSeqId}]</a>
+                   <a href="javascript:document.createShipment3_${shipGroup.shipGroupSeqId}.submit();" class="buttontext">${uiLabelMap.OrderNewDropShipmentForShipGroup} [${shipGroup.shipGroupSeqId}]</a>
                    <form name="quickDropShipOrder_${shipGroup_index}" method="post" action="<@o...@ofbizUrl>">
                         <input type="hidden" name="orderId" value="${orderId}"/>
                         <input type="hidden" name="shipGroupSeqId" value="${shipGroup.shipGroupSeqId}"/>
                         <input type="hidden" name="externalLoginKey" value="${externalLoginKey}">
                     </form>
-                    <form name="createShipment3" method="post" action="/facility/control/createShipment">
+                    <form name="createShipment3_${shipGroup.shipGroupSeqId}" method="post" action="/facility/control/createShipment">
                         <input type="hidden" name="primaryOrderId" value="${orderId}"/>
                         <input type="hidden" name="primaryShipGroupSeqId" value="${shipGroup.shipGroupSeqId}"/>
                         <input type="hidden" name="shipmentTypeId" value="DROP_SHIPMENT">
@@ -631,6 +637,7 @@
                         <input type="hidden" name="externalLoginKey" value="${externalLoginKey}">
                     </form>
                </#if>
+               </#if>
              </#if>
             </td>
          </tr>