From 0cdcfb69ce4975ced83d9c868b00407085ae596f Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Mon, 14 Dec 2015 06:53:06 +0000 Subject: [PATCH] A patch from Francis Douet for "Error on Accounting reports for Cash transactions." https://issues.apache.org/jira/browse/OFBIZ-6765 An error is displayed on Accounting reports for Cash transactions: _Error running script at location component://accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy: java.lang.IllegalArgumentException: argument type mismatch_ How to reproduce: create a new cash transaction and go to the Cash Flow Statement report. eg https://demo-trunk-ofbiz.apache.org/accounting/control/CashFlowStatement?organizationPartyId=Company The attached patch addresses the issue. I believe this is related to OFBIZ-5781. jleroux: thanks also to Pierre Smits who spotted an issue with initial Francis's patch git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1719857 13f79535-47bb-0310-9956-ffa450edef68 --- .../accounting/WEB-INF/actions/reports/CashFlowStatement.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy index b17a88db06..b9def7d8d3 100644 --- a/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy +++ b/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CashFlowStatement.groovy @@ -193,7 +193,7 @@ if (transactionTotals) { transactionTotalsMap.(transactionTotal.glAccountId).balance = totalDebitBalance.subtract(totalCreditBalance); } } else { - transactionTotalsMap.(transactionTotal.glAccountId) = transactionTotal as LinkedList; + transactionTotalsMap.(transactionTotal.glAccountId) = transactionTotal; } accountBalanceList = UtilMisc.sortMaps(transactionTotalsMap.values().asList(), UtilMisc.toList("accountCode")); }