|
Author: jleroux
Date: Tue Oct 9 10:48:41 2012 New Revision: 1395953 URL: http://svn.apache.org/viewvc?rev=1395953&view=rev Log: A patch from Leon for "Internal notes and shipping notes are lost when input an order" https://issues.apache.org/jira/browse/OFBIZ-5038 When we try to create an order, we can input internal note and shipping note in "option" form. But those information is lost when we come back to "option" setting form or when we create the order at last. The estimated delivery before/after date are not correctly set either in "option" form. 1. submit internal notes and shipping notes to order cart 2. display estimated shipping before and after date 3. avoid adding internal notes and shipping notes multiple times if submit options repeatedly 4. make it possible to empty internal note or shipping note Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.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=1395953&r1=1395952&r2=1395953&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 Tue Oct 9 10:48:41 2012 @@ -828,7 +828,8 @@ public class CheckOutEvents { if (UtilValidate.isNotEmpty(request.getParameter(shipGroupIndex + "_ship_estimate"))) { shipEstimate = new BigDecimal(request.getParameter(shipGroupIndex + "_ship_estimate")); } - + cart.clearOrderNotes(); + cart.clearInternalOrderNotes(); if (shipEstimate == null) { // allow ship estimate to be set manually if a purchase order callResult = checkOutHelper.finalizeOrderEntryOptions(shipGroupIndex, shippingMethod, shippingInstructions, maySplit, giftMessage, isGift, internalCode, shipBeforeDate, shipAfterDate, internalOrderNotes, shippingNotes); } else { 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=1395953&r1=1395952&r2=1395953&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl Tue Oct 9 10:48:41 2012 @@ -18,6 +18,7 @@ under the License. --> <#if security.hasEntityPermission("ORDERMGR", "_CREATE", session) || security.hasEntityPermission("ORDERMGR", "_PURCHASE_CREATE", session)> +<form method="post" action="<@ofbizUrl>finalizeOrder</@ofbizUrl>" name="checkoutsetupform"> <table border="0" width='100%' cellspacing='0' cellpadding='0' class='boxoutside'> <tr> <td width='100%'> @@ -36,10 +37,10 @@ under the License. </tr> <tr> <td colspan="2"> - <textarea cols="30" rows="3" name="internal_order_notes"></textarea> + <textarea cols="30" rows="3" name="internal_order_notes"><#if (cart.getInternalOrderNotes().size()>0)>${(cart.getInternalOrderNotes()[0])?if_exists}</#if></textarea> </td> <td colspan="2"> - <textarea cols="30" rows="3" name="shippingNotes"></textarea> + <textarea cols="30" rows="3" name="shippingNotes"><#if (cart.getOrderNotes().size()>0)>${(cart.getOrderNotes()[0])?if_exists}</#if></textarea> </td> </tr> </table> @@ -47,7 +48,6 @@ under the License. </tr> <tr> <td> - <form method="post" action="<@ofbizUrl>finalizeOrder</@ofbizUrl>" name="checkoutsetupform"> <input type="hidden" name="finalizeMode" value="options"/> <#list 1..cart.getShipGroupSize() as currIndex> <#assign shipGroupIndex = currIndex - 1> @@ -149,7 +149,7 @@ under the License. <tr> <td colspan="2"> <div> - <@htmlTemplate.renderDateTimeField name="sgi${shipGroupIndex?default('0')}_shipBeforeDate" event="" action="" value="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="sgi${shipGroupIndex?default('0')}_shipBeforeDate" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> + <@htmlTemplate.renderDateTimeField name="sgi${shipGroupIndex?default('0')}_shipBeforeDate" event="" action="" value="${(cart.getShipBeforeDate())?if_exists}" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="sgi${shipGroupIndex?default('0')}_shipBeforeDate" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> </div> </td> </tr> @@ -161,7 +161,7 @@ under the License. <tr> <td colspan="2"> <div> - <@htmlTemplate.renderDateTimeField name="sgi${shipGroupIndex?default('0')}_shipAfterDate" event="" action="" value="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="sgi${shipGroupIndex?default('0')}_shipAfterDate" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> + <@htmlTemplate.renderDateTimeField name="sgi${shipGroupIndex?default('0')}_shipAfterDate" event="" action="" value="${(cart.getShipAfterDate())?if_exists}" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="sgi${shipGroupIndex?default('0')}_shipAfterDate" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> </div> </td> </tr> @@ -207,14 +207,13 @@ under the License. </tr> </table> </#list> - </form> </td> </tr> </table> </td> </tr> </table> - +</form> <br /> <#else> <h3>${uiLabelMap.OrderViewPermissionError}</h3> |
| Free forum by Nabble | Edit this page |
