You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "nicolas malin (JIRA)" <ji...@apache.org> on 2007/06/06 10:19:26 UTC

[jira] Commented: (OFBIZ-1066) BigDecimal to Double precision problem in PaymentGatewayServices

    [ https://issues.apache.org/jira/browse/OFBIZ-1066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501846 ] 

nicolas malin commented on OFBIZ-1066:
--------------------------------------

Hi Andrew, 

Your patch is rejected in my ofbiz environment. Do you create it from svn trunk ?

I create new patch to use decimals and rounding on BigDecimal scale.

Nicolas

> BigDecimal to Double precision problem in PaymentGatewayServices
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1066
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1066
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Andrew Sykes
>            Priority: Minor
>         Attachments: PaymentGatewayServices.java, PaymentGatewayServices.java.patch
>
>
> We encountered a error where amountToCapture was not the same as the authorisation amount due to the decimal place precision. 
> This is because amountToCapture is populated from captureAmountBd, which is instantiated like this...
> BigDecimal captureAmountBd = new BigDecimal( captureAmount.doubleValue());
> This can be resolved by rounding up when we assign to amountToCapture.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.