You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Stephen Rufle <sr...@salmonllc.com> on 2008/12/04 22:23:02 UTC

resetGrandTotal exception

I have been getting an exception [1] in resetGrandTotal. My solution was
just to convert the  updatedTotal value to a Double the way it expects.
I also did the same for remainingSubTotal

lines 1280 and 1281

Old:
orderHeader.set("grandTotal", updatedTotal);
orderHeader.set("remainingSubTotal", remainingSubTotal);

New:
orderHeader.set("grandTotal", Double.valueOf(updatedTotal.doubleValue()));
orderHeader.set("remainingSubTotal",
Double.valueOf(remainingSubTotal.doubleValue()));


Would you like this in a patch or an attachment to a JIRA issue?

[1]
In entity field [grandTotal] set the value passed in [BigDecimal] is not
compatible with the Java type of the field [Double]



 

Re: resetGrandTotal exception

Posted by BJ Freeman <bj...@free-man.net>.
can you re-create this on the demo server?

Stephen Rufle sent the following on 12/4/2008 1:23 PM:
> I have been getting an exception [1] in resetGrandTotal. My solution was
> just to convert the  updatedTotal value to a Double the way it expects.
> I also did the same for remainingSubTotal
> 
> lines 1280 and 1281
> 
> Old:
> orderHeader.set("grandTotal", updatedTotal);
> orderHeader.set("remainingSubTotal", remainingSubTotal);
> 
> New:
> orderHeader.set("grandTotal", Double.valueOf(updatedTotal.doubleValue()));
> orderHeader.set("remainingSubTotal",
> Double.valueOf(remainingSubTotal.doubleValue()));
> 
> 
> Would you like this in a patch or an attachment to a JIRA issue?
> 
> [1]
> In entity field [grandTotal] set the value passed in [BigDecimal] is not
> compatible with the Java type of the field [Double]
> 
> 
> 
>  
> 
> 

Re: resetGrandTotal exception

Posted by Stephen Rufle <sr...@salmonllc.com>.
Ok , I thought it was an easy fix :) I will just wait thanks Scott
Scott Gray wrote:
> That issue will be solved when the type clean up branch gets merged back
> (I've already completed the ordermgr component).
> Stephen, the exception you are seeing should only be a warning and not
> actually cause any problems.  I would put up with it for now (or just keep
> your local fix) and update when the branch gets merged back into the trunk.
>
> Regards
> Scott
>
>   
...

Re: resetGrandTotal exception

Posted by Scott Gray <le...@gmail.com>.
That issue will be solved when the type clean up branch gets merged back
(I've already completed the ordermgr component).
Stephen, the exception you are seeing should only be a warning and not
actually cause any problems.  I would put up with it for now (or just keep
your local fix) and update when the branch gets merged back into the trunk.

Regards
Scott

2008/12/5 Adrian Crum <ad...@hlmksw.com>

> Stephan,
>
> Please provide the stack trace. The developers are working on this issue
> and they need to know where it occurs.
>
> -Adrian
>
>
> Stephen Rufle wrote:
>
>> I have been getting an exception [1] in resetGrandTotal. My solution was
>> just to convert the  updatedTotal value to a Double the way it expects.
>> I also did the same for remainingSubTotal
>>
>> lines 1280 and 1281
>>
>> Old:
>> orderHeader.set("grandTotal", updatedTotal);
>> orderHeader.set("remainingSubTotal", remainingSubTotal);
>>
>> New:
>> orderHeader.set("grandTotal", Double.valueOf(updatedTotal.doubleValue()));
>> orderHeader.set("remainingSubTotal",
>> Double.valueOf(remainingSubTotal.doubleValue()));
>>
>>
>> Would you like this in a patch or an attachment to a JIRA issue?
>>
>> [1]
>> In entity field [grandTotal] set the value passed in [BigDecimal] is not
>> compatible with the Java type of the field [Double]
>>
>>
>>
>>
>>
>

Re: resetGrandTotal exception

Posted by Adrian Crum <ad...@hlmksw.com>.
Stephan,

Please provide the stack trace. The developers are working on this issue 
and they need to know where it occurs.

-Adrian

Stephen Rufle wrote:
> I have been getting an exception [1] in resetGrandTotal. My solution was
> just to convert the  updatedTotal value to a Double the way it expects.
> I also did the same for remainingSubTotal
> 
> lines 1280 and 1281
> 
> Old:
> orderHeader.set("grandTotal", updatedTotal);
> orderHeader.set("remainingSubTotal", remainingSubTotal);
> 
> New:
> orderHeader.set("grandTotal", Double.valueOf(updatedTotal.doubleValue()));
> orderHeader.set("remainingSubTotal",
> Double.valueOf(remainingSubTotal.doubleValue()));
> 
> 
> Would you like this in a patch or an attachment to a JIRA issue?
> 
> [1]
> In entity field [grandTotal] set the value passed in [BigDecimal] is not
> compatible with the Java type of the field [Double]
> 
> 
> 
>  
>