You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Adrian Stern (JIRA)" <ji...@apache.org> on 2014/03/14 15:27:42 UTC

[jira] [Updated] (OFBIZ-5576) Currency won't match for Invoice & Payment in different currency than default

     [ https://issues.apache.org/jira/browse/OFBIZ-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Stern updated OFBIZ-5576:
--------------------------------

    Description: 
Default Currency: USD

When creating an invoice & payment in a different currency than the default currency but the same currency for invoice and payment, the process can't be completed because the "currencies don't match"-error.

1. Create Invoice EUR amount of 1000.-; set to ready
2. Create Payment EUR amount of 1000.-; Apply to Invoice

This will throw the error that the currencies don't match. It works when the "actuall currency" attribute is set to EUR as well.

The problem is, that the payment.currencyUomId is never checkt during Application.
This patch will solve this issue. But i can't estimate the overall impact of it.

Index: accounting/payment/PaymentServices.xml
===================================================================
--- accounting/payment/PaymentServices.xml	(revision 1576834)
+++ accounting/payment/PaymentServices.xml	(working copy)
@@ -185,6 +185,7 @@
                 <condition>
                     <or>
                         <if-compare-field  field="invoice.currencyUomId" operator="equals" to-field="defaultCurrencyUomId"/>
+                        <if-compare-field  field="invoice.currencyUomId" operator="equals" to-field="payment.currencyUomId"/>
                         <and>
                             <if-compare-field  field="invoice.currencyUomId" operator="not-equals" to-field="defaultCurrencyUomId"/>
                             <if-compare-field  field="invoice.currencyUomId" operator="equals" to-field="payment.actualCurrencyUomId"/>

  was:
Default Currency: USD

When creating an invoice an payment in a different currency than the default currency but the same currency for invoice and payment, the process can't be completed because the "currencies don't match"-error.

1. Create Invoice EUR amount of 1000.-; set to ready
2. Create Payment EUR amount of 1000.-; Apply to Invoice

This will throw the error that the currencies don't match. It works when the "actuall currency" attribute is set to EUR as well.

The problem is, that the payment.currencyUomId is never checkt during Application.
This patch will solve this issue. But i can't estimate the overall impact of it.

Index: accounting/payment/PaymentServices.xml
===================================================================
--- accounting/payment/PaymentServices.xml	(revision 1576834)
+++ accounting/payment/PaymentServices.xml	(working copy)
@@ -185,6 +185,7 @@
                 <condition>
                     <or>
                         <if-compare-field  field="invoice.currencyUomId" operator="equals" to-field="defaultCurrencyUomId"/>
+                        <if-compare-field  field="invoice.currencyUomId" operator="equals" to-field="payment.currencyUomId"/>
                         <and>
                             <if-compare-field  field="invoice.currencyUomId" operator="not-equals" to-field="defaultCurrencyUomId"/>
                             <if-compare-field  field="invoice.currencyUomId" operator="equals" to-field="payment.actualCurrencyUomId"/>


> Currency won't match for Invoice & Payment in different currency than default
> -----------------------------------------------------------------------------
>
>                 Key: OFBIZ-5576
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5576
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Release Branch 13.07
>         Environment: Linux, Java 1.7
>            Reporter: Adrian Stern
>            Priority: Critical
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Default Currency: USD
> When creating an invoice & payment in a different currency than the default currency but the same currency for invoice and payment, the process can't be completed because the "currencies don't match"-error.
> 1. Create Invoice EUR amount of 1000.-; set to ready
> 2. Create Payment EUR amount of 1000.-; Apply to Invoice
> This will throw the error that the currencies don't match. It works when the "actuall currency" attribute is set to EUR as well.
> The problem is, that the payment.currencyUomId is never checkt during Application.
> This patch will solve this issue. But i can't estimate the overall impact of it.
> Index: accounting/payment/PaymentServices.xml
> ===================================================================
> --- accounting/payment/PaymentServices.xml	(revision 1576834)
> +++ accounting/payment/PaymentServices.xml	(working copy)
> @@ -185,6 +185,7 @@
>                  <condition>
>                      <or>
>                          <if-compare-field  field="invoice.currencyUomId" operator="equals" to-field="defaultCurrencyUomId"/>
> +                        <if-compare-field  field="invoice.currencyUomId" operator="equals" to-field="payment.currencyUomId"/>
>                          <and>
>                              <if-compare-field  field="invoice.currencyUomId" operator="not-equals" to-field="defaultCurrencyUomId"/>
>                              <if-compare-field  field="invoice.currencyUomId" operator="equals" to-field="payment.actualCurrencyUomId"/>



--
This message was sent by Atlassian JIRA
(v6.2#6252)