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

Sumit Pandit commented on OFBIZ-2790:
-------------------------------------

Please find more comments - 
1) For performance reasons do not use the EntityListIterator.hasNext() method, 
just call next() until it returns null.
2) In your case - lastRowId != null never happen.
3) I have a doubt in following assignment - 
listValue.paymentId ="lastRowId";
I think you want to code like - listValue.paymentId = lastRowId;
4) Please have a look at console - there are some errors are showing. They 
occurred in calculation of Outstanding amount. Please correct it.
5) No indentation require after - totalAmount = totalAmount + amount;
6) Remove last three lines from file  - /FindPaymentTotals.groovy
7) Use BigDecimal's method for operations.
8) Please have a look at your logic in groovy file, I have a doubt on it.
9) Pleas verify your values in iteration.

> Payment totals in Accounting
> ----------------------------
>
>                 Key: OFBIZ-2790
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2790
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: accounting
>    Affects Versions: SVN trunk
>            Reporter: Ahmed Dini
>            Assignee: Anil K Patel
>             Fix For: SVN trunk
>
>         Attachments: paymentTotals.patch, paymentTotals.patch
>
>
> Under Accounting Manager --> Payments, Find Payments.  I thought it would be 
> a handy improvement if I display a total of the Amount fields of all payments 
> under the search result screen no matter what their status is. This new 
> improvement might not makes sense when payment status are mixed i.e. The 
> total of cancelled payments plus the total of received payments, but I thinks 
> it might make sense if you want to filter the query. i.e if you want the 
> total of all payments in NOT-PAID status by a particular party or customer. 
> Attached is patch which introduces a new groovy file namely  
> FindPaymentTotals.groovy and the modification of the existing 
> PaymentForms.xml.
> NB. Since this is my first major improvement for Ofbiz project, I might have 
> done things differently than most of the commiters or contributors expect. 
> Please let me know if I break Ofbiz coding conventions, I am willing to 
> improve the code. Otherwise the attached patch works fine and has passed all 
> my tests

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to