[
https://issues.apache.org/jira/browse/OFBIZ-10392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16462577#comment-16462577 ]
Schumann Ye commented on OFBIZ-10392:
-------------------------------------
I think the solution is found as below:
The original code below in the file FindInventoryEventPlan.groovy
// set the page parameters
viewIndex = Integer.valueOf(parameters.VIEW_INDEX ?: 0)
viewSize = parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyAsInteger("widget", "widget.form.defaultViewSize", 20)
listSize = 0
if (inventoryList)
listSize = inventoryList.size()
lowIndex = viewIndex * viewSize
highIndex = (viewIndex + 1) * viewSize
Shall be changed to
// set the page parameters
viewIndex = Integer.valueOf(parameters.VIEW_INDEX ?: 0)
viewSize = Integer.valueOf(parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyAsInteger("widget", "widget.form.defaultViewSize", 20))
listSize = 0
if (inventoryList)
listSize = inventoryList.size()
lowIndex = viewIndex * viewSize
highIndex = (viewIndex + 1) * viewSize
Then the issue would be solved.
> FindInventoryEventPlan Error
> ----------------------------
>
> Key: OFBIZ-10392
> URL:
https://issues.apache.org/jira/browse/OFBIZ-10392> Project: OFBiz
> Issue Type: Bug
> Components: manufacturing
> Affects Versions: 16.11.04
> Environment: OS: Windows Server 2008 R2
> Database: MySQL 5.7
> JDK: 1.8.0_131
> Reporter: Schumann Ye
> Priority: Major
>
> After MRP run, in the screen of "Find Inventory Event Planned", the proper results show up after clicking the "Find" button with a certain "From Date" and leaving the "Product ID" empty.
> Because there are more than 20 records (which exceeds the default viewSize 20), so there are more than 1 page.
> When I hit "Next", it shows me the following error:
> Because I am new to groovy, can you pls help me out?
> Thanks
>
> |
> |{color:#ffffff}*:ERROR MESSAGE:*{color}|
> |org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://manufacturing/widget/manufacturing/MrpScreens.xml#FindMrpPlannedEvents]: java.lang.IllegalArgumentException: Error running script at location [component://manufacturing/groovyScripts/mrp/FindInventoryEventPlan.groovy]: groovy.lang.MissingMethodException: No signature of method: java.lang.Integer.multiply() is applicable for argument types: (java.lang.String) values: [20] Possible solutions: multiply(java.lang.Number), multiply(java.lang.Character) (Error running script at location [component://manufacturing/groovyScripts/mrp/FindInventoryEventPlan.groovy]: groovy.lang.MissingMethodException: No signature of method: java.lang.Integer.multiply() is applicable for argument types: (java.lang.String) values: [20] Possible solutions: multiply(java.lang.Number), multiply(java.lang.Character))|
> |
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)