[
https://issues.apache.org/jira/browse/OFBIZ-12139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17267175#comment-17267175
]
Jacopo Cappellato commented on OFBIZ-12139:
-------------------------------------------
Hi Jacques,
clear() doesn't work because the issue in the code is that, when there are more
than one terms, we are adding to the list the reference of the same Java object
to several times: since the references are pointing to the same object, the
code will update the object (with clear() and then repopulating its fields)
with the information from the last term only.
This issue was introduced with the migration to Groovy.
In order to recreate the issue, you need to add two terms of type "Payment net
days" to the order, then create the invoice and then you will see the
duplicated terms in the invoice detail screen (and in the
FindSalesInvoicesByDueDate research screen).
> Terms are not shown correctly on the Invoice overview
> -----------------------------------------------------
>
> Key: OFBIZ-12139
> URL: https://issues.apache.org/jira/browse/OFBIZ-12139
> Project: OFBiz
> Issue Type: Bug
> Components: accounting
> Affects Versions: Trunk
> Reporter: Nameet Jain
> Priority: Major
> Attachments: OFBIZ-12139.patch, image-2021-01-15-20-09-04-736.png
>
>
> When we have multiple Payment (Net Days) terms on the invoice say
> 20% in 15Days (FIN_PAY_NETDAYS_1)
> 80% in 30Days (FIN_PAY_NETDAYS_2)
> The terms section shows incorrect term data as shown in the screenshot.
> !image-2021-01-15-20-09-04-736.png!
> Also, we do not get the correct sales invoice on this reporting screen
> https://demo-trunk.ofbiz.apache.org/accounting/control/FindSalesInvoicesByDueDate
--
This message was sent by Atlassian Jira
(v8.3.4#803005)