|
Author: jleroux
Date: Tue Aug 10 10:50:49 2010 New Revision: 983924 URL: http://svn.apache.org/viewvc?rev=983924&view=rev Log: "Applied fix from trunk for revision: 983920" ------------------------------------------------------------------------ r983920 | jleroux | 2010-08-10 12:43:01 +0200 (mar. 10 ao–t 2010) | 10 lignes A patch from Ren‚ Scheibe ""setShippingOption" service called from one page checkout throws Exception" (https://issues.apache.org/jira/browse/OFBIZ-3886) - OFBIZ-3886 The shippingTotal has to be a BigDecimal for the methods called... * org.ofbiz.base.util.UtilFormatOut.formatCurrency(...) * org.ofbiz.order.shoppingcart.ShoppingCart.setItemShipGroupEstimate(...) ...so in case it's null, initialize it with BigDecimal.ZERO instead of 0.00 Fixes also some JavaDoc in UtilFormatOut.java ------------------------------------------------------------------------ Modified: ofbiz/branches/release10.04/ (props changed) ofbiz/branches/release10.04/framework/base/src/org/ofbiz/base/util/UtilFormatOut.java ofbiz/branches/release10.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Propchange: ofbiz/branches/release10.04/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Aug 10 10:50:49 2010 @@ -1,3 +1,3 @@ /ofbiz/branches/addbirt:831210-885099,885686-886087 /ofbiz/branches/multitenant20100310:921280-927264 -/ofbiz/trunk:939988,939990,939999,940025,940053,940234,940248,940309,940401,940410,940425,940779,940815,940849,941007,941047,941109,941177,941199,941261,941440,941600,941999,942084,942406,942414,942671,942883-942884,943168,943271-943272,944614,944621,944623,944647,944669,944797,944895,945010,945018,945026,945118,945573,945578,945580,945582,945610,945619,945848,945852,945857,946061,946066,946073,946075,946080,946309,946313,946320,946322,946596,947004-947005,947392,947424,947679,947988,948017,948694,949174,949710,949844,950866,950870,950893,951005,951062,951098,951251,951367,951381,951672,952232,952249,952270,953294,953671,954135,954583,954733,954956,955568,956022,956206,956340,957160,958343,958514,958521,958752,958758,958769,958953,959456,960491,960997,963610,964558,965470,965916,966525,966785,967098,978806,978893,978939,979104,980641-980642,980935,981051,981104,981123,981288 +/ofbiz/trunk:939988,939990,939999,940025,940053,940234,940248,940309,940401,940410,940425,940779,940815,940849,941007,941047,941109,941177,941199,941261,941440,941600,941999,942084,942406,942414,942671,942883-942884,943168,943271-943272,944614,944621,944623,944647,944669,944797,944895,945010,945018,945026,945118,945573,945578,945580,945582,945610,945619,945848,945852,945857,946061,946066,946073,946075,946080,946309,946313,946320,946322,946596,947004-947005,947392,947424,947679,947988,948017,948694,949174,949710,949844,950866,950870,950893,951005,951062,951098,951251,951367,951381,951672,952232,952249,952270,953294,953671,954135,954583,954733,954956,955568,956022,956206,956340,957160,958343,958514,958521,958752,958758,958769,958953,959456,960491,960997,963610,964558,965470,965916,966525,966785,967098,978806,978893,978939,979104,980641-980642,980935,981051,981104,981123,981288,983920 Modified: ofbiz/branches/release10.04/framework/base/src/org/ofbiz/base/util/UtilFormatOut.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/framework/base/src/org/ofbiz/base/util/UtilFormatOut.java?rev=983924&r1=983923&r2=983924&view=diff ============================================================================== --- ofbiz/branches/release10.04/framework/base/src/org/ofbiz/base/util/UtilFormatOut.java (original) +++ ofbiz/branches/release10.04/framework/base/src/org/ofbiz/base/util/UtilFormatOut.java Tue Aug 10 10:50:49 2010 @@ -99,7 +99,7 @@ public class UtilFormatOut { } /** Formats a BigDecimal into a properly formatted currency string based on isoCode and Locale - * @param price The price double to be formatted + * @param price The price BigDecimal to be formatted * @param isoCode the currency ISO code * @param locale The Locale used to format the number * @param maximumFractionDigits The maximum number of fraction digits used; if set to -1 than the default value for the locale is used @@ -124,8 +124,8 @@ public class UtilFormatOut { return nbParsing; } - /** Formats a double into a properly formatted currency string based on isoCode and Locale - * @param price The price double to be formatted + /** Formats a BigDecimal into a properly formatted currency string based on isoCode and Locale + * @param price The price BigDecimal to be formatted * @param isoCode the currency ISO code * @param locale The Locale used to format the number * @return A String with the formatted price Modified: ofbiz/branches/release10.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=983924&r1=983923&r2=983924&view=diff ============================================================================== --- ofbiz/branches/release10.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml (original) +++ ofbiz/branches/release10.04/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Tue Aug 10 10:50:49 2010 @@ -1053,7 +1053,7 @@ under the License. Map shipCost = org.ofbiz.order.shoppingcart.shipping.ShippingEvents.getShipGroupEstimate(dispatcher, delegator, shoppingCart, 0); shippingTotal = shipCost.get("shippingTotal"); if (shippingTotal == null) { - shippingTotal = 0.00; + shippingTotal = java.math.BigDecimal.ZERO; } shoppingCart.setItemShipGroupEstimate(shippingTotal, 0); parameters.put("shippingTotal", org.ofbiz.base.util.UtilFormatOut.formatCurrency(shippingTotal, isoCode, locale)); @@ -1068,7 +1068,6 @@ under the License. cartGrandTotal = org.ofbiz.base.util.UtilFormatOut.formatCurrency(shoppingCart.getGrandTotal(), isoCode, locale); parameters.put("cartGrandTotal", cartGrandTotal); - ]]></call-bsh> <call-class-method method-name="doPromotions" class-name="org.ofbiz.order.shoppingcart.product.ProductPromoWorker"> <field field="shoppingCart" type="org.ofbiz.order.shoppingcart.ShoppingCart"/> @@ -1245,4 +1244,4 @@ under the License. <store-value value-field="loggedInUser"/> </if-compare-field> </simple-method> -</simple-methods> \ No newline at end of file +</simple-methods> |
| Free forum by Nabble | Edit this page |
