You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by pr...@apache.org on 2021/05/31 12:54:43 UTC

[ofbiz-framework] branch trunk updated: [Fixed] Possibly currency display bug in 'Find Invoices' (OFBIZ-12177) (#302)

This is an automated email from the ASF dual-hosted git repository.

priyasharma 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 91694d8  [Fixed] Possibly currency display bug in 'Find Invoices' (OFBIZ-12177) (#302)
91694d8 is described below

commit 91694d8a1bb03f47400cedd8a68ce805cecdd840
Author: Priya Sharma <pr...@gmail.com>
AuthorDate: Mon May 31 18:24:37 2021 +0530

    [Fixed] Possibly currency display bug in 'Find Invoices' (OFBIZ-12177) (#302)
    
    - Since the method InvoiceWorker.getInvoiceTotal takes care of the conversion, it is redundant to convert it again on the screen, which results in mismatch of the currency and the amount.
    
    Thanks: Suraj, Jacques, Rajadurai for the review and Andrei Stan for reporting.
---
 applications/accounting/widget/InvoiceForms.xml | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/applications/accounting/widget/InvoiceForms.xml b/applications/accounting/widget/InvoiceForms.xml
index b2bf804..48b81c9 100644
--- a/applications/accounting/widget/InvoiceForms.xml
+++ b/applications/accounting/widget/InvoiceForms.xml
@@ -70,10 +70,8 @@ under the License.
                 <field-map field-name="compareDate" from-field="invoiceDate"/>
                 <field-map field-name="lastNameFirst" value="Y"/>
             </service>
-            <set field="amountToApply" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)
-                .multiply(org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceCurrencyConversionRate(delegator,invoiceId))}"/>
-            <set field="total" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)
-                .multiply(org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceCurrencyConversionRate(delegator,invoiceId))}"/>
+            <set field="amountToApply" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)}"/>
+            <set field="total" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)}"/>
         </row-actions>
 
         <field name="invoiceId" widget-style="buttontext" sort-field="true">