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/05/24 17:45:16 UTC

[jira] Created: (OFBIZ-1035) Price rounding, don't use UtilNumber.java for scale

Price rounding, don't use UtilNumber.java for scale
---------------------------------------------------

                 Key: OFBIZ-1035
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1035
             Project: OFBiz (The Open for Business Project)
          Issue Type: Bug
          Components: ecommerce
    Affects Versions: SVN trunk
            Reporter: nicolas malin
             Fix For: SVN trunk


Apply correction on PriceService.java. When ecommerce price use VAT, BigDecimal scale don't use UtilNumber.java .

exemple for a product price 7.53 and tax 19,6%, ecommerce price display 9.00 and order total is 9.01

Nicolas

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


[jira] Commented: (OFBIZ-1035) Price rounding, don't use UtilNumber.java for scale

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499412 ] 

Jacques Le Roux commented on OFBIZ-1035:
----------------------------------------

Nicolas,

David solves the pb, please see  http://svn.apache.org/viewvc?view=rev&rev=541997




> Price rounding, don't use UtilNumber.java for scale
> ---------------------------------------------------
>
>                 Key: OFBIZ-1035
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1035
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: ecommerce
>    Affects Versions: SVN trunk
>            Reporter: nicolas malin
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: priceRounding-ofbiz.patch, priceRounding-ofbiz.patch
>
>
> Apply correction on PriceService.java. When ecommerce price use VAT, BigDecimal scale don't use UtilNumber.java .
> exemple for a product price 7.53 and tax 19,6%, ecommerce price display 9.00 and order total is 9.01
> Nicolas

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


[jira] Commented: (OFBIZ-1035) Price rounding, don't use UtilNumber.java for scale

Posted by "nicolas malin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499291 ] 

nicolas malin commented on OFBIZ-1035:
--------------------------------------

Thanks Jacques,

I use the same jdk. For futhur patch I don't use jdk1.5 auto cast ;)


> Price rounding, don't use UtilNumber.java for scale
> ---------------------------------------------------
>
>                 Key: OFBIZ-1035
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1035
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: ecommerce
>    Affects Versions: SVN trunk
>            Reporter: nicolas malin
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: priceRounding-ofbiz.patch, priceRounding-ofbiz.patch
>
>
> Apply correction on PriceService.java. When ecommerce price use VAT, BigDecimal scale don't use UtilNumber.java .
> exemple for a product price 7.53 and tax 19,6%, ecommerce price display 9.00 and order total is 9.01
> Nicolas

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


[jira] Closed: (OFBIZ-1035) Price rounding, don't use UtilNumber.java for scale

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1035.
----------------------------------

       Resolution: Fixed
    Fix Version/s: Release Branch 4.0

Thanks Nicolas,

I'm using jdk1.5.0_11, which one are you using ?

Your patch is in trunk rev. 541606  and in release4.0 rev. 541607

> Price rounding, don't use UtilNumber.java for scale
> ---------------------------------------------------
>
>                 Key: OFBIZ-1035
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1035
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: ecommerce
>    Affects Versions: SVN trunk
>            Reporter: nicolas malin
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: priceRounding-ofbiz.patch, priceRounding-ofbiz.patch
>
>
> Apply correction on PriceService.java. When ecommerce price use VAT, BigDecimal scale don't use UtilNumber.java .
> exemple for a product price 7.53 and tax 19,6%, ecommerce price display 9.00 and order total is 9.01
> Nicolas

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


[jira] Commented: (OFBIZ-1035) Price rounding, don't use UtilNumber.java for scale

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498855 ] 

Jacques Le Roux commented on OFBIZ-1035:
----------------------------------------

Nicolas,

2 remarks : 

1. braces are missing, you should write
while (condition) {
    expression
}
please see : http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

2. It does not compile, I get  5 errors like this :

 [javac] D:\WorkspaceNew\ofbizClean\applications\product\src\org\ofbiz\product\price\PriceServices.java:642: cannot find symbol
    [javac] symbol  : method valueOf(java.lang.Double)
    [javac] location: class java.math.BigDecimal
    [javac] result.put("listPrice", BigDecimal.valueOf((Double) result.get("listPrice")).multiply(taxMultiplier).setScale( taxFinalScale, taxRounding ).doubleValue());

Sorry, I have no time to investigate, and a bit tired ;o) ...


> Price rounding, don't use UtilNumber.java for scale
> ---------------------------------------------------
>
>                 Key: OFBIZ-1035
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1035
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: ecommerce
>    Affects Versions: SVN trunk
>            Reporter: nicolas malin
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: priceRounding-ofbiz.patch
>
>
> Apply correction on PriceService.java. When ecommerce price use VAT, BigDecimal scale don't use UtilNumber.java .
> exemple for a product price 7.53 and tax 19,6%, ecommerce price display 9.00 and order total is 9.01
> Nicolas

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


[jira] Updated: (OFBIZ-1035) Price rounding, don't use UtilNumber.java for scale

Posted by "nicolas malin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

nicolas malin updated OFBIZ-1035:
---------------------------------

    Attachment: priceRounding-ofbiz.patch

> Price rounding, don't use UtilNumber.java for scale
> ---------------------------------------------------
>
>                 Key: OFBIZ-1035
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1035
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: ecommerce
>    Affects Versions: SVN trunk
>            Reporter: nicolas malin
>             Fix For: SVN trunk
>
>         Attachments: priceRounding-ofbiz.patch
>
>
> Apply correction on PriceService.java. When ecommerce price use VAT, BigDecimal scale don't use UtilNumber.java .
> exemple for a product price 7.53 and tax 19,6%, ecommerce price display 9.00 and order total is 9.01
> Nicolas

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


[jira] Commented: (OFBIZ-1035) Price rounding, don't use UtilNumber.java for scale

Posted by "nicolas malin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498981 ] 

nicolas malin commented on OFBIZ-1035:
--------------------------------------

Ok, thanks jacques. 

I recreate patch. Problem compiliation from that jdk don't autocast Double to double. I surcharge method to remove the problem.

Nicolas

> Price rounding, don't use UtilNumber.java for scale
> ---------------------------------------------------
>
>                 Key: OFBIZ-1035
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1035
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: ecommerce
>    Affects Versions: SVN trunk
>            Reporter: nicolas malin
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: priceRounding-ofbiz.patch, priceRounding-ofbiz.patch
>
>
> Apply correction on PriceService.java. When ecommerce price use VAT, BigDecimal scale don't use UtilNumber.java .
> exemple for a product price 7.53 and tax 19,6%, ecommerce price display 9.00 and order total is 9.01
> Nicolas

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


[jira] Updated: (OFBIZ-1035) Price rounding, don't use UtilNumber.java for scale

Posted by "nicolas malin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

nicolas malin updated OFBIZ-1035:
---------------------------------

    Attachment: priceRounding-ofbiz.patch

> Price rounding, don't use UtilNumber.java for scale
> ---------------------------------------------------
>
>                 Key: OFBIZ-1035
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1035
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: ecommerce
>    Affects Versions: SVN trunk
>            Reporter: nicolas malin
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: priceRounding-ofbiz.patch, priceRounding-ofbiz.patch
>
>
> Apply correction on PriceService.java. When ecommerce price use VAT, BigDecimal scale don't use UtilNumber.java .
> exemple for a product price 7.53 and tax 19,6%, ecommerce price display 9.00 and order total is 9.01
> Nicolas

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


[jira] Assigned: (OFBIZ-1035) Price rounding, don't use UtilNumber.java for scale

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reassigned OFBIZ-1035:
--------------------------------------

    Assignee: Jacques Le Roux

> Price rounding, don't use UtilNumber.java for scale
> ---------------------------------------------------
>
>                 Key: OFBIZ-1035
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1035
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: ecommerce
>    Affects Versions: SVN trunk
>            Reporter: nicolas malin
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: priceRounding-ofbiz.patch
>
>
> Apply correction on PriceService.java. When ecommerce price use VAT, BigDecimal scale don't use UtilNumber.java .
> exemple for a product price 7.53 and tax 19,6%, ecommerce price display 9.00 and order total is 9.01
> Nicolas

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


[jira] Commented: (OFBIZ-1035) Price rounding, don't use UtilNumber.java for scale

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499301 ] 

Jacques Le Roux commented on OFBIZ-1035:
----------------------------------------

Nicolas,

I wonder if we should not use source='1.5' in ant build.xm files now that officialy we do not anymore support jdk 1.4. 
I will ask on the dev ML to see opinions (auto unboxing seems to not rally everyone)

> Price rounding, don't use UtilNumber.java for scale
> ---------------------------------------------------
>
>                 Key: OFBIZ-1035
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1035
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: ecommerce
>    Affects Versions: SVN trunk
>            Reporter: nicolas malin
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: priceRounding-ofbiz.patch, priceRounding-ofbiz.patch
>
>
> Apply correction on PriceService.java. When ecommerce price use VAT, BigDecimal scale don't use UtilNumber.java .
> exemple for a product price 7.53 and tax 19,6%, ecommerce price display 9.00 and order total is 9.01
> Nicolas

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