This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push: new bee1b11 Fixed: Terms are not shown correctly on the Invoice overview (OFBIZ-12139) bee1b11 is described below commit bee1b11831f6d0bd9baa2b17a9cbb4c33d71bc04 Author: Jacques Le Roux <jacques.le.r...@les7arts.com> AuthorDate: Mon Jan 18 20:19:21 2021 +0100 Fixed: Terms are not shown correctly on the Invoice overview (OFBIZ-12139) 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. Thanks: Nameet Jain for report and fix, Jacopo for confirmation --- applications/accounting/groovyScripts/payment/PaymentServices.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/accounting/groovyScripts/payment/PaymentServices.groovy b/applications/accounting/groovyScripts/payment/PaymentServices.groovy index 3918b99..3e23701 100644 --- a/applications/accounting/groovyScripts/payment/PaymentServices.groovy +++ b/applications/accounting/groovyScripts/payment/PaymentServices.groovy @@ -87,7 +87,7 @@ def getInvoicePaymentInfoList() { for (invoiceTerm in invoiceTerms) { termType = from("TermType").where("termTypeId", invoiceTerm.termTypeId).cache(true).queryOne() if ("FIN_PAYMENT_TERM" == termType.parentTypeId) { - invoicePaymentInfo.clear() + invoicePaymentInfo = [:] invoicePaymentInfo.invoiceId = invoice.invoiceId invoicePaymentInfo.invoiceTermId = invoiceTerm.invoiceTermId invoicePaymentInfo.termTypeId = invoiceTerm.termTypeId @@ -110,7 +110,7 @@ def getInvoicePaymentInfoList() { } if (remainingAppliedAmount > 0.0 || invoiceTotalAmount <= 0.0 || computedTotalAmount < invoiceTotalAmount) { - invoicePaymentInfo.clear() + invoicePaymentInfo = [:] invoiceTerm = from("InvoiceTerm").where("invoiceId", invoice.invoiceId, "termTypeId", "FIN_PAYMENT_TERM").queryFirst() if (invoiceTerm) { invoicePaymentInfo.termTypeId = invoiceTerm.termTypeId