You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Pritam Kute (Jira)" <ji...@apache.org> on 2020/06/27 11:52:00 UTC

[jira] [Commented] (OFBIZ-11843) Accept return process throwing missing method exception

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

Pritam Kute commented on OFBIZ-11843:
-------------------------------------

I have observed that for typecasting in groovy, we have used the wrong coding pattern like

{code:java}
(BigDecimal) -0.01
{code}

It should be like

{code:java}
-0.01 as BigDecimal
{code}

Making these changes fixes this issue. Let me know if I am missing anything here.

I also found one more issue at OrderReturnServices.groovy:302

Here the 'ctx' map is initialized directly with the GenericValue 'returnAdjustment'. This is throwing error as the ctx is not getting built up properly. We can fix it using following code snippet.

{code:java}
....
Map ctx = [:]
ctx << returnAdjustment
ctx.originalReturnPrice = originalReturnPrice
....
{code}


> Accept return process throwing missing method exception
> -------------------------------------------------------
>
>                 Key: OFBIZ-11843
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11843
>             Project: OFBiz
>          Issue Type: Bug
>            Reporter: Pritam Kute
>            Assignee: Pritam Kute
>            Priority: Major
>             Fix For: Trunk
>
>
> Steps to regenerate:
> 1. Open any return in requested status
> 2. Go to 'Return Items' menu
> 3. Click on the 'Accept Return' button.
> Expected Result:
> The return should be marked as accepted in the system.
> Actual:
> Error screen with error log as:
> org.apache.ofbiz.webapp.event.EventHandlerException: Service invocation error (groovy.lang.MissingMethodException: No signature of method: static java.math.BigDecimal.minus() is applicable for argument types: (BigDecimal) values: [0.01] Possible solutions: minus(java.lang.Character), minus(java.lang.Number), min(java.math.BigDecimal), plus(), signum(), find())



--
This message was sent by Atlassian Jira
(v8.3.4#803005)