From afe573e7b03e127eccfcb34a0ea72a5d57f23091 Mon Sep 17 00:00:00 2001 From: Vikas Mayur Date: Mon, 29 Jun 2009 14:33:32 +0000 Subject: [PATCH] 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) git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@789344 13f79535-47bb-0310-9956-ffa450edef68 --- .../ofbiz/order/shoppingcart/CheckOutEvents.java | 4 +++- .../ofbiz/order/shoppingcart/CheckOutHelper.java | 7 ++++--- .../order/webapp/ordermgr/entry/optionsettings.ftl | 13 ++++++++++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java b/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java index b13933777b..9e87695b01 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java @@ -668,6 +668,7 @@ public class CheckOutEvents { 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 @@ public class CheckOutEvents { 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); } } diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java b/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java index 7c0a5ac2be..8de8d17f52 100644 --- a/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java +++ b/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java @@ -1310,12 +1310,12 @@ public class CheckOutHelper { * 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 @@ public class CheckOutHelper { 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)) { diff --git a/applications/order/webapp/ordermgr/entry/optionsettings.ftl b/applications/order/webapp/ordermgr/entry/optionsettings.ftl index 4d9401e549..7ccd5f916f 100644 --- a/applications/order/webapp/ordermgr/entry/optionsettings.ftl +++ b/applications/order/webapp/ordermgr/entry/optionsettings.ftl @@ -35,8 +35,19 @@ under the License. <#assign supplierPartyId = cart.getSupplierPartyId(shipGroupIndex)?if_exists> <#assign supplier = delegator.findByPrimaryKey("PartyGroup", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", supplierPartyId))?if_exists /> -
+ + + + + + + +
+

${uiLabelMap.OrderInternalNote}

+
+ +

${uiLabelMap.OrderShipGroup} ${uiLabelMap.CommonNbr} ${currIndex}<#if supplier?has_content> - ${supplier.groupName?default(supplier.partyId)}