Author: adrianc
Date: Fri Aug 17 10:02:55 2007 New Revision: 567087 URL: http://svn.apache.org/viewvc?view=rev&rev=567087 Log: Trivial code cleanups from Bilgin Ibryam, OFBIZ-1212. Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/minicart.ftl Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?view=diff&rev=567087&r1=567086&r2=567087 ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Fri Aug 17 10:02:55 2007 @@ -608,7 +608,7 @@ if(techDataCalendar == null ) { techDataCalendar = delegator.makeValue("TechDataCalendar", null); Debug.logInfo("create techdata calendar because it does not exist",module); - String calendarId = delegator.getNextSeqId("techDataCalendar"); + String calendarId = delegator.getNextSeqId("TechDataCalendar"); techDataCalendar.set("calendarId", calendarId); toBeStored.add(techDataCalendar); Debug.logInfo("update fixed Asset",module); @@ -1448,7 +1448,6 @@ createOrderAdjContext.put("shipGroupSeqId", "_NA_"); createOrderAdjContext.put("description", "Tax adjustment due to order change"); createOrderAdjContext.put("amount", new Double(orderTaxDifference.doubleValue())); - createOrderAdjContext.put("amount", new Double(orderTaxDifference.doubleValue())); createOrderAdjContext.put("userLogin", userLogin); Map createOrderAdjResponse = null; try { @@ -1753,10 +1752,6 @@ } if (orderItemShipGroupAssocs != null) { - if (orderItemShipGroupAssocs == null) { - return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderErrorCannotCancelItemItemNotFound", UtilMisc.toMap("itemMsgInfo",itemMsgInfo), locale)); - } - Iterator i = orderItemShipGroupAssocs.iterator(); while (i.hasNext()) { GenericValue orderItemShipGroupAssoc = (GenericValue) i.next(); @@ -1819,6 +1814,8 @@ return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderInvalidCancelQuantityCannotCancel", UtilMisc.toMap("thisCancelQty",thisCancelQty), locale)); } } + } else { + return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderErrorCannotCancelItemItemNotFound", UtilMisc.toMap("itemMsgInfo",itemMsgInfo), locale)); } return ServiceUtil.returnSuccess(); Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/minicart.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/minicart.ftl?view=diff&rev=567087&r1=567086&r2=567087 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/minicart.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/minicart.ftl Fri Aug 17 10:02:55 2007 @@ -56,7 +56,7 @@ <td align="right" valign="top"><div class="tabletext"><@ofbizCurrency amount=cartLine.getDisplayItemSubTotal() isoCode=shoppingCart.getCurrency()/></div></td> </tr> <#if cartLine.getReservStart()?exists> - <tr><td> </td><td colspan="2"><div class="tabletext">(${cartLine.getReservStart()?string("yyyy-MM-dd")}, ${cartLine.getReservLength()} ${uiLabelMap.CommonDays})</div></td></tr> + <tr><td> </td><td colspan="2"><div class="tabletext">(${cartLine.getReservStart()?string("yyyy-MM-dd")}, ${cartLine.getReservLength()} <#if cartLine.getReservLength() == 1>${uiLabelMap.CommonDay}<#else/>${uiLabelMap.CommonDays}</#if>)</div></td></tr> </#if> </#list> <tr> |
Free forum by Nabble | Edit this page |