[JIRA] Closed: (OFBIZ-567) Problem with approximations if the ShoppingCart.basePrice has more than three decimal digits.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Closed: (OFBIZ-567) Problem with approximations if the ShoppingCart.basePrice has more than three decimal digits.

JIRA jira@ofbiz.org
     [ http://jira.undersunconsulting.com/browse/OFBIZ-567?page=all ]
     
Jacopo Cappellato closed OFBIZ-567:
-----------------------------------

    Resolution: Duplicate

https://issues.apache.org/jira/browse/OFBIZ-224

> Problem with approximations if the ShoppingCart.basePrice has more than three decimal digits.
> ---------------------------------------------------------------------------------------------
>
>          Key: OFBIZ-567
>          URL: http://jira.undersunconsulting.com/browse/OFBIZ-567
>      Project: [OFBiz] Open For Business
>         Type: Bug
>   Components: order
>     Reporter: Jacopo Cappellato
>     Assignee: Jira Administrator
>  Attachments: wrong-approx.JPG
>
>
> There is a problem with approximations if, in the ShoppingCartItem.basePrice field, a value with more than three decimal digits is set.
> This can happen mainly for two reasons:
> 1) the price in the ProductPrice entity has three decimal digits (it is now possible because that field is now of type currency-precise)
> 2) the base price is calculated from a price rule
> The problem is that, when the order is stored in the system, the unit price is approximated to two decimal digits (in OrderItem); unfortunately all the calculations (adjustments etc.) are performed with the original value with more than three decimal digits.
> A proposed solution?
> I'm testing right now a patch that approximates to two digits the basePrice in the ShoppingCartItem.setBasePrice(...) method.
> Do you think it is the right way to go?
> Jacopo

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.undersunconsulting.com/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira