Ok Scott asked me to reply.

i do not have the time and even the knowledge to fix this.

i opted to revert  to 'double' here what was the quickest, however i
agree not the perfect solution. 

Regards,
Hans

On Tue, 2010-07-06 at 20:37 +1200, Scott Gray wrote:
> If there is a risk of rounding errors then I would argue that error messages 
> in the logs are a much better alternative than hiding the problem.
> 
> Regards
> Scott
> 
> On 6/07/2010, at 7:15 PM, Hans Bakker wrote:
> 
> > I agree with you, however the problem here is that the fields in the
> > database are strings and can only be converted automatically in
> > minilanguage to double. If Bigdecimal is used the log is full of
> > conversion errors.
> > 
> > I see no easy way to correct it and i do not have much time at the
> > moment, you see a way of doing this?
> > 
> > Regards,
> > Hans
> > 
> > On Mon, 2010-07-05 at 10:38 -0700, BJ Freeman wrote:
> >> it seems there was a big effort to make everything bigdecimal to avoid 
> >> calculation errors.
> >> I can see the reason to change this just because a log create an error.
> >> it would seem more productive to solve the problem with  the log.
> >> 
> >> =========================
> >> BJ Freeman  <http://bjfreeman.elance.com>
> >> Strategic Power Office with Supplier Automation  
> >> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
> >> Specialtymarket.com  <http://www.specialtymarket.com/>
> >> Systems Integrator-- Glad to Assist
> >> 
> >> Chat  Y! messenger: bjfr33man
> >> 
> >> 
> >> hans...@apache.org sent the following on 7/5/2010 2:43 AM:
> >>> Author: hansbak
> >>> Date: Mon Jul  5 09:43:48 2010
> >>> New Revision: 960502
> >>> 
> >>> URL: http://svn.apache.org/viewvc?rev=960502&view=rev
> >>> Log:
> >>> change the type bigdecimal to double to avoid conversion errors in the log
> >>> 
> >>> Modified:
> >>>     
> >>> ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml
> >>> 
> >>> Modified: 
> >>> ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml
> >>> URL: 
> >>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml?rev=960502&r1=960501&r2=960502&view=diff
> >>> ==============================================================================
> >>> --- 
> >>> ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml
> >>>  (original)
> >>> +++ 
> >>> ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml
> >>>  Mon Jul  5 09:43:48 2010
> >>> @@ -185,12 +185,12 @@ under the License.
> >>>                                  <if-not-empty field="partyRates">
> >>>                                      <first-from-list entry="partyRate" 
> >>> list="partyRates"/>
> >>>                                      <if-not-empty 
> >>> field="partyRate.percentageUsed">
> >>> -<calculate field="timeEntry.hours" type="BigDecimal">
> >>> +<calculate field="timeEntry.hours" type="Double">
> >>>                                              <calcop operator="multiply" 
> >>> field="timeEntry.hours">
> >>>                                                  <calcop operator="get" 
> >>> field="partyRate.percentageUsed"/>
> >>>                                              </calcop>
> >>>                                          </calculate>
> >>> -<calculate field="timeEntry.hours" type="BigDecimal">
> >>> +<calculate field="timeEntry.hours" type="Double">
> >>>                                              <calcop operator="divide" 
> >>> field="timeEntry.hours">
> >>>                                                  <number value="100"/>
> >>>                                              </calcop>
> >>> 
> >>> 
> >>> 
> >> 
> > 
> > -- 
> > Ofbiz on twitter: http://twitter.com/apache_ofbiz
> > Myself on twitter: http://twitter.com/hansbak
> > Antwebsystems.com: Quality services for competitive rates.
> > 
> 

-- 
Ofbiz on twitter: http://twitter.com/apache_ofbiz
Myself on twitter: http://twitter.com/hansbak
Antwebsystems.com: Quality services for competitive rates.

Reply via email to