You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mo...@apache.org on 2009/06/29 16:33:32 UTC

svn commit: r789344 - in /ofbiz/trunk/applications/order: src/org/ofbiz/order/shoppingcart/CheckOutEvents.java src/org/ofbiz/order/shoppingcart/CheckOutHelper.java webapp/ordermgr/entry/optionsettings.ftl

Author: mor
Date: Mon Jun 29 14:33:32 2009
New Revision: 789344

URL: http://svn.apache.org/viewvc?rev=789344&view=rev
Log:
Internal Notes can be added while placing an order through order manager.
Applied patch from Sharad Gupta, part of OFBIZ-2669 (https://issues.apache.org/jira/browse/OFBIZ-2669)

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.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=789344&r1=789343&r2=789344&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 Mon Jun 29 14:33:32 2009
@@ -668,6 +668,7 @@
         String shipBeforeDate = null;
         String shipAfterDate = null;
         String cancelBackOrderDate = null;
+        String internalOrderNotes = null;
 
         String mode = request.getParameter("finalizeMode");
         Debug.logInfo("FinalizeMode: " + mode, module);
@@ -785,8 +786,9 @@
                     shipBeforeDate = request.getParameter(shipGroupIndex + "_shipBeforeDate");
                     shipAfterDate = request.getParameter(shipGroupIndex + "_shipAfterDate");
                     cancelBackOrderDate = request.getParameter("cancelBackOrderDate");
+                    internalOrderNotes = request.getParameter("internal_order_notes");
 
-                    callResult = checkOutHelper.finalizeOrderEntryOptions(shipGroupIndex, shippingMethod, shippingInstructions, maySplit, giftMessage, isGift, internalCode, shipBeforeDate, shipAfterDate, cancelBackOrderDate);
+                    callResult = checkOutHelper.finalizeOrderEntryOptions(shipGroupIndex, shippingMethod, shippingInstructions, maySplit, giftMessage, isGift, internalCode, shipBeforeDate, shipAfterDate, cancelBackOrderDate, internalOrderNotes);
                     ServiceUtil.addErrors(errorMessages, errorMaps, callResult);
                 }
             }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=789344&r1=789343&r2=789344&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Mon Jun 29 14:33:32 2009
@@ -1310,12 +1310,12 @@
      * any error messages
      */
     public Map finalizeOrderEntryOptions(int shipGroupIndex, String shippingMethod, String shippingInstructions, String maySplit,
-            String giftMessage, String isGift, String internalCode, String shipBeforeDate, String shipAfterDate, String orderAdditionalEmails) {
+            String giftMessage, String isGift, String internalCode, String shipBeforeDate, String shipAfterDate, String orderAdditionalEmails, String internalOrderNotes) {
         this.cart.setOrderAdditionalEmails(orderAdditionalEmails);
-        return finalizeOrderEntryOptions(shipGroupIndex, shippingMethod, shippingInstructions, maySplit, giftMessage, isGift, internalCode, shipBeforeDate, shipAfterDate);
+        return finalizeOrderEntryOptions(shipGroupIndex, shippingMethod, shippingInstructions, maySplit, giftMessage, isGift, internalCode, shipBeforeDate, shipAfterDate, internalOrderNotes);
     }
     public Map finalizeOrderEntryOptions(int shipGroupIndex, String shippingMethod, String shippingInstructions, String maySplit,
-            String giftMessage, String isGift, String internalCode, String shipBeforeDate, String shipAfterDate) {
+            String giftMessage, String isGift, String internalCode, String shipBeforeDate, String shipAfterDate, String internalOrderNotes) {
 
         Map result = ServiceUtil.returnSuccess();
 
@@ -1344,6 +1344,7 @@
         this.cart.setMaySplit(shipGroupIndex, Boolean.valueOf(maySplit));
         this.cart.setIsGift(shipGroupIndex, Boolean.valueOf(isGift));
         this.cart.setInternalCode(internalCode); // FIXME: the internalCode is not a ship group field and should be moved outside of this method
+        this.cart.addInternalOrderNote(internalOrderNotes);
 
         // set ship before date
         if ((shipBeforeDate != null) && (shipBeforeDate.length() > 8)) {

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=789344&r1=789343&r2=789344&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl Mon Jun 29 14:33:32 2009
@@ -35,8 +35,19 @@
 </#if>
 <#assign supplierPartyId = cart.getSupplierPartyId(shipGroupIndex)?if_exists>
 <#assign supplier =  delegator.findByPrimaryKey("PartyGroup", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", supplierPartyId))?if_exists />
-<hr/>
+
               <table width="100%" cellpadding="1" border="0" cellpadding="0" cellspacing="0">
+                <tr>
+                  <td colspan="2">
+                    <h2>${uiLabelMap.OrderInternalNote}</h2>
+                  </td>
+                </tr>
+                <tr>
+                  <td colspan="2">
+                    <textarea cols="30" rows="3" name="internal_order_notes"></textarea>
+                  </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>