[JIRA] Commented: (OFBIZ-760) Refactor OrderReadHelper to use BigDecimal

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

[JIRA] Commented: (OFBIZ-760) Refactor OrderReadHelper to use BigDecimal

JIRA jira@ofbiz.org
     [ http://jira.undersunconsulting.com/browse/OFBIZ-760?page=comments#action_13796 ]
     
Marco Risaliti commented on OFBIZ-760:
--------------------------------------

Hi Leon,

I have seen that now the method getOrderGrandTotal() into OrderReadHelper returns a BigDecimal and so probably this issue is not more important and it was already solved.
Could you please confirm that we can close it ?

This is the source code of the method :

public BigDecimal getOrderGrandTotalBd() {
        if (totalPrice == null) {
            totalPrice = getOrderGrandTotalBd(getValidOrderItems(), getAdjustments());
        }// else already set
        return totalPrice;
    }



Thanks
Marco

> Refactor OrderReadHelper to use BigDecimal
> ------------------------------------------
>
>          Key: OFBIZ-760
>          URL: http://jira.undersunconsulting.com/browse/OFBIZ-760
>      Project: [OFBiz] Open For Business
>         Type: Bug
>   Components: order
>     Versions: SVN
>     Reporter: Leon Torres
>     Assignee: Jira Administrator

>
>
> It's time to refactor OrderReadHelper methods such as getOrderGrandTotal() to use BigDecimal when doing computation.
> Currently the invoices for an order are computed with BigDecimal. However they don't match the values from OrderReadHelper methods.
> An example: Recently I made an order where the invoice amount according to InvoiceWorker.getInvoiceTotalBd was 475.339999 before being rounded off to 475.34. This value is correct for the given items. However the total in orderview showed 475.33.

--
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