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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

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

priyasharma pushed a commit to branch release17.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release17.12 by this push:
     new 14e581f  [Fixed] Possibly currency display bug in 'Find Invoices' (OFBIZ-12177) (#302)
14e581f is described below

commit 14e581ff35f29983568ec8718d2feb3163771739
Author: Priya Sharma <[hidden email]>
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 fd145b9..9819df1 100644
--- a/applications/accounting/widget/InvoiceForms.xml
+++ b/applications/accounting/widget/InvoiceForms.xml
@@ -69,10 +69,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">