Hi David
The reason I wanted to do get rid of the ui performing any rounding was that I couldn't see why it was necessary when it is the responsibility of the logic supplying the numbers to make sure they are correct in the first place. If for some strange reason an order total is being worked out to $97.3459 do we want the ui to hide that from us? Initially I created a patch to allow us to specify the decimal places using ofbizCurrencyTransform in ftl's ( https://issues.apache.org/jira/browse/OFBIZ-939) but then I started wondering why we need the ui to do any rounding for us. Regards Scott On 09/05/07, David E Jones <[hidden email]> wrote: > > > Do we really want to commit this patch, and have OFBiz display all > currency values with 10 decimal figures? > > My opinion is: definitely no. > > If we want to display more decimal digits in certain places we should add > an optional attribute/parameter to the transform and then specify it > explicitly in certain spots, like 3 or 4 or based on db data number of > digits. > > -David > > > Scott Gray wrote: > > I've committed the changes in rev. 535415 > > > > As I mentioned above, someone with framework commit privileges needs to > > look at the rounding of displayed currency. I've attached a patch with > > the changes I think are needed. If it doesn't see any action in the > > short term I'll throw it in the jira. > > > > Regards > > Scott > > > > On 05/05/07, *Scott Gray* <[hidden email] <mailto:[hidden email]>> > > wrote: > > > > I had planned on working the patch in this weekend, I just need to > > clean it up a bit. > > > > One thing I need a framework guy to look at is the rounding currency > > formatting in widgets and the freemarker transform, I think we need > > to set the default to something like 10 decimal places instead of > > the currency's default. That way any rounding problems aren't > > hidden by the display code and it also allows us to display tax > > items to 3 decimal places (or whatever the arithmetic.properties has > > set). > > > > Also, salestax.calc.decimals is a bit of misnomer considering the > > best we can do when storing intermediate tax is currency-precise at > > 3 decimal places. > > > > And yes I did get paid (tax free, for the moment at least) :-) > > > > Regards > > Scott > > > > > > On 05/05/07, *Jacopo Cappellato* < [hidden email] > > <mailto:[hidden email]>> wrote: > > > > Yes, > > > > and, Scott, did you get your 500$ ? :-) > > > > Jacopo > > > > David E Jones wrote: > > > > > > Scott, > > > > > > Did this ever make it into OFBiz? I only reviewed it briefly, > > but if it > > > is fixing this problem then it would be great to have it in > > the ofbiz > > > trunk. > > > > > > -David > > > > > > > > > > |
It's a good point... we shouldn't need to round in the UI because what is underneath should have things rounded in advance. What do others think? Should we display full values everywhere, or selectively, or perhaps just in the Entity Data Maint stuff in WebTools, or something else? -David Scott Gray wrote: > Hi David > > The reason I wanted to do get rid of the ui performing any rounding was > that > I couldn't see why it was necessary when it is the responsibility of the > logic supplying the numbers to make sure they are correct in the first > place. > > If for some strange reason an order total is being worked out to > $97.3459 do > we want the ui to hide that from us? > > Initially I created a patch to allow us to specify the decimal places using > ofbizCurrencyTransform in ftl's ( > https://issues.apache.org/jira/browse/OFBIZ-939) but then I started > wondering why we need the ui to do any rounding for us. > > Regards > Scott > > On 09/05/07, David E Jones <[hidden email]> wrote: >> >> >> Do we really want to commit this patch, and have OFBiz display all >> currency values with 10 decimal figures? >> >> My opinion is: definitely no. >> >> If we want to display more decimal digits in certain places we should add >> an optional attribute/parameter to the transform and then specify it >> explicitly in certain spots, like 3 or 4 or based on db data number of >> digits. >> >> -David >> >> >> Scott Gray wrote: >> > I've committed the changes in rev. 535415 >> > >> > As I mentioned above, someone with framework commit privileges needs to >> > look at the rounding of displayed currency. I've attached a patch with >> > the changes I think are needed. If it doesn't see any action in the >> > short term I'll throw it in the jira. >> > >> > Regards >> > Scott >> > >> > On 05/05/07, *Scott Gray* <[hidden email] >> <mailto:[hidden email]>> >> > wrote: >> > >> > I had planned on working the patch in this weekend, I just need to >> > clean it up a bit. >> > >> > One thing I need a framework guy to look at is the rounding >> currency >> > formatting in widgets and the freemarker transform, I think we need >> > to set the default to something like 10 decimal places instead of >> > the currency's default. That way any rounding problems aren't >> > hidden by the display code and it also allows us to display tax >> > items to 3 decimal places (or whatever the arithmetic.properties >> has >> > set). >> > >> > Also, salestax.calc.decimals is a bit of misnomer considering the >> > best we can do when storing intermediate tax is currency-precise at >> > 3 decimal places. >> > >> > And yes I did get paid (tax free, for the moment at least) :-) >> > >> > Regards >> > Scott >> > >> > >> > On 05/05/07, *Jacopo Cappellato* < [hidden email] >> > <mailto:[hidden email]>> wrote: >> > >> > Yes, >> > >> > and, Scott, did you get your 500$ ? :-) >> > >> > Jacopo >> > >> > David E Jones wrote: >> > > >> > > Scott, >> > > >> > > Did this ever make it into OFBiz? I only reviewed it >> briefly, >> > but if it >> > > is fixing this problem then it would be great to have it in >> > the ofbiz >> > > trunk. >> > > >> > > -David >> > > >> > >> > >> > >> > |
I would say to display unrounded (by the ui) numbers everywhere in the
trunk version, to help us to spot out hidden issues; and leave things as they are now in the release branch. Jacopo David E Jones wrote: > > It's a good point... we shouldn't need to round in the UI because what > is underneath should have things rounded in advance. > > What do others think? Should we display full values everywhere, or > selectively, or perhaps just in the Entity Data Maint stuff in WebTools, > or something else? > > -David > > > Scott Gray wrote: >> Hi David >> >> The reason I wanted to do get rid of the ui performing any rounding >> was that >> I couldn't see why it was necessary when it is the responsibility of the >> logic supplying the numbers to make sure they are correct in the first >> place. >> >> If for some strange reason an order total is being worked out to >> $97.3459 do >> we want the ui to hide that from us? >> >> Initially I created a patch to allow us to specify the decimal places >> using >> ofbizCurrencyTransform in ftl's ( >> https://issues.apache.org/jira/browse/OFBIZ-939) but then I started >> wondering why we need the ui to do any rounding for us. >> >> Regards >> Scott >> >> On 09/05/07, David E Jones <[hidden email]> wrote: >>> >>> >>> Do we really want to commit this patch, and have OFBiz display all >>> currency values with 10 decimal figures? >>> >>> My opinion is: definitely no. >>> >>> If we want to display more decimal digits in certain places we should >>> add >>> an optional attribute/parameter to the transform and then specify it >>> explicitly in certain spots, like 3 or 4 or based on db data number of >>> digits. >>> >>> -David >>> >>> >>> Scott Gray wrote: >>> > I've committed the changes in rev. 535415 >>> > >>> > As I mentioned above, someone with framework commit privileges >>> needs to >>> > look at the rounding of displayed currency. I've attached a patch >>> with >>> > the changes I think are needed. If it doesn't see any action in the >>> > short term I'll throw it in the jira. >>> > >>> > Regards >>> > Scott >>> > >>> > On 05/05/07, *Scott Gray* <[hidden email] >>> <mailto:[hidden email]>> >>> > wrote: >>> > >>> > I had planned on working the patch in this weekend, I just need to >>> > clean it up a bit. >>> > >>> > One thing I need a framework guy to look at is the rounding >>> currency >>> > formatting in widgets and the freemarker transform, I think we >>> need >>> > to set the default to something like 10 decimal places instead of >>> > the currency's default. That way any rounding problems aren't >>> > hidden by the display code and it also allows us to display tax >>> > items to 3 decimal places (or whatever the >>> arithmetic.properties has >>> > set). >>> > >>> > Also, salestax.calc.decimals is a bit of misnomer considering the >>> > best we can do when storing intermediate tax is >>> currency-precise at >>> > 3 decimal places. >>> > >>> > And yes I did get paid (tax free, for the moment at least) :-) >>> > >>> > Regards >>> > Scott >>> > >>> > >>> > On 05/05/07, *Jacopo Cappellato* < [hidden email] >>> > <mailto:[hidden email]>> wrote: >>> > >>> > Yes, >>> > >>> > and, Scott, did you get your 500$ ? :-) >>> > >>> > Jacopo >>> > >>> > David E Jones wrote: >>> > > >>> > > Scott, >>> > > >>> > > Did this ever make it into OFBiz? I only reviewed it >>> briefly, >>> > but if it >>> > > is fixing this problem then it would be great to have it in >>> > the ofbiz >>> > > trunk. >>> > > >>> > > -David >>> > > >>> > >>> > >>> > >>> >> |
+1 to David and Jacopo's solution.
When the quantity is huge, 10 decimals may not be enough. Shi Jinghai/Beijing Langhua Ltd. 在 2007-05-09三的 09:20 +0200,Jacopo Cappellato写道: > I would say to display unrounded (by the ui) numbers everywhere in the > trunk version, to help us to spot out hidden issues; and leave things as > they are now in the release branch. > > Jacopo > > > David E Jones wrote: > > > > It's a good point... we shouldn't need to round in the UI because what > > is underneath should have things rounded in advance. > > > > What do others think? Should we display full values everywhere, or > > selectively, or perhaps just in the Entity Data Maint stuff in WebTools, > > or something else? > > > > -David > > > > > > Scott Gray wrote: > >> Hi David > >> > >> The reason I wanted to do get rid of the ui performing any rounding > >> was that > >> I couldn't see why it was necessary when it is the responsibility of the > >> logic supplying the numbers to make sure they are correct in the first > >> place. > >> > >> If for some strange reason an order total is being worked out to > >> $97.3459 do > >> we want the ui to hide that from us? > >> > >> Initially I created a patch to allow us to specify the decimal places > >> using > >> ofbizCurrencyTransform in ftl's ( > >> https://issues.apache.org/jira/browse/OFBIZ-939) but then I started > >> wondering why we need the ui to do any rounding for us. > >> > >> Regards > >> Scott > >> > >> On 09/05/07, David E Jones <[hidden email]> wrote: > >>> > >>> > >>> Do we really want to commit this patch, and have OFBiz display all > >>> currency values with 10 decimal figures? > >>> > >>> My opinion is: definitely no. > >>> > >>> If we want to display more decimal digits in certain places we should > >>> add > >>> an optional attribute/parameter to the transform and then specify it > >>> explicitly in certain spots, like 3 or 4 or based on db data number of > >>> digits. > >>> > >>> -David > >>> > >>> > >>> Scott Gray wrote: > >>> > I've committed the changes in rev. 535415 > >>> > > >>> > As I mentioned above, someone with framework commit privileges > >>> needs to > >>> > look at the rounding of displayed currency. I've attached a patch > >>> with > >>> > the changes I think are needed. If it doesn't see any action in the > >>> > short term I'll throw it in the jira. > >>> > > >>> > Regards > >>> > Scott > >>> > > >>> > On 05/05/07, *Scott Gray* <[hidden email] > >>> <mailto:[hidden email]>> > >>> > wrote: > >>> > > >>> > I had planned on working the patch in this weekend, I just need to > >>> > clean it up a bit. > >>> > > >>> > One thing I need a framework guy to look at is the rounding > >>> currency > >>> > formatting in widgets and the freemarker transform, I think we > >>> need > >>> > to set the default to something like 10 decimal places instead of > >>> > the currency's default. That way any rounding problems aren't > >>> > hidden by the display code and it also allows us to display tax > >>> > items to 3 decimal places (or whatever the > >>> arithmetic.properties has > >>> > set). > >>> > > >>> > Also, salestax.calc.decimals is a bit of misnomer considering the > >>> > best we can do when storing intermediate tax is > >>> currency-precise at > >>> > 3 decimal places. > >>> > > >>> > And yes I did get paid (tax free, for the moment at least) :-) > >>> > > >>> > Regards > >>> > Scott > >>> > > >>> > > >>> > On 05/05/07, *Jacopo Cappellato* < [hidden email] > >>> > <mailto:[hidden email]>> wrote: > >>> > > >>> > Yes, > >>> > > >>> > and, Scott, did you get your 500$ ? :-) > >>> > > >>> > Jacopo > >>> > > >>> > David E Jones wrote: > >>> > > > >>> > > Scott, > >>> > > > >>> > > Did this ever make it into OFBiz? I only reviewed it > >>> briefly, > >>> > but if it > >>> > > is fixing this problem then it would be great to have it in > >>> > the ofbiz > >>> > > trunk. > >>> > > > >>> > > -David > >>> > > > >>> > > >>> > > >>> > > >>> > >> > > |
In reply to this post by David E Jones
David, Scott, all,
is it ok to commit Scott's patch only in the trunk (not in the release branch) as a temporary change to help us to figure out all the areas where rounding needs to be fixes? Jacopo David E Jones wrote: > > It's a good point... we shouldn't need to round in the UI because what > is underneath should have things rounded in advance. > > What do others think? Should we display full values everywhere, or > selectively, or perhaps just in the Entity Data Maint stuff in WebTools, > or something else? > > -David > > > Scott Gray wrote: >> Hi David >> >> The reason I wanted to do get rid of the ui performing any rounding >> was that >> I couldn't see why it was necessary when it is the responsibility of the >> logic supplying the numbers to make sure they are correct in the first >> place. >> >> If for some strange reason an order total is being worked out to >> $97.3459 do >> we want the ui to hide that from us? >> >> Initially I created a patch to allow us to specify the decimal places >> using >> ofbizCurrencyTransform in ftl's ( >> https://issues.apache.org/jira/browse/OFBIZ-939) but then I started >> wondering why we need the ui to do any rounding for us. >> >> Regards >> Scott >> >> On 09/05/07, David E Jones <[hidden email]> wrote: >>> >>> >>> Do we really want to commit this patch, and have OFBiz display all >>> currency values with 10 decimal figures? >>> >>> My opinion is: definitely no. >>> >>> If we want to display more decimal digits in certain places we should >>> add >>> an optional attribute/parameter to the transform and then specify it >>> explicitly in certain spots, like 3 or 4 or based on db data number of >>> digits. >>> >>> -David >>> >>> >>> Scott Gray wrote: >>> > I've committed the changes in rev. 535415 >>> > >>> > As I mentioned above, someone with framework commit privileges >>> needs to >>> > look at the rounding of displayed currency. I've attached a patch >>> with >>> > the changes I think are needed. If it doesn't see any action in the >>> > short term I'll throw it in the jira. >>> > >>> > Regards >>> > Scott >>> > >>> > On 05/05/07, *Scott Gray* <[hidden email] >>> <mailto:[hidden email]>> >>> > wrote: >>> > >>> > I had planned on working the patch in this weekend, I just need to >>> > clean it up a bit. >>> > >>> > One thing I need a framework guy to look at is the rounding >>> currency >>> > formatting in widgets and the freemarker transform, I think we >>> need >>> > to set the default to something like 10 decimal places instead of >>> > the currency's default. That way any rounding problems aren't >>> > hidden by the display code and it also allows us to display tax >>> > items to 3 decimal places (or whatever the >>> arithmetic.properties has >>> > set). >>> > >>> > Also, salestax.calc.decimals is a bit of misnomer considering the >>> > best we can do when storing intermediate tax is >>> currency-precise at >>> > 3 decimal places. >>> > >>> > And yes I did get paid (tax free, for the moment at least) :-) >>> > >>> > Regards >>> > Scott >>> > >>> > >>> > On 05/05/07, *Jacopo Cappellato* < [hidden email] >>> > <mailto:[hidden email]>> wrote: >>> > >>> > Yes, >>> > >>> > and, Scott, did you get your 500$ ? :-) >>> > >>> > Jacopo >>> > >>> > David E Jones wrote: >>> > > >>> > > Scott, >>> > > >>> > > Did this ever make it into OFBiz? I only reviewed it >>> briefly, >>> > but if it >>> > > is fixing this problem then it would be great to have it in >>> > the ofbiz >>> > > trunk. >>> > > >>> > > -David >>> > > >>> > >>> > >>> > >>> >> |
Jacopo,
Obviously I'm a +1 for the trunk, but it is important to note that even if this doesn't go into 4.0 something similar will need to be implemented so that invoice item tax can be displayed to 3 decimal places. For the record I would prefer it if this went into 4.0 as well Regards Scott On 21/05/07, Jacopo Cappellato <[hidden email]> wrote: > > David, Scott, all, > > is it ok to commit Scott's patch only in the trunk (not in the release > branch) as a temporary change to help us to figure out all the areas > where rounding needs to be fixes? > > Jacopo > > David E Jones wrote: > > > > It's a good point... we shouldn't need to round in the UI because what > > is underneath should have things rounded in advance. > > > > What do others think? Should we display full values everywhere, or > > selectively, or perhaps just in the Entity Data Maint stuff in WebTools, > > or something else? > > > > -David > > > > > > Scott Gray wrote: > >> Hi David > >> > >> The reason I wanted to do get rid of the ui performing any rounding > >> was that > >> I couldn't see why it was necessary when it is the responsibility of > the > >> logic supplying the numbers to make sure they are correct in the first > >> place. > >> > >> If for some strange reason an order total is being worked out to > >> $97.3459 do > >> we want the ui to hide that from us? > >> > >> Initially I created a patch to allow us to specify the decimal places > >> using > >> ofbizCurrencyTransform in ftl's ( > >> https://issues.apache.org/jira/browse/OFBIZ-939) but then I started > >> wondering why we need the ui to do any rounding for us. > >> > >> Regards > >> Scott > >> > >> On 09/05/07, David E Jones <[hidden email]> wrote: > >>> > >>> > >>> Do we really want to commit this patch, and have OFBiz display all > >>> currency values with 10 decimal figures? > >>> > >>> My opinion is: definitely no. > >>> > >>> If we want to display more decimal digits in certain places we should > >>> add > >>> an optional attribute/parameter to the transform and then specify it > >>> explicitly in certain spots, like 3 or 4 or based on db data number of > >>> digits. > >>> > >>> -David > >>> > >>> > >>> Scott Gray wrote: > >>> > I've committed the changes in rev. 535415 > >>> > > >>> > As I mentioned above, someone with framework commit privileges > >>> needs to > >>> > look at the rounding of displayed currency. I've attached a patch > >>> with > >>> > the changes I think are needed. If it doesn't see any action in the > >>> > short term I'll throw it in the jira. > >>> > > >>> > Regards > >>> > Scott > >>> > > >>> > On 05/05/07, *Scott Gray* <[hidden email] > >>> <mailto:[hidden email]>> > >>> > wrote: > >>> > > >>> > I had planned on working the patch in this weekend, I just need > to > >>> > clean it up a bit. > >>> > > >>> > One thing I need a framework guy to look at is the rounding > >>> currency > >>> > formatting in widgets and the freemarker transform, I think we > >>> need > >>> > to set the default to something like 10 decimal places instead > of > >>> > the currency's default. That way any rounding problems aren't > >>> > hidden by the display code and it also allows us to display tax > >>> > items to 3 decimal places (or whatever the > >>> arithmetic.properties has > >>> > set). > >>> > > >>> > Also, salestax.calc.decimals is a bit of misnomer considering > the > >>> > best we can do when storing intermediate tax is > >>> currency-precise at > >>> > 3 decimal places. > >>> > > >>> > And yes I did get paid (tax free, for the moment at least) :-) > >>> > > >>> > Regards > >>> > Scott > >>> > > >>> > > >>> > On 05/05/07, *Jacopo Cappellato* < [hidden email] > >>> > <mailto:[hidden email]>> wrote: > >>> > > >>> > Yes, > >>> > > >>> > and, Scott, did you get your 500$ ? :-) > >>> > > >>> > Jacopo > >>> > > >>> > David E Jones wrote: > >>> > > > >>> > > Scott, > >>> > > > >>> > > Did this ever make it into OFBiz? I only reviewed it > >>> briefly, > >>> > but if it > >>> > > is fixing this problem then it would be great to have it > in > >>> > the ofbiz > >>> > > trunk. > >>> > > > >>> > > -David > >>> > > > >>> > > >>> > > >>> > > >>> > >> > > > |
In reply to this post by Jacopo Cappellato
I think it is good for now. The result will be more complaints about digits existing that shouldn't be there, which is great because that will expose the places where rounding should be done but isn't being done. -David Jacopo Cappellato wrote: > David, Scott, all, > > is it ok to commit Scott's patch only in the trunk (not in the release > branch) as a temporary change to help us to figure out all the areas > where rounding needs to be fixes? > > Jacopo > > David E Jones wrote: >> >> It's a good point... we shouldn't need to round in the UI because what >> is underneath should have things rounded in advance. >> >> What do others think? Should we display full values everywhere, or >> selectively, or perhaps just in the Entity Data Maint stuff in >> WebTools, or something else? >> >> -David >> >> >> Scott Gray wrote: >>> Hi David >>> >>> The reason I wanted to do get rid of the ui performing any rounding >>> was that >>> I couldn't see why it was necessary when it is the responsibility of the >>> logic supplying the numbers to make sure they are correct in the first >>> place. >>> >>> If for some strange reason an order total is being worked out to >>> $97.3459 do >>> we want the ui to hide that from us? >>> >>> Initially I created a patch to allow us to specify the decimal places >>> using >>> ofbizCurrencyTransform in ftl's ( >>> https://issues.apache.org/jira/browse/OFBIZ-939) but then I started >>> wondering why we need the ui to do any rounding for us. >>> >>> Regards >>> Scott >>> >>> On 09/05/07, David E Jones <[hidden email]> wrote: >>>> >>>> >>>> Do we really want to commit this patch, and have OFBiz display all >>>> currency values with 10 decimal figures? >>>> >>>> My opinion is: definitely no. >>>> >>>> If we want to display more decimal digits in certain places we >>>> should add >>>> an optional attribute/parameter to the transform and then specify it >>>> explicitly in certain spots, like 3 or 4 or based on db data number of >>>> digits. >>>> >>>> -David >>>> >>>> >>>> Scott Gray wrote: >>>> > I've committed the changes in rev. 535415 >>>> > >>>> > As I mentioned above, someone with framework commit privileges >>>> needs to >>>> > look at the rounding of displayed currency. I've attached a patch >>>> with >>>> > the changes I think are needed. If it doesn't see any action in the >>>> > short term I'll throw it in the jira. >>>> > >>>> > Regards >>>> > Scott >>>> > >>>> > On 05/05/07, *Scott Gray* <[hidden email] >>>> <mailto:[hidden email]>> >>>> > wrote: >>>> > >>>> > I had planned on working the patch in this weekend, I just >>>> need to >>>> > clean it up a bit. >>>> > >>>> > One thing I need a framework guy to look at is the rounding >>>> currency >>>> > formatting in widgets and the freemarker transform, I think we >>>> need >>>> > to set the default to something like 10 decimal places instead of >>>> > the currency's default. That way any rounding problems aren't >>>> > hidden by the display code and it also allows us to display tax >>>> > items to 3 decimal places (or whatever the >>>> arithmetic.properties has >>>> > set). >>>> > >>>> > Also, salestax.calc.decimals is a bit of misnomer considering the >>>> > best we can do when storing intermediate tax is >>>> currency-precise at >>>> > 3 decimal places. >>>> > >>>> > And yes I did get paid (tax free, for the moment at least) :-) >>>> > >>>> > Regards >>>> > Scott >>>> > >>>> > >>>> > On 05/05/07, *Jacopo Cappellato* < [hidden email] >>>> > <mailto:[hidden email]>> wrote: >>>> > >>>> > Yes, >>>> > >>>> > and, Scott, did you get your 500$ ? :-) >>>> > >>>> > Jacopo >>>> > >>>> > David E Jones wrote: >>>> > > >>>> > > Scott, >>>> > > >>>> > > Did this ever make it into OFBiz? I only reviewed it >>>> briefly, >>>> > but if it >>>> > > is fixing this problem then it would be great to have >>>> it in >>>> > the ofbiz >>>> > > trunk. >>>> > > >>>> > > -David >>>> > > >>>> > >>>> > >>>> > >>>> >>> > > |
Scott,
do you have a patch for this? I'm sorry but I can't find it. Is the solution proposed by Leon different from your? https://issues.apache.org/jira/browse/OFBIZ-1007 Jacopo David E Jones wrote: > > I think it is good for now. The result will be more complaints about > digits existing that shouldn't be there, which is great because that > will expose the places where rounding should be done but isn't being done. > > -David > > > > Jacopo Cappellato wrote: >> David, Scott, all, >> >> is it ok to commit Scott's patch only in the trunk (not in the release >> branch) as a temporary change to help us to figure out all the areas >> where rounding needs to be fixes? >> >> Jacopo >> >> David E Jones wrote: >>> >>> It's a good point... we shouldn't need to round in the UI because >>> what is underneath should have things rounded in advance. >>> >>> What do others think? Should we display full values everywhere, or >>> selectively, or perhaps just in the Entity Data Maint stuff in >>> WebTools, or something else? >>> >>> -David >>> >>> >>> Scott Gray wrote: >>>> Hi David >>>> >>>> The reason I wanted to do get rid of the ui performing any rounding >>>> was that >>>> I couldn't see why it was necessary when it is the responsibility of >>>> the >>>> logic supplying the numbers to make sure they are correct in the first >>>> place. >>>> >>>> If for some strange reason an order total is being worked out to >>>> $97.3459 do >>>> we want the ui to hide that from us? >>>> >>>> Initially I created a patch to allow us to specify the decimal >>>> places using >>>> ofbizCurrencyTransform in ftl's ( >>>> https://issues.apache.org/jira/browse/OFBIZ-939) but then I started >>>> wondering why we need the ui to do any rounding for us. >>>> >>>> Regards >>>> Scott >>>> >>>> On 09/05/07, David E Jones <[hidden email]> wrote: >>>>> >>>>> >>>>> Do we really want to commit this patch, and have OFBiz display all >>>>> currency values with 10 decimal figures? >>>>> >>>>> My opinion is: definitely no. >>>>> >>>>> If we want to display more decimal digits in certain places we >>>>> should add >>>>> an optional attribute/parameter to the transform and then specify it >>>>> explicitly in certain spots, like 3 or 4 or based on db data number of >>>>> digits. >>>>> >>>>> -David >>>>> >>>>> >>>>> Scott Gray wrote: >>>>> > I've committed the changes in rev. 535415 >>>>> > >>>>> > As I mentioned above, someone with framework commit privileges >>>>> needs to >>>>> > look at the rounding of displayed currency. I've attached a >>>>> patch with >>>>> > the changes I think are needed. If it doesn't see any action in the >>>>> > short term I'll throw it in the jira. >>>>> > >>>>> > Regards >>>>> > Scott >>>>> > >>>>> > On 05/05/07, *Scott Gray* <[hidden email] >>>>> <mailto:[hidden email]>> >>>>> > wrote: >>>>> > >>>>> > I had planned on working the patch in this weekend, I just >>>>> need to >>>>> > clean it up a bit. >>>>> > >>>>> > One thing I need a framework guy to look at is the rounding >>>>> currency >>>>> > formatting in widgets and the freemarker transform, I think >>>>> we need >>>>> > to set the default to something like 10 decimal places >>>>> instead of >>>>> > the currency's default. That way any rounding problems aren't >>>>> > hidden by the display code and it also allows us to display tax >>>>> > items to 3 decimal places (or whatever the >>>>> arithmetic.properties has >>>>> > set). >>>>> > >>>>> > Also, salestax.calc.decimals is a bit of misnomer considering >>>>> the >>>>> > best we can do when storing intermediate tax is >>>>> currency-precise at >>>>> > 3 decimal places. >>>>> > >>>>> > And yes I did get paid (tax free, for the moment at least) :-) >>>>> > >>>>> > Regards >>>>> > Scott >>>>> > >>>>> > >>>>> > On 05/05/07, *Jacopo Cappellato* < [hidden email] >>>>> > <mailto:[hidden email]>> wrote: >>>>> > >>>>> > Yes, >>>>> > >>>>> > and, Scott, did you get your 500$ ? :-) >>>>> > >>>>> > Jacopo >>>>> > >>>>> > David E Jones wrote: >>>>> > > >>>>> > > Scott, >>>>> > > >>>>> > > Did this ever make it into OFBiz? I only reviewed it >>>>> briefly, >>>>> > but if it >>>>> > > is fixing this problem then it would be great to have >>>>> it in >>>>> > the ofbiz >>>>> > > trunk. >>>>> > > >>>>> > > -David >>>>> > > >>>>> > >>>>> > >>>>> > >>>>> >>>> >> |
Hi Jacopo
I've attached the patch I haven't really looked at Leon's solution but I believe it's a different approach. Regards Scott On 22/05/07,
Jacopo Cappellato <[hidden email]> wrote: Scott, currencyDisplay.patch (3K) Download Attachment |
Free forum by Nabble | Edit this page |