Currencies of invoice and payment not compatible - All the time

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Currencies of invoice and payment not compatible - All the time

Adrian Stern
Hi Guys

Whenever i want to assign a payment to an invoice i get this error:

The Following Errors Occurred:
Currencies of invoice and payment not compatible

Thing is both, the invoice and the payment use the same currency: CHF. I can set the Is-Currency (Actual Currency) property for my payment and then i can assign it to the invoice but this seems unnecessary and it is not necessary when dealing with USD and the Demo Data. 

I updated framework/common/config/genera.properties to set CHF as default currency.

Where would i change it so if no additional currency information is given, it takes the same currency as the payment?

Regards,
Adrian
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Pierre Smits
Adrian,

If you have changed your default currency manually, I advice you to also
check the 'baseCurrencyUomId' value in PartyAcctgPreference.

This must be in sync.

Regards,

Pierre Smits

*ORRTIZ.COM <http://www.orrtiz.com>*
Services & Solutions for Cloud-
Based Manufacturing, Professional
Services and Retail & Trade
http://www.orrtiz.com
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Adrian Stern
Sorry. It is hard to find. Do you refer to somwhere in the GUI or do you
refer to some XML file?

I did find this:
applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:        <set
field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>

Ist this the right one? Otherwise i would appreciate a more precise
insruction.


On 11 March 2014 14:32, Pierre Smits <[hidden email]> wrote:

> Adrian,
>
> If you have changed your default currency manually, I advice you to also
> check the 'baseCurrencyUomId' value in PartyAcctgPreference.
>
> This must be in sync.
>
> Regards,
>
> Pierre Smits
>
> *ORRTIZ.COM <http://www.orrtiz.com>*
> Services & Solutions for Cloud-
> Based Manufacturing, Professional
> Services and Retail & Trade
> http://www.orrtiz.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Pierre Smits
Yes. It is in the entity with the same name.

Sent from my iPhone

> On 11 mrt. 2014, at 15:22, Adrian Stern <[hidden email]> wrote:
>
> Sorry. It is hard to find. Do you refer to somwhere in the GUI or do you
> refer to some XML file?
>
> I did find this:
> applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:        <set
> field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>
>
> Ist this the right one? Otherwise i would appreciate a more precise
> insruction.
>
>
>> On 11 March 2014 14:32, Pierre Smits <[hidden email]> wrote:
>>
>> Adrian,
>>
>> If you have changed your default currency manually, I advice you to also
>> check the 'baseCurrencyUomId' value in PartyAcctgPreference.
>>
>> This must be in sync.
>>
>> Regards,
>>
>> Pierre Smits
>>
>> *ORRTIZ.COM <http://www.orrtiz.com>*
>> Services & Solutions for Cloud-
>> Based Manufacturing, Professional
>> Services and Retail & Trade
>> http://www.orrtiz.com
>>
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Adrian Stern
Ok.

I made the change from USD to CHF in this file, but the outcome is still
the same:

applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:        <set
field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>
applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:        <set
field="acctgPreferenceCtx.baseCurrencyUomId" value="CHF"/>




On 11 March 2014 17:14, Pierre @GMail <[hidden email]> wrote:

> Yes. It is in the entity with the same name.
>
> Sent from my iPhone
>
> > On 11 mrt. 2014, at 15:22, Adrian Stern <[hidden email]> wrote:
> >
> > Sorry. It is hard to find. Do you refer to somwhere in the GUI or do you
> > refer to some XML file?
> >
> > I did find this:
> > applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:
>  <set
> > field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>
> >
> > Ist this the right one? Otherwise i would appreciate a more precise
> > insruction.
> >
> >
> >> On 11 March 2014 14:32, Pierre Smits <[hidden email]> wrote:
> >>
> >> Adrian,
> >>
> >> If you have changed your default currency manually, I advice you to also
> >> check the 'baseCurrencyUomId' value in PartyAcctgPreference.
> >>
> >> This must be in sync.
> >>
> >> Regards,
> >>
> >> Pierre Smits
> >>
> >> *ORRTIZ.COM <http://www.orrtiz.com>*
> >> Services & Solutions for Cloud-
> >> Based Manufacturing, Professional
> >> Services and Retail & Trade
> >> http://www.orrtiz.com
> >>
>
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Adrian Stern
Some more Information:

In the file
ofbiz/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml

the error would be somwhere here:
*            <!-- check the currencies if they are compatible -->
  *
            <property-to-field field="defaultCurrencyUomId"
resource="general" property="currency.uom.id.default" default="*USD*"/>
            <if>
                <condition>
                    <or>
                        <if-compare-field  field="invoice.currencyUomId"
operator="equals" to-field="defaultCurrencyUomId"/>
                        <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"/>
                        </and>
                    </or> </condition>
                <then><!-- if required get the payment amount in foreign
currency (local we already have) -->
                    <if-compare-field  field="invoice.currencyUomId"
operator="not-equals" to-field="defaultCurrencyUomId">
                        <set field="actual" value="true" type="Boolean"/>
                        <call-class-method
method-name="getPaymentNotApplied"
class-name="org.ofbiz.accounting.payment.PaymentWorker"
ret-field="notAppliedPayment">
                            <field field="payment" type="GenericValue"/>
                            <field field="actual" type="Boolean"/>
                        </call-class-method>
                    </if-compare-field>
                </then>
                <else>
                    <add-error>
                        <fail-property resource="AccountingUiLabels"
property="AccountingCurrenciesOfInvoiceAndPaymentNotCompatible"/>
                    </add-error>
                </else>
            </if>
            <check-errors/>


Stack Trace of when its going wrong (all the time):

 [java] 2014-03-12 15:54:49,207 (http-bio-0.0.0.0-8443-exec-8) [
ControlServlet.java:140:INFO ] [[[createPaymentApplication(Domain:
https://localhost)] Request Begun, encoding=[UTF-8]- total:0.0,since
last(Begin):0.0]]
     [java] 2014-03-12 15:54:49,231 (http-bio-0.0.0.0-8443-exec-8) [
 ConfigXMLReader.java:116:INFO ] controller loaded: 0.009s, 482 requests,
228 views in jndi:/0.0.0.0/accounting/WEB-INF/controller.xml
     [java] 2014-03-12 15:54:49,236 (http-bio-0.0.0.0-8443-exec-8) [
 ConfigXMLReader.java:116:INFO ] controller loaded: 0.001s, 39 requests, 19
views in
file:/home/adrian/projects/ofbiz/framework/common/webcommon/WEB-INF/common-controller.xml
     [java] 2014-03-12 15:54:49,239 (http-bio-0.0.0.0-8443-exec-8) [
 ConfigXMLReader.java:116:INFO ] controller loaded: 0.0s, 0 requests, 0
views in
file:/home/adrian/projects/ofbiz/framework/common/webcommon/WEB-INF/handlers-controller.xml
     [java] 2014-03-12 15:54:49,242 (http-bio-0.0.0.0-8443-exec-8) [
 ConfigXMLReader.java:116:INFO ] controller loaded: 0.0s, 4 requests, 0
views in
file:/home/adrian/projects/ofbiz/applications/commonext/webapp/WEB-INF/controller.xml
     [java] 2014-03-12 15:54:49,266 (http-bio-0.0.0.0-8443-exec-8) [
 TransactionUtil.java:378:WARN ]
     [java] ---- exception report
----------------------------------------------------------
     [java] [TransactionUtil.setRollbackOnly] Calling transaction
setRollbackOnly; this stack trace shows where this is happening:
     [java] Exception: java.lang.Exception
     [java] Message: Error in simple-method [Create a Payment Application
[file:/home/adrian/projects/ofbiz/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml#createPaymentApplication]]:
; [Die Währungen der Rechnung und der Zahlung passen nicht zusammen]
     [java] ---- stack trace
---------------------------------------------------------------
     [java] java.lang.Exception: Error in simple-method [Create a Payment
Application
[file:/home/adrian/projects/ofbiz/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml#createPaymentApplication]]:
; [Die Währungen der Rechnung und der Zahlung passen nicht zusammen]
     [java]
org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:378)
     [java]
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:319)
     [java] org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:578)
     [java]
org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:271)
     [java]
org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:290)
     [java]
org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:79)
     [java]
org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:48)
     [java]
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:385)
     [java]
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:220)
     [java]
org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:83)
     [java]
org.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:338)
     [java]
org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:695)
     [java]
org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:420)
     [java]
org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:214)
     [java]
org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:86)
     [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
     [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
     [java]
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
     [java]
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
     [java]
org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:314)
     [java]
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
     [java]
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
     [java]
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
     [java]
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
     [java]
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
     [java]
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
     [java]
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
     [java]
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
     [java]
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
     [java]
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
     [java]
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
     [java]
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
     [java]
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
     [java]
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
     [java]
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
     [java] java.lang.Thread.run(Thread.java:744)
     [java]
--------------------------------------------------------------------------------
     [java]
     [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
 ServiceDispatcher.java:520:ERROR] Error in Service
[createPaymentApplication]: Die Währungen der Rechnung und der Zahlung
passen nicht zusammen
     [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
 TransactionUtil.java:341:ERROR]
     [java] ---- exception report
----------------------------------------------------------
     [java] [TransactionUtil.rollback]
     [java] Exception: java.lang.Exception
     [java] Message: Stack Trace
     [java] ---- stack trace
---------------------------------------------------------------
     [java] java.lang.Exception: Stack Trace
     [java]
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:340)
     [java]
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:317)
     [java]
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:524)
     [java]
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:220)
     [java]
org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:83)
     [java]
org.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:338)
     [java]
org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:695)
     [java]
org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:420)
     [java]
org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:214)
     [java]
org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:86)
     [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
     [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
     [java]
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
     [java]
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
     [java]
org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:314)
     [java]
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
     [java]
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
     [java]
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
     [java]
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
     [java]
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
     [java]
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
     [java]
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
     [java]
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
     [java]
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
     [java]
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
     [java]
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
     [java]
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
     [java]
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
     [java]
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
     [java]
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
     [java] java.lang.Thread.run(Thread.java:744)
     [java]
--------------------------------------------------------------------------------
     [java]
     [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
 TransactionUtil.java:351:INFO ] [TransactionUtil.rollback] transaction
rolled back
     [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
 ServiceDispatcher.java:586:INFO ] Sync service
[accounting/createPaymentApplication] finished in [20] milliseconds
     [java] 2014-03-12 15:54:49,268 (http-bio-0.0.0.0-8443-exec-8) [
RequestHandler.java:696:INFO ] Ran Event
[service:#createPaymentApplication] from [request], result is [error]
     [java] 2014-03-12 15:54:49,268 (http-bio-0.0.0.0-8443-exec-8) [
RequestHandler.java:479:WARN ] Could not find response in request
[createPaymentApplication] for event return [error]
     [java] 2014-03-12 15:54:49,268 (http-bio-0.0.0.0-8443-exec-8) [
RequestHandler.java:814:INFO ] Rendering View [editPaymentApplications],
sessionId=F17B26D438585A88886D3CF3382C441A.jvm1
     [java] 2014-03-12 15:54:49,337 (http-bio-0.0.0.0-8443-exec-8) [
 ServiceDispatcher.java:586:INFO ] Sync service
[accounting/getUserPreferenceGroup] finished in [1] milliseconds
     [java] 2014-03-12 15:54:49,343 (http-bio-0.0.0.0-8443-exec-8) [
 ScreenFactory.java:130:INFO ] Got 13 screens in 0.006s from:
file:/home/adrian/projects/ofbiz/applications/accounting/widget/PaymentScreens.xml
     [java] experiment: creating class manager
     [java] experiment: creating class manager
     [java] experiment: creating class manager
     [java] 2014-03-12 15:54:49,569 (http-bio-0.0.0.0-8443-exec-8) [
 ScreenFactory.java:130:INFO ] Got 10 screens in 0.008s from:
file:/home/adrian/projects/ofbiz/applications/accounting/widget/CommonScreens.xml
     [java] 2014-03-12 15:54:49,577 (http-bio-0.0.0.0-8443-exec-8) [
 ScreenFactory.java:130:INFO ] Got 1 screens in 0.007s from:
file:/home/adrian/projects/ofbiz/applications/commonext/widget/CommonScreens.xml
     [java] 2014-03-12 15:54:49,578 (http-bio-0.0.0.0-8443-exec-8) [
PrimaryKeyFinder.java:158:INFO ] Returning null because found incomplete
primary key in find: [GenericEntity:PartyNameView][partyId,null()]
     [java] 2014-03-12 15:54:49,629 (http-bio-0.0.0.0-8443-exec-8) [
 ServiceDispatcher.java:586:INFO ] Sync service
[accounting/getLastSystemInfoNote] finished in [17] milliseconds
     [java] 2014-03-12 15:54:49,653 (http-bio-0.0.0.0-8443-exec-8) [
 ScreenFactory.java:130:INFO ] Got 24 screens in 0.013s from:
file:/home/adrian/projects/ofbiz/framework/common/widget/CommonScreens.xml
     [java] 2014-03-12 15:54:49,679 (http-bio-0.0.0.0-8443-exec-8) [
 ServiceDispatcher.java:586:INFO ] Sync service
[accounting/getVisualThemeResources] finished in [23] milliseconds
     [java] 2014-03-12 15:54:49,922 (http-bio-0.0.0.0-8443-exec-8) [
 ServiceDispatcher.java:586:INFO ] Sync service
[accounting/acctgBasePermissionCheck] finished in [43] milliseconds
     [java] 2014-03-12 15:54:49,928 (http-bio-0.0.0.0-8443-exec-8) [
 ServiceDispatcher.java:586:INFO ] Sync service
[accounting/acctgBasePermissionCheck] finished in [3] milliseconds
     [java] experiment: creating class manager
     [java] 2014-03-12 15:54:50,079 (http-bio-0.0.0.0-8443-exec-8) [
ServerHitBin.java:637:INFO ] Visit delegatorName=default, ServerHitBin
delegatorName=default
     [java] 2014-03-12 15:54:50,084 (http-bio-0.0.0.0-8443-exec-8) [
ControlServlet.java:324:INFO ] [[[createPaymentApplication(Domain:
https://localhost)] Request Done- total:0.877,since
last([createPaymentApp...):0.877]]



On 12 March 2014 15:44, Adrian Stern <[hidden email]> wrote:

> Ok.
>
> I made the change from USD to CHF in this file, but the outcome is still
> the same:
>
> applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:        <set
> field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>
> applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:        <set
> field="acctgPreferenceCtx.baseCurrencyUomId" value="CHF"/>
>
>
>
>
> On 11 March 2014 17:14, Pierre @GMail <[hidden email]> wrote:
>
>> Yes. It is in the entity with the same name.
>>
>> Sent from my iPhone
>>
>> > On 11 mrt. 2014, at 15:22, Adrian Stern <[hidden email]> wrote:
>> >
>> > Sorry. It is hard to find. Do you refer to somwhere in the GUI or do you
>> > refer to some XML file?
>> >
>> > I did find this:
>> > applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:
>>  <set
>> > field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>
>> >
>> > Ist this the right one? Otherwise i would appreciate a more precise
>> > insruction.
>> >
>> >
>> >> On 11 March 2014 14:32, Pierre Smits <[hidden email]> wrote:
>> >>
>> >> Adrian,
>> >>
>> >> If you have changed your default currency manually, I advice you to
>> also
>> >> check the 'baseCurrencyUomId' value in PartyAcctgPreference.
>> >>
>> >> This must be in sync.
>> >>
>> >> Regards,
>> >>
>> >> Pierre Smits
>> >>
>> >> *ORRTIZ.COM <http://www.orrtiz.com>*
>> >> Services & Solutions for Cloud-
>> >> Based Manufacturing, Professional
>> >> Services and Retail & Trade
>> >> http://www.orrtiz.com
>> >>
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Adrian Stern
I tried the following with Demo Data:

1. Create Invoice USD; Pay invoice with USD Payment => works
2. Create Invoice CHF; Pay invoice with CHF Payment => currencies don't
match

For the CHF payment i created the Foreing Exchange Rates:
CHF to USD - 1.14
USD to CHF - 0.67

I also tried to replace all USD with CHF in demo data with the same resutl.
Currencies won't match.

Could anyone try this out and report if the problem exists?


On 12 March 2014 16:13, Adrian Stern <[hidden email]> wrote:

> Some more Information:
>
> In the file
>
> ofbiz/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
>
> the error would be somwhere here:
> *            <!-- check the currencies if they are compatible -->
>   *
>             <property-to-field field="defaultCurrencyUomId"
> resource="general" property="currency.uom.id.default" default="*USD*"/>
>             <if>
>                 <condition>
>                     <or>
>                         <if-compare-field  field="invoice.currencyUomId"
> operator="equals" to-field="defaultCurrencyUomId"/>
>                         <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"/>
>                         </and>
>                     </or> </condition>
>                 <then><!-- if required get the payment amount in foreign
> currency (local we already have) -->
>                     <if-compare-field  field="invoice.currencyUomId"
> operator="not-equals" to-field="defaultCurrencyUomId">
>                         <set field="actual" value="true" type="Boolean"/>
>                         <call-class-method
> method-name="getPaymentNotApplied"
> class-name="org.ofbiz.accounting.payment.PaymentWorker"
> ret-field="notAppliedPayment">
>                             <field field="payment" type="GenericValue"/>
>                             <field field="actual" type="Boolean"/>
>                         </call-class-method>
>                     </if-compare-field>
>                 </then>
>                 <else>
>                     <add-error>
>                         <fail-property resource="AccountingUiLabels"
> property="AccountingCurrenciesOfInvoiceAndPaymentNotCompatible"/>
>                     </add-error>
>                 </else>
>             </if>
>             <check-errors/>
>
>
> Stack Trace of when its going wrong (all the time):
>
>  [java] 2014-03-12 15:54:49,207 (http-bio-0.0.0.0-8443-exec-8) [
> ControlServlet.java:140:INFO ] [[[createPaymentApplication(Domain:
> https://localhost)] Request Begun, encoding=[UTF-8]- total:0.0,since
> last(Begin):0.0]]
>      [java] 2014-03-12 15:54:49,231 (http-bio-0.0.0.0-8443-exec-8) [
>  ConfigXMLReader.java:116:INFO ] controller loaded: 0.009s, 482 requests,
> 228 views in jndi:/0.0.0.0/accounting/WEB-INF/controller.xml
>      [java] 2014-03-12 15:54:49,236 (http-bio-0.0.0.0-8443-exec-8) [
>  ConfigXMLReader.java:116:INFO ] controller loaded: 0.001s, 39 requests, 19
> views in
> file:/home/adrian/projects/ofbiz/framework/common/webcommon/WEB-INF/common-controller.xml
>      [java] 2014-03-12 15:54:49,239 (http-bio-0.0.0.0-8443-exec-8) [
>  ConfigXMLReader.java:116:INFO ] controller loaded: 0.0s, 0 requests, 0
> views in
> file:/home/adrian/projects/ofbiz/framework/common/webcommon/WEB-INF/handlers-controller.xml
>      [java] 2014-03-12 15:54:49,242 (http-bio-0.0.0.0-8443-exec-8) [
>  ConfigXMLReader.java:116:INFO ] controller loaded: 0.0s, 4 requests, 0
> views in
> file:/home/adrian/projects/ofbiz/applications/commonext/webapp/WEB-INF/controller.xml
>      [java] 2014-03-12 15:54:49,266 (http-bio-0.0.0.0-8443-exec-8) [
>  TransactionUtil.java:378:WARN ]
>      [java] ---- exception report
> ----------------------------------------------------------
>      [java] [TransactionUtil.setRollbackOnly] Calling transaction
> setRollbackOnly; this stack trace shows where this is happening:
>      [java] Exception: java.lang.Exception
>      [java] Message: Error in simple-method [Create a Payment Application
> [file:/home/adrian/projects/ofbiz/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml#createPaymentApplication]]:
> ; [Die Währungen der Rechnung und der Zahlung passen nicht zusammen]
>      [java] ---- stack trace
> ---------------------------------------------------------------
>      [java] java.lang.Exception: Error in simple-method [Create a Payment
> Application
> [file:/home/adrian/projects/ofbiz/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml#createPaymentApplication]]:
> ; [Die Währungen der Rechnung und der Zahlung passen nicht zusammen]
>      [java]
> org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:378)
>      [java]
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:319)
>      [java] org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:578)
>      [java]
> org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:271)
>      [java]
> org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:290)
>      [java]
> org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:79)
>      [java]
> org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:48)
>      [java]
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:385)
>      [java]
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:220)
>      [java]
> org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:83)
>      [java]
> org.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:338)
>      [java]
> org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:695)
>      [java]
> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:420)
>      [java]
> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:214)
>      [java]
> org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:86)
>      [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
>      [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>      [java]
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>      [java]
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>      [java]
> org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:314)
>      [java]
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>      [java]
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>      [java]
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>      [java]
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>      [java]
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
>      [java]
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>      [java]
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
>      [java]
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>      [java]
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
>      [java]
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>      [java]
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
>      [java]
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
>      [java]
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
>      [java]
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>      [java]
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>      [java] java.lang.Thread.run(Thread.java:744)
>      [java]
> --------------------------------------------------------------------------------
>      [java]
>      [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
>  ServiceDispatcher.java:520:ERROR] Error in Service
> [createPaymentApplication]: Die Währungen der Rechnung und der Zahlung
> passen nicht zusammen
>      [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
>  TransactionUtil.java:341:ERROR]
>      [java] ---- exception report
> ----------------------------------------------------------
>      [java] [TransactionUtil.rollback]
>      [java] Exception: java.lang.Exception
>      [java] Message: Stack Trace
>      [java] ---- stack trace
> ---------------------------------------------------------------
>      [java] java.lang.Exception: Stack Trace
>      [java]
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:340)
>      [java]
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:317)
>      [java]
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:524)
>      [java]
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:220)
>      [java]
> org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:83)
>      [java]
> org.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:338)
>      [java]
> org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:695)
>      [java]
> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:420)
>      [java]
> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:214)
>      [java]
> org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:86)
>      [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
>      [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>      [java]
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>      [java]
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>      [java]
> org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:314)
>      [java]
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>      [java]
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>      [java]
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>      [java]
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>      [java]
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
>      [java]
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>      [java]
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
>      [java]
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>      [java]
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
>      [java]
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>      [java]
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
>      [java]
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
>      [java]
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
>      [java]
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>      [java]
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>      [java] java.lang.Thread.run(Thread.java:744)
>      [java]
> --------------------------------------------------------------------------------
>      [java]
>      [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
>  TransactionUtil.java:351:INFO ] [TransactionUtil.rollback] transaction
> rolled back
>      [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
>  ServiceDispatcher.java:586:INFO ] Sync service
> [accounting/createPaymentApplication] finished in [20] milliseconds
>      [java] 2014-03-12 15:54:49,268 (http-bio-0.0.0.0-8443-exec-8) [
> RequestHandler.java:696:INFO ] Ran Event
> [service:#createPaymentApplication] from [request], result is [error]
>      [java] 2014-03-12 15:54:49,268 (http-bio-0.0.0.0-8443-exec-8) [
> RequestHandler.java:479:WARN ] Could not find response in request
> [createPaymentApplication] for event return [error]
>      [java] 2014-03-12 15:54:49,268 (http-bio-0.0.0.0-8443-exec-8) [
> RequestHandler.java:814:INFO ] Rendering View [editPaymentApplications],
> sessionId=F17B26D438585A88886D3CF3382C441A.jvm1
>      [java] 2014-03-12 15:54:49,337 (http-bio-0.0.0.0-8443-exec-8) [
>  ServiceDispatcher.java:586:INFO ] Sync service
> [accounting/getUserPreferenceGroup] finished in [1] milliseconds
>      [java] 2014-03-12 15:54:49,343 (http-bio-0.0.0.0-8443-exec-8) [
>  ScreenFactory.java:130:INFO ] Got 13 screens in 0.006s from:
> file:/home/adrian/projects/ofbiz/applications/accounting/widget/PaymentScreens.xml
>      [java] experiment: creating class manager
>      [java] experiment: creating class manager
>      [java] experiment: creating class manager
>      [java] 2014-03-12 15:54:49,569 (http-bio-0.0.0.0-8443-exec-8) [
>  ScreenFactory.java:130:INFO ] Got 10 screens in 0.008s from:
> file:/home/adrian/projects/ofbiz/applications/accounting/widget/CommonScreens.xml
>      [java] 2014-03-12 15:54:49,577 (http-bio-0.0.0.0-8443-exec-8) [
>  ScreenFactory.java:130:INFO ] Got 1 screens in 0.007s from:
> file:/home/adrian/projects/ofbiz/applications/commonext/widget/CommonScreens.xml
>      [java] 2014-03-12 15:54:49,578 (http-bio-0.0.0.0-8443-exec-8) [
> PrimaryKeyFinder.java:158:INFO ] Returning null because found incomplete
> primary key in find: [GenericEntity:PartyNameView][partyId,null()]
>      [java] 2014-03-12 15:54:49,629 (http-bio-0.0.0.0-8443-exec-8) [
>  ServiceDispatcher.java:586:INFO ] Sync service
> [accounting/getLastSystemInfoNote] finished in [17] milliseconds
>      [java] 2014-03-12 15:54:49,653 (http-bio-0.0.0.0-8443-exec-8) [
>  ScreenFactory.java:130:INFO ] Got 24 screens in 0.013s from:
> file:/home/adrian/projects/ofbiz/framework/common/widget/CommonScreens.xml
>      [java] 2014-03-12 15:54:49,679 (http-bio-0.0.0.0-8443-exec-8) [
>  ServiceDispatcher.java:586:INFO ] Sync service
> [accounting/getVisualThemeResources] finished in [23] milliseconds
>      [java] 2014-03-12 15:54:49,922 (http-bio-0.0.0.0-8443-exec-8) [
>  ServiceDispatcher.java:586:INFO ] Sync service
> [accounting/acctgBasePermissionCheck] finished in [43] milliseconds
>      [java] 2014-03-12 15:54:49,928 (http-bio-0.0.0.0-8443-exec-8) [
>  ServiceDispatcher.java:586:INFO ] Sync service
> [accounting/acctgBasePermissionCheck] finished in [3] milliseconds
>      [java] experiment: creating class manager
>      [java] 2014-03-12 15:54:50,079 (http-bio-0.0.0.0-8443-exec-8) [
> ServerHitBin.java:637:INFO ] Visit delegatorName=default, ServerHitBin
> delegatorName=default
>      [java] 2014-03-12 15:54:50,084 (http-bio-0.0.0.0-8443-exec-8) [
> ControlServlet.java:324:INFO ] [[[createPaymentApplication(Domain:
> https://localhost)] Request Done- total:0.877,since
> last([createPaymentApp...):0.877]]
>
>
>
> On 12 March 2014 15:44, Adrian Stern <[hidden email]> wrote:
>
>> Ok.
>>
>> I made the change from USD to CHF in this file, but the outcome is still
>> the same:
>>
>> applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:
>>  <set field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>
>> applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:
>>  <set field="acctgPreferenceCtx.baseCurrencyUomId" value="CHF"/>
>>
>>
>>
>>
>> On 11 March 2014 17:14, Pierre @GMail <[hidden email]> wrote:
>>
>>> Yes. It is in the entity with the same name.
>>>
>>> Sent from my iPhone
>>>
>>> > On 11 mrt. 2014, at 15:22, Adrian Stern <[hidden email]> wrote:
>>> >
>>> > Sorry. It is hard to find. Do you refer to somwhere in the GUI or do
>>> you
>>> > refer to some XML file?
>>> >
>>> > I did find this:
>>> > applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:
>>>  <set
>>> > field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>
>>> >
>>> > Ist this the right one? Otherwise i would appreciate a more precise
>>> > insruction.
>>> >
>>> >
>>> >> On 11 March 2014 14:32, Pierre Smits <[hidden email]> wrote:
>>> >>
>>> >> Adrian,
>>> >>
>>> >> If you have changed your default currency manually, I advice you to
>>> also
>>> >> check the 'baseCurrencyUomId' value in PartyAcctgPreference.
>>> >>
>>> >> This must be in sync.
>>> >>
>>> >> Regards,
>>> >>
>>> >> Pierre Smits
>>> >>
>>> >> *ORRTIZ.COM <http://www.orrtiz.com>*
>>> >> Services & Solutions for Cloud-
>>> >> Based Manufacturing, Professional
>>> >> Services and Retail & Trade
>>> >> http://www.orrtiz.com
>>> >>
>>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Adrian Stern
I tried the following with Demo Data:

1. Create Invoice USD; Pay invoice with USD Payment => works
2. Create Invoice CHF; Pay invoice with CHF Payment => currencies don't
match

I tried the following wign my own Configuration (CHF)

1. Create Invoice USD; Pay invoice with USD Payment => works
2. Create Invoice AFA; Pay invoice with AFA Payment => currencies don't
match

For the CHF payment, as well as the AFA payment, i created the Foreing
Exchange Rates:
CHF to USD - 1.14
USD to CHF - 0.67
AFA to CHF - 0.9
CHF to AFA - 1.1

I also tried to replace all USD with CHF in demo data with the same resutl.
Currencies won't match.

Could anyone try this out and report if the problem exists? It could be a
general problem!


On 12 March 2014 19:47, Adrian Stern <[hidden email]> wrote:

> I tried the following with Demo Data:
>
> 1. Create Invoice USD; Pay invoice with USD Payment => works
> 2. Create Invoice CHF; Pay invoice with CHF Payment => currencies don't
> match
>
> For the CHF payment i created the Foreing Exchange Rates:
> CHF to USD - 1.14
> USD to CHF - 0.67
>
> I also tried to replace all USD with CHF in demo data with the same
> resutl. Currencies won't match.
>
> Could anyone try this out and report if the problem exists?
>
>
> On 12 March 2014 16:13, Adrian Stern <[hidden email]> wrote:
>
>> Some more Information:
>>
>> In the file
>>
>> ofbiz/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
>>
>> the error would be somwhere here:
>> *            <!-- check the currencies if they are compatible -->
>>   *
>>             <property-to-field field="defaultCurrencyUomId"
>> resource="general" property="currency.uom.id.default" default="*USD*"/>
>>             <if>
>>                 <condition>
>>                     <or>
>>                         <if-compare-field  field="invoice.currencyUomId"
>> operator="equals" to-field="defaultCurrencyUomId"/>
>>                         <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"/>
>>                         </and>
>>                     </or> </condition>
>>                 <then><!-- if required get the payment amount in foreign
>> currency (local we already have) -->
>>                     <if-compare-field  field="invoice.currencyUomId"
>> operator="not-equals" to-field="defaultCurrencyUomId">
>>                         <set field="actual" value="true" type="Boolean"/>
>>                         <call-class-method
>> method-name="getPaymentNotApplied"
>> class-name="org.ofbiz.accounting.payment.PaymentWorker"
>> ret-field="notAppliedPayment">
>>                             <field field="payment" type="GenericValue"/>
>>                             <field field="actual" type="Boolean"/>
>>                         </call-class-method>
>>                     </if-compare-field>
>>                 </then>
>>                 <else>
>>                     <add-error>
>>                         <fail-property resource="AccountingUiLabels"
>> property="AccountingCurrenciesOfInvoiceAndPaymentNotCompatible"/>
>>                     </add-error>
>>                 </else>
>>             </if>
>>             <check-errors/>
>>
>>
>> Stack Trace of when its going wrong (all the time):
>>
>>  [java] 2014-03-12 15:54:49,207 (http-bio-0.0.0.0-8443-exec-8) [
>> ControlServlet.java:140:INFO ] [[[createPaymentApplication(Domain:
>> https://localhost)] Request Begun, encoding=[UTF-8]- total:0.0,since
>> last(Begin):0.0]]
>>      [java] 2014-03-12 15:54:49,231 (http-bio-0.0.0.0-8443-exec-8) [
>>  ConfigXMLReader.java:116:INFO ] controller loaded: 0.009s, 482 requests,
>> 228 views in jndi:/0.0.0.0/accounting/WEB-INF/controller.xml
>>      [java] 2014-03-12 15:54:49,236 (http-bio-0.0.0.0-8443-exec-8) [
>>  ConfigXMLReader.java:116:INFO ] controller loaded: 0.001s, 39 requests, 19
>> views in
>> file:/home/adrian/projects/ofbiz/framework/common/webcommon/WEB-INF/common-controller.xml
>>      [java] 2014-03-12 15:54:49,239 (http-bio-0.0.0.0-8443-exec-8) [
>>  ConfigXMLReader.java:116:INFO ] controller loaded: 0.0s, 0 requests, 0
>> views in
>> file:/home/adrian/projects/ofbiz/framework/common/webcommon/WEB-INF/handlers-controller.xml
>>      [java] 2014-03-12 15:54:49,242 (http-bio-0.0.0.0-8443-exec-8) [
>>  ConfigXMLReader.java:116:INFO ] controller loaded: 0.0s, 4 requests, 0
>> views in
>> file:/home/adrian/projects/ofbiz/applications/commonext/webapp/WEB-INF/controller.xml
>>      [java] 2014-03-12 15:54:49,266 (http-bio-0.0.0.0-8443-exec-8) [
>>  TransactionUtil.java:378:WARN ]
>>      [java] ---- exception report
>> ----------------------------------------------------------
>>      [java] [TransactionUtil.setRollbackOnly] Calling transaction
>> setRollbackOnly; this stack trace shows where this is happening:
>>      [java] Exception: java.lang.Exception
>>      [java] Message: Error in simple-method [Create a Payment Application
>> [file:/home/adrian/projects/ofbiz/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml#createPaymentApplication]]:
>> ; [Die Währungen der Rechnung und der Zahlung passen nicht zusammen]
>>      [java] ---- stack trace
>> ---------------------------------------------------------------
>>      [java] java.lang.Exception: Error in simple-method [Create a Payment
>> Application
>> [file:/home/adrian/projects/ofbiz/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml#createPaymentApplication]]:
>> ; [Die Währungen der Rechnung und der Zahlung passen nicht zusammen]
>>      [java]
>> org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:378)
>>      [java]
>> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:319)
>>      [java] org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:578)
>>      [java]
>> org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:271)
>>      [java]
>> org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:290)
>>      [java]
>> org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:79)
>>      [java]
>> org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:48)
>>      [java]
>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:385)
>>      [java]
>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:220)
>>      [java]
>> org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:83)
>>      [java]
>> org.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:338)
>>      [java]
>> org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:695)
>>      [java]
>> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:420)
>>      [java]
>> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:214)
>>      [java]
>> org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:86)
>>      [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
>>      [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>      [java]
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>>      [java]
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>>      [java]
>> org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:314)
>>      [java]
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>>      [java]
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>>      [java]
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>>      [java]
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>>      [java]
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
>>      [java]
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>>      [java]
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
>>      [java]
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>>      [java]
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
>>      [java]
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>>      [java]
>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
>>      [java]
>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
>>      [java]
>> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
>>      [java]
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>      [java]
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>      [java] java.lang.Thread.run(Thread.java:744)
>>      [java]
>> --------------------------------------------------------------------------------
>>      [java]
>>      [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
>>  ServiceDispatcher.java:520:ERROR] Error in Service
>> [createPaymentApplication]: Die Währungen der Rechnung und der Zahlung
>> passen nicht zusammen
>>      [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
>>  TransactionUtil.java:341:ERROR]
>>      [java] ---- exception report
>> ----------------------------------------------------------
>>      [java] [TransactionUtil.rollback]
>>      [java] Exception: java.lang.Exception
>>      [java] Message: Stack Trace
>>      [java] ---- stack trace
>> ---------------------------------------------------------------
>>      [java] java.lang.Exception: Stack Trace
>>      [java]
>> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:340)
>>      [java]
>> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:317)
>>      [java]
>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:524)
>>      [java]
>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:220)
>>      [java]
>> org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:83)
>>      [java]
>> org.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:338)
>>      [java]
>> org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:695)
>>      [java]
>> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:420)
>>      [java]
>> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:214)
>>      [java]
>> org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:86)
>>      [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
>>      [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>      [java]
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>>      [java]
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>>      [java]
>> org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:314)
>>      [java]
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>>      [java]
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>>      [java]
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>>      [java]
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>>      [java]
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
>>      [java]
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>>      [java]
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
>>      [java]
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>>      [java]
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
>>      [java]
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>>      [java]
>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
>>      [java]
>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
>>      [java]
>> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
>>      [java]
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>      [java]
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>      [java] java.lang.Thread.run(Thread.java:744)
>>      [java]
>> --------------------------------------------------------------------------------
>>      [java]
>>      [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
>>  TransactionUtil.java:351:INFO ] [TransactionUtil.rollback] transaction
>> rolled back
>>      [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
>>  ServiceDispatcher.java:586:INFO ] Sync service
>> [accounting/createPaymentApplication] finished in [20] milliseconds
>>      [java] 2014-03-12 15:54:49,268 (http-bio-0.0.0.0-8443-exec-8) [
>> RequestHandler.java:696:INFO ] Ran Event
>> [service:#createPaymentApplication] from [request], result is [error]
>>      [java] 2014-03-12 15:54:49,268 (http-bio-0.0.0.0-8443-exec-8) [
>> RequestHandler.java:479:WARN ] Could not find response in request
>> [createPaymentApplication] for event return [error]
>>      [java] 2014-03-12 15:54:49,268 (http-bio-0.0.0.0-8443-exec-8) [
>> RequestHandler.java:814:INFO ] Rendering View [editPaymentApplications],
>> sessionId=F17B26D438585A88886D3CF3382C441A.jvm1
>>      [java] 2014-03-12 15:54:49,337 (http-bio-0.0.0.0-8443-exec-8) [
>>  ServiceDispatcher.java:586:INFO ] Sync service
>> [accounting/getUserPreferenceGroup] finished in [1] milliseconds
>>      [java] 2014-03-12 15:54:49,343 (http-bio-0.0.0.0-8443-exec-8) [
>>  ScreenFactory.java:130:INFO ] Got 13 screens in 0.006s from:
>> file:/home/adrian/projects/ofbiz/applications/accounting/widget/PaymentScreens.xml
>>      [java] experiment: creating class manager
>>      [java] experiment: creating class manager
>>      [java] experiment: creating class manager
>>      [java] 2014-03-12 15:54:49,569 (http-bio-0.0.0.0-8443-exec-8) [
>>  ScreenFactory.java:130:INFO ] Got 10 screens in 0.008s from:
>> file:/home/adrian/projects/ofbiz/applications/accounting/widget/CommonScreens.xml
>>      [java] 2014-03-12 15:54:49,577 (http-bio-0.0.0.0-8443-exec-8) [
>>  ScreenFactory.java:130:INFO ] Got 1 screens in 0.007s from:
>> file:/home/adrian/projects/ofbiz/applications/commonext/widget/CommonScreens.xml
>>      [java] 2014-03-12 15:54:49,578 (http-bio-0.0.0.0-8443-exec-8) [
>> PrimaryKeyFinder.java:158:INFO ] Returning null because found incomplete
>> primary key in find: [GenericEntity:PartyNameView][partyId,null()]
>>      [java] 2014-03-12 15:54:49,629 (http-bio-0.0.0.0-8443-exec-8) [
>>  ServiceDispatcher.java:586:INFO ] Sync service
>> [accounting/getLastSystemInfoNote] finished in [17] milliseconds
>>      [java] 2014-03-12 15:54:49,653 (http-bio-0.0.0.0-8443-exec-8) [
>>  ScreenFactory.java:130:INFO ] Got 24 screens in 0.013s from:
>> file:/home/adrian/projects/ofbiz/framework/common/widget/CommonScreens.xml
>>      [java] 2014-03-12 15:54:49,679 (http-bio-0.0.0.0-8443-exec-8) [
>>  ServiceDispatcher.java:586:INFO ] Sync service
>> [accounting/getVisualThemeResources] finished in [23] milliseconds
>>      [java] 2014-03-12 15:54:49,922 (http-bio-0.0.0.0-8443-exec-8) [
>>  ServiceDispatcher.java:586:INFO ] Sync service
>> [accounting/acctgBasePermissionCheck] finished in [43] milliseconds
>>      [java] 2014-03-12 15:54:49,928 (http-bio-0.0.0.0-8443-exec-8) [
>>  ServiceDispatcher.java:586:INFO ] Sync service
>> [accounting/acctgBasePermissionCheck] finished in [3] milliseconds
>>      [java] experiment: creating class manager
>>      [java] 2014-03-12 15:54:50,079 (http-bio-0.0.0.0-8443-exec-8) [
>>   ServerHitBin.java:637:INFO ] Visit delegatorName=default, ServerHitBin
>> delegatorName=default
>>      [java] 2014-03-12 15:54:50,084 (http-bio-0.0.0.0-8443-exec-8) [
>> ControlServlet.java:324:INFO ] [[[createPaymentApplication(Domain:
>> https://localhost)] Request Done- total:0.877,since
>> last([createPaymentApp...):0.877]]
>>
>>
>>
>> On 12 March 2014 15:44, Adrian Stern <[hidden email]> wrote:
>>
>>> Ok.
>>>
>>> I made the change from USD to CHF in this file, but the outcome is still
>>> the same:
>>>
>>> applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:
>>>  <set field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>
>>> applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:
>>>  <set field="acctgPreferenceCtx.baseCurrencyUomId" value="CHF"/>
>>>
>>>
>>>
>>>
>>> On 11 March 2014 17:14, Pierre @GMail <[hidden email]> wrote:
>>>
>>>> Yes. It is in the entity with the same name.
>>>>
>>>> Sent from my iPhone
>>>>
>>>> > On 11 mrt. 2014, at 15:22, Adrian Stern <[hidden email]> wrote:
>>>> >
>>>> > Sorry. It is hard to find. Do you refer to somwhere in the GUI or do
>>>> you
>>>> > refer to some XML file?
>>>> >
>>>> > I did find this:
>>>> > applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:
>>>>  <set
>>>> > field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>
>>>> >
>>>> > Ist this the right one? Otherwise i would appreciate a more precise
>>>> > insruction.
>>>> >
>>>> >
>>>> >> On 11 March 2014 14:32, Pierre Smits <[hidden email]> wrote:
>>>> >>
>>>> >> Adrian,
>>>> >>
>>>> >> If you have changed your default currency manually, I advice you to
>>>> also
>>>> >> check the 'baseCurrencyUomId' value in PartyAcctgPreference.
>>>> >>
>>>> >> This must be in sync.
>>>> >>
>>>> >> Regards,
>>>> >>
>>>> >> Pierre Smits
>>>> >>
>>>> >> *ORRTIZ.COM <http://www.orrtiz.com>*
>>>> >> Services & Solutions for Cloud-
>>>> >> Based Manufacturing, Professional
>>>> >> Services and Retail & Trade
>>>> >> http://www.orrtiz.com
>>>> >>
>>>>
>>>
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Pierre Smits
Adrian,

Unfortunately, I don't have the time available to investigate this and your
other issue further in the near future. If you feel that your setup is
correctly implemented and this seems a bug, please file a JIRA issue.

Regards,

Pierre Smits

*ORRTIZ.COM <http://www.orrtiz.com>*
Services & Solutions for Cloud-
Based Manufacturing, Professional
Services and Retail & Trade
http://www.orrtiz.com
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Mike Z
In reply to this post by Adrian Stern
Just a guess.  Have you looked at:

./applications/accounting/config/AccountingUiLabels.xml



On Wed, Mar 12, 2014 at 12:18 PM, Adrian Stern <[hidden email]> wrote:

> I tried the following with Demo Data:
>
> 1. Create Invoice USD; Pay invoice with USD Payment => works
> 2. Create Invoice CHF; Pay invoice with CHF Payment => currencies don't
> match
>
> I tried the following wign my own Configuration (CHF)
>
> 1. Create Invoice USD; Pay invoice with USD Payment => works
> 2. Create Invoice AFA; Pay invoice with AFA Payment => currencies don't
> match
>
> For the CHF payment, as well as the AFA payment, i created the Foreing
> Exchange Rates:
> CHF to USD - 1.14
> USD to CHF - 0.67
> AFA to CHF - 0.9
> CHF to AFA - 1.1
>
> I also tried to replace all USD with CHF in demo data with the same resutl.
> Currencies won't match.
>
> Could anyone try this out and report if the problem exists? It could be a
> general problem!
>
>
> On 12 March 2014 19:47, Adrian Stern <[hidden email]> wrote:
>
> > I tried the following with Demo Data:
> >
> > 1. Create Invoice USD; Pay invoice with USD Payment => works
> > 2. Create Invoice CHF; Pay invoice with CHF Payment => currencies don't
> > match
> >
> > For the CHF payment i created the Foreing Exchange Rates:
> > CHF to USD - 1.14
> > USD to CHF - 0.67
> >
> > I also tried to replace all USD with CHF in demo data with the same
> > resutl. Currencies won't match.
> >
> > Could anyone try this out and report if the problem exists?
> >
> >
> > On 12 March 2014 16:13, Adrian Stern <[hidden email]> wrote:
> >
> >> Some more Information:
> >>
> >> In the file
> >>
> >>
> ofbiz/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
> >>
> >> the error would be somwhere here:
> >> *            <!-- check the currencies if they are compatible -->
> >>   *
> >>             <property-to-field field="defaultCurrencyUomId"
> >> resource="general" property="currency.uom.id.default" default="*USD*"/>
> >>             <if>
> >>                 <condition>
> >>                     <or>
> >>                         <if-compare-field  field="invoice.currencyUomId"
> >> operator="equals" to-field="defaultCurrencyUomId"/>
> >>                         <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"/>
> >>                         </and>
> >>                     </or> </condition>
> >>                 <then><!-- if required get the payment amount in foreign
> >> currency (local we already have) -->
> >>                     <if-compare-field  field="invoice.currencyUomId"
> >> operator="not-equals" to-field="defaultCurrencyUomId">
> >>                         <set field="actual" value="true"
> type="Boolean"/>
> >>                         <call-class-method
> >> method-name="getPaymentNotApplied"
> >> class-name="org.ofbiz.accounting.payment.PaymentWorker"
> >> ret-field="notAppliedPayment">
> >>                             <field field="payment" type="GenericValue"/>
> >>                             <field field="actual" type="Boolean"/>
> >>                         </call-class-method>
> >>                     </if-compare-field>
> >>                 </then>
> >>                 <else>
> >>                     <add-error>
> >>                         <fail-property resource="AccountingUiLabels"
> >> property="AccountingCurrenciesOfInvoiceAndPaymentNotCompatible"/>
> >>                     </add-error>
> >>                 </else>
> >>             </if>
> >>             <check-errors/>
> >>
> >>
> >> Stack Trace of when its going wrong (all the time):
> >>
> >>  [java] 2014-03-12 15:54:49,207 (http-bio-0.0.0.0-8443-exec-8) [
> >> ControlServlet.java:140:INFO ] [[[createPaymentApplication(Domain:
> >> https://localhost)] Request Begun, encoding=[UTF-8]- total:0.0,since
> >> last(Begin):0.0]]
> >>      [java] 2014-03-12 15:54:49,231 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ConfigXMLReader.java:116:INFO ] controller loaded: 0.009s, 482
> requests,
> >> 228 views in jndi:/0.0.0.0/accounting/WEB-INF/controller.xml
> >>      [java] 2014-03-12 15:54:49,236 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ConfigXMLReader.java:116:INFO ] controller loaded: 0.001s, 39
> requests, 19
> >> views in
> >>
> file:/home/adrian/projects/ofbiz/framework/common/webcommon/WEB-INF/common-controller.xml
> >>      [java] 2014-03-12 15:54:49,239 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ConfigXMLReader.java:116:INFO ] controller loaded: 0.0s, 0 requests, 0
> >> views in
> >>
> file:/home/adrian/projects/ofbiz/framework/common/webcommon/WEB-INF/handlers-controller.xml
> >>      [java] 2014-03-12 15:54:49,242 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ConfigXMLReader.java:116:INFO ] controller loaded: 0.0s, 4 requests, 0
> >> views in
> >>
> file:/home/adrian/projects/ofbiz/applications/commonext/webapp/WEB-INF/controller.xml
> >>      [java] 2014-03-12 15:54:49,266 (http-bio-0.0.0.0-8443-exec-8) [
> >>  TransactionUtil.java:378:WARN ]
> >>      [java] ---- exception report
> >> ----------------------------------------------------------
> >>      [java] [TransactionUtil.setRollbackOnly] Calling transaction
> >> setRollbackOnly; this stack trace shows where this is happening:
> >>      [java] Exception: java.lang.Exception
> >>      [java] Message: Error in simple-method [Create a Payment
> Application
> >>
> [file:/home/adrian/projects/ofbiz/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml#createPaymentApplication]]:
> >> ; [Die Währungen der Rechnung und der Zahlung passen nicht zusammen]
> >>      [java] ---- stack trace
> >> ---------------------------------------------------------------
> >>      [java] java.lang.Exception: Error in simple-method [Create a
> Payment
> >> Application
> >>
> [file:/home/adrian/projects/ofbiz/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml#createPaymentApplication]]:
> >> ; [Die Währungen der Rechnung und der Zahlung passen nicht zusammen]
> >>      [java]
> >>
> org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:378)
> >>      [java]
> >>
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:319)
> >>      [java] org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:578)
> >>      [java]
> >> org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:271)
> >>      [java]
> >> org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:290)
> >>      [java]
> >>
> org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:79)
> >>      [java]
> >>
> org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:48)
> >>      [java]
> >> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:385)
> >>      [java]
> >> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:220)
> >>      [java]
> >>
> org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:83)
> >>      [java]
> >>
> org.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:338)
> >>      [java]
> >>
> org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:695)
> >>      [java]
> >>
> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:420)
> >>      [java]
> >> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:214)
> >>      [java]
> >> org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:86)
> >>      [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
> >>      [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >>      [java]
> >>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
> >>      [java]
> >>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> >>      [java]
> >> org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:314)
> >>      [java]
> >>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> >>      [java]
> >>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> >>      [java]
> >>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
> >>      [java]
> >>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
> >>      [java]
> >>
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
> >>      [java]
> >>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
> >>      [java]
> >>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> >>      [java]
> >>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
> >>      [java]
> >>
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
> >>      [java]
> >>
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> >>      [java]
> >>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
> >>      [java]
> >>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
> >>      [java]
> >>
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
> >>      [java]
> >>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> >>      [java]
> >>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> >>      [java] java.lang.Thread.run(Thread.java:744)
> >>      [java]
> >>
> --------------------------------------------------------------------------------
> >>      [java]
> >>      [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ServiceDispatcher.java:520:ERROR] Error in Service
> >> [createPaymentApplication]: Die Währungen der Rechnung und der Zahlung
> >> passen nicht zusammen
> >>      [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
> >>  TransactionUtil.java:341:ERROR]
> >>      [java] ---- exception report
> >> ----------------------------------------------------------
> >>      [java] [TransactionUtil.rollback]
> >>      [java] Exception: java.lang.Exception
> >>      [java] Message: Stack Trace
> >>      [java] ---- stack trace
> >> ---------------------------------------------------------------
> >>      [java] java.lang.Exception: Stack Trace
> >>      [java]
> >>
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:340)
> >>      [java]
> >>
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:317)
> >>      [java]
> >> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:524)
> >>      [java]
> >> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:220)
> >>      [java]
> >>
> org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:83)
> >>      [java]
> >>
> org.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:338)
> >>      [java]
> >>
> org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:695)
> >>      [java]
> >>
> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:420)
> >>      [java]
> >> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:214)
> >>      [java]
> >> org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:86)
> >>      [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
> >>      [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >>      [java]
> >>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
> >>      [java]
> >>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> >>      [java]
> >> org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:314)
> >>      [java]
> >>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> >>      [java]
> >>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> >>      [java]
> >>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
> >>      [java]
> >>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
> >>      [java]
> >>
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
> >>      [java]
> >>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
> >>      [java]
> >>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> >>      [java]
> >>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
> >>      [java]
> >>
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
> >>      [java]
> >>
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> >>      [java]
> >>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
> >>      [java]
> >>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
> >>      [java]
> >>
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
> >>      [java]
> >>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> >>      [java]
> >>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> >>      [java] java.lang.Thread.run(Thread.java:744)
> >>      [java]
> >>
> --------------------------------------------------------------------------------
> >>      [java]
> >>      [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
> >>  TransactionUtil.java:351:INFO ] [TransactionUtil.rollback] transaction
> >> rolled back
> >>      [java] 2014-03-12 15:54:49,267 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ServiceDispatcher.java:586:INFO ] Sync service
> >> [accounting/createPaymentApplication] finished in [20] milliseconds
> >>      [java] 2014-03-12 15:54:49,268 (http-bio-0.0.0.0-8443-exec-8) [
> >> RequestHandler.java:696:INFO ] Ran Event
> >> [service:#createPaymentApplication] from [request], result is [error]
> >>      [java] 2014-03-12 15:54:49,268 (http-bio-0.0.0.0-8443-exec-8) [
> >> RequestHandler.java:479:WARN ] Could not find response in request
> >> [createPaymentApplication] for event return [error]
> >>      [java] 2014-03-12 15:54:49,268 (http-bio-0.0.0.0-8443-exec-8) [
> >> RequestHandler.java:814:INFO ] Rendering View [editPaymentApplications],
> >> sessionId=F17B26D438585A88886D3CF3382C441A.jvm1
> >>      [java] 2014-03-12 15:54:49,337 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ServiceDispatcher.java:586:INFO ] Sync service
> >> [accounting/getUserPreferenceGroup] finished in [1] milliseconds
> >>      [java] 2014-03-12 15:54:49,343 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ScreenFactory.java:130:INFO ] Got 13 screens in 0.006s from:
> >>
> file:/home/adrian/projects/ofbiz/applications/accounting/widget/PaymentScreens.xml
> >>      [java] experiment: creating class manager
> >>      [java] experiment: creating class manager
> >>      [java] experiment: creating class manager
> >>      [java] 2014-03-12 15:54:49,569 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ScreenFactory.java:130:INFO ] Got 10 screens in 0.008s from:
> >>
> file:/home/adrian/projects/ofbiz/applications/accounting/widget/CommonScreens.xml
> >>      [java] 2014-03-12 15:54:49,577 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ScreenFactory.java:130:INFO ] Got 1 screens in 0.007s from:
> >>
> file:/home/adrian/projects/ofbiz/applications/commonext/widget/CommonScreens.xml
> >>      [java] 2014-03-12 15:54:49,578 (http-bio-0.0.0.0-8443-exec-8) [
> >> PrimaryKeyFinder.java:158:INFO ] Returning null because found incomplete
> >> primary key in find: [GenericEntity:PartyNameView][partyId,null()]
> >>      [java] 2014-03-12 15:54:49,629 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ServiceDispatcher.java:586:INFO ] Sync service
> >> [accounting/getLastSystemInfoNote] finished in [17] milliseconds
> >>      [java] 2014-03-12 15:54:49,653 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ScreenFactory.java:130:INFO ] Got 24 screens in 0.013s from:
> >>
> file:/home/adrian/projects/ofbiz/framework/common/widget/CommonScreens.xml
> >>      [java] 2014-03-12 15:54:49,679 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ServiceDispatcher.java:586:INFO ] Sync service
> >> [accounting/getVisualThemeResources] finished in [23] milliseconds
> >>      [java] 2014-03-12 15:54:49,922 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ServiceDispatcher.java:586:INFO ] Sync service
> >> [accounting/acctgBasePermissionCheck] finished in [43] milliseconds
> >>      [java] 2014-03-12 15:54:49,928 (http-bio-0.0.0.0-8443-exec-8) [
> >>  ServiceDispatcher.java:586:INFO ] Sync service
> >> [accounting/acctgBasePermissionCheck] finished in [3] milliseconds
> >>      [java] experiment: creating class manager
> >>      [java] 2014-03-12 15:54:50,079 (http-bio-0.0.0.0-8443-exec-8) [
> >>   ServerHitBin.java:637:INFO ] Visit delegatorName=default, ServerHitBin
> >> delegatorName=default
> >>      [java] 2014-03-12 15:54:50,084 (http-bio-0.0.0.0-8443-exec-8) [
> >> ControlServlet.java:324:INFO ] [[[createPaymentApplication(Domain:
> >> https://localhost)] Request Done- total:0.877,since
> >> last([createPaymentApp...):0.877]]
> >>
> >>
> >>
> >> On 12 March 2014 15:44, Adrian Stern <[hidden email]> wrote:
> >>
> >>> Ok.
> >>>
> >>> I made the change from USD to CHF in this file, but the outcome is
> still
> >>> the same:
> >>>
> >>> applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:
> >>>  <set field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>
> >>> applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:
> >>>  <set field="acctgPreferenceCtx.baseCurrencyUomId" value="CHF"/>
> >>>
> >>>
> >>>
> >>>
> >>> On 11 March 2014 17:14, Pierre @GMail <[hidden email]> wrote:
> >>>
> >>>> Yes. It is in the entity with the same name.
> >>>>
> >>>> Sent from my iPhone
> >>>>
> >>>> > On 11 mrt. 2014, at 15:22, Adrian Stern <[hidden email]> wrote:
> >>>> >
> >>>> > Sorry. It is hard to find. Do you refer to somwhere in the GUI or do
> >>>> you
> >>>> > refer to some XML file?
> >>>> >
> >>>> > I did find this:
> >>>> > applications/commonext/script/org/ofbiz/setup/SetupEvents.xml:
> >>>>  <set
> >>>> > field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>
> >>>> >
> >>>> > Ist this the right one? Otherwise i would appreciate a more precise
> >>>> > insruction.
> >>>> >
> >>>> >
> >>>> >> On 11 March 2014 14:32, Pierre Smits <[hidden email]>
> wrote:
> >>>> >>
> >>>> >> Adrian,
> >>>> >>
> >>>> >> If you have changed your default currency manually, I advice you to
> >>>> also
> >>>> >> check the 'baseCurrencyUomId' value in PartyAcctgPreference.
> >>>> >>
> >>>> >> This must be in sync.
> >>>> >>
> >>>> >> Regards,
> >>>> >>
> >>>> >> Pierre Smits
> >>>> >>
> >>>> >> *ORRTIZ.COM <http://www.orrtiz.com>*
> >>>> >> Services & Solutions for Cloud-
> >>>> >> Based Manufacturing, Professional
> >>>> >> Services and Retail & Trade
> >>>> >> http://www.orrtiz.com
> >>>> >>
> >>>>
> >>>
> >>>
> >>
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

hans_bakker
In reply to this post by Adrian Stern
The system will check the currency of the invoice with the currency of
the payment, or with the original currency of the payment.

If a match cannot be found, you will get this message....

Regards,
Hans Bakker
antwebsystems.com

On 11/03/14 19:17, Adrian Stern wrote:

> Hi Guys
>
> Whenever i want to assign a payment to an invoice i get this error:
>
> The Following Errors Occurred:
> Currencies of invoice and payment not compatible
>
> Thing is both, the invoice and the payment use the same currency: CHF.
> I can set the Is-Currency (Actual Currency) property for my payment
> and then i can assign it to the invoice but this seems unnecessary and
> it is not necessary when dealing with USD and the Demo Data.
>
> I updated framework/common/config/genera.properties to set CHF as
> default currency.
>
> Where would i change it so if no additional currency information is
> given, it takes the same currency as the payment?
>
> Regards,
> Adrian

Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Adrian Stern
Hey Mike

Thanks for your answer. But i just cant anything like this inside the file
you mention. "property-to-field" is no string inside it at all.

And Hans, thanks for your answer as well. The reason for me to post this is
because the currencies "should" match but seemingly don't.


On 13 March 2014 02:15, Hans Bakker <[hidden email]> wrote:

> The system will check the currency of the invoice with the currency of the
> payment, or with the original currency of the payment.
>
> If a match cannot be found, you will get this message....
>
> Regards,
> Hans Bakker
> antwebsystems.com
>
>
> On 11/03/14 19:17, Adrian Stern wrote:
>
>> Hi Guys
>>
>> Whenever i want to assign a payment to an invoice i get this error:
>>
>> The Following Errors Occurred:
>> Currencies of invoice and payment not compatible
>>
>> Thing is both, the invoice and the payment use the same currency: CHF. I
>> can set the Is-Currency (Actual Currency) property for my payment and then
>> i can assign it to the invoice but this seems unnecessary and it is not
>> necessary when dealing with USD and the Demo Data.
>>
>> I updated framework/common/config/genera.properties to set CHF as
>> default currency.
>>
>> Where would i change it so if no additional currency information is
>> given, it takes the same currency as the payment?
>>
>> Regards,
>> Adrian
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Adrian Stern
Could i ask anyone to my problem in a working environment? I would like to
know if it is a bug or just a misconfiguration:

1. Create Invoice with one Item in a Currency which is not USD
2. Create Payment in the same Currency and apply it to Invoice

Does this work? Or do the "currencies not match"?


On 13 March 2014 08:49, Adrian Stern <[hidden email]> wrote:

> Hey Mike
>
> Thanks for your answer. But i just cant anything like this inside the file
> you mention. "property-to-field" is no string inside it at all.
>
> And Hans, thanks for your answer as well. The reason for me to post this
> is because the currencies "should" match but seemingly don't.
>
>
> On 13 March 2014 02:15, Hans Bakker <[hidden email]> wrote:
>
>> The system will check the currency of the invoice with the currency of
>> the payment, or with the original currency of the payment.
>>
>> If a match cannot be found, you will get this message....
>>
>> Regards,
>> Hans Bakker
>> antwebsystems.com
>>
>>
>> On 11/03/14 19:17, Adrian Stern wrote:
>>
>>> Hi Guys
>>>
>>> Whenever i want to assign a payment to an invoice i get this error:
>>>
>>> The Following Errors Occurred:
>>> Currencies of invoice and payment not compatible
>>>
>>> Thing is both, the invoice and the payment use the same currency: CHF. I
>>> can set the Is-Currency (Actual Currency) property for my payment and then
>>> i can assign it to the invoice but this seems unnecessary and it is not
>>> necessary when dealing with USD and the Demo Data.
>>>
>>> I updated framework/common/config/genera.properties to set CHF as
>>> default currency.
>>>
>>> Where would i change it so if no additional currency information is
>>> given, it takes the same currency as the payment?
>>>
>>> Regards,
>>> Adrian
>>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Pierre Smits
Adrian,

We, nor our customers, have any issues with EUR as a base currency.

It must be a configuration issue.

Regards,

Pierre Smits

*ORRTIZ.COM <http://www.orrtiz.com>*
Services & Solutions for Cloud-
Based Manufacturing, Professional
Services and Retail & Trade
http://www.orrtiz.com
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Jacopo Cappellato-4
In reply to this post by Adrian Stern
Adrian,

I confirm I am able to recreate the issue you are reporting.
Everything works fine if you run the "quick ship order" process; however if you pick and pack  (using the facility manager) you got the error reported.
I don't have time at the moment to investigate further but it should be easy to recreate.

Jacopo

On Mar 14, 2014, at 8:31 AM, Adrian Stern <[hidden email]> wrote:

> Could i ask anyone to my problem in a working environment? I would like to
> know if it is a bug or just a misconfiguration:
>
> 1. Create Invoice with one Item in a Currency which is not USD
> 2. Create Payment in the same Currency and apply it to Invoice
>
> Does this work? Or do the "currencies not match"?
>
>
> On 13 March 2014 08:49, Adrian Stern <[hidden email]> wrote:
>
>> Hey Mike
>>
>> Thanks for your answer. But i just cant anything like this inside the file
>> you mention. "property-to-field" is no string inside it at all.
>>
>> And Hans, thanks for your answer as well. The reason for me to post this
>> is because the currencies "should" match but seemingly don't.
>>
>>
>> On 13 March 2014 02:15, Hans Bakker <[hidden email]> wrote:
>>
>>> The system will check the currency of the invoice with the currency of
>>> the payment, or with the original currency of the payment.
>>>
>>> If a match cannot be found, you will get this message....
>>>
>>> Regards,
>>> Hans Bakker
>>> antwebsystems.com
>>>
>>>
>>> On 11/03/14 19:17, Adrian Stern wrote:
>>>
>>>> Hi Guys
>>>>
>>>> Whenever i want to assign a payment to an invoice i get this error:
>>>>
>>>> The Following Errors Occurred:
>>>> Currencies of invoice and payment not compatible
>>>>
>>>> Thing is both, the invoice and the payment use the same currency: CHF. I
>>>> can set the Is-Currency (Actual Currency) property for my payment and then
>>>> i can assign it to the invoice but this seems unnecessary and it is not
>>>> necessary when dealing with USD and the Demo Data.
>>>>
>>>> I updated framework/common/config/genera.properties to set CHF as
>>>> default currency.
>>>>
>>>> Where would i change it so if no additional currency information is
>>>> given, it takes the same currency as the payment?
>>>>
>>>> Regards,
>>>> Adrian
>>>>
>>>
>>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Pierre Smits
Adrian,

Given that Jacopo concurs that there is an issue, I suggest you file one in
JIRA.

Regards,

Pierre Smits

*ORRTIZ.COM <http://www.orrtiz.com>*
Services & Solutions for Cloud-
Based Manufacturing, Professional
Services and Retail & Trade
http://www.orrtiz.com
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Adrian Stern
Thanks for your support.

The question if it is a bug or not the following:

Do you ever need to create invoices in a currency other then your countrys.
The payments can always be in a foreign currency but would one need to
create an Invoice in a different Currency? Since we can set the currency of
the invoice i do beleve that it is a bug. What do you think?

This patch fixes the problem, however i'm not able to predict it's further
influences:

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"/>


I will file a bug.


On 14 March 2014 13:36, Pierre Smits <[hidden email]> wrote:

> Adrian,
>
> Given that Jacopo concurs that there is an issue, I suggest you file one in
> JIRA.
>
> Regards,
>
> Pierre Smits
>
> *ORRTIZ.COM <http://www.orrtiz.com>*
> Services & Solutions for Cloud-
> Based Manufacturing, Professional
> Services and Retail & Trade
> http://www.orrtiz.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Adrian Stern
Here is the link to the bug for everyone interested:

https://issues.apache.org/jira/browse/OFBIZ-5576


On 14 March 2014 15:09, Adrian Stern <[hidden email]> wrote:

> Thanks for your support.
>
> The question if it is a bug or not the following:
>
> Do you ever need to create invoices in a currency other then your
> countrys. The payments can always be in a foreign currency but would one
> need to create an Invoice in a different Currency? Since we can set the
> currency of the invoice i do beleve that it is a bug. What do you think?
>
> This patch fixes the problem, however i'm not able to predict it's further
> influences:
>
> 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"/>
>
>
> I will file a bug.
>
>
> On 14 March 2014 13:36, Pierre Smits <[hidden email]> wrote:
>
>> Adrian,
>>
>> Given that Jacopo concurs that there is an issue, I suggest you file one
>> in
>> JIRA.
>>
>> Regards,
>>
>> Pierre Smits
>>
>> *ORRTIZ.COM <http://www.orrtiz.com>*
>> Services & Solutions for Cloud-
>> Based Manufacturing, Professional
>> Services and Retail & Trade
>> http://www.orrtiz.com
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

Jacopo Cappellato-4
Hi Adrian,

I am reviewing the code and I should be able to commit a fix soon.

Hans: could you please clarify the requirements that led you implement all the overly complicated code around actualCurrencyAmount and actualCurrencyUomId?
The intended purpose of these fields was clearly mentioned in the entity definitions since the beginning:
<!-- The ActualCurrency amount and uomId are for the values coming from the bank (if known) and are to be used for reconciliation and such later, and not for PaymentApplication. -->

According to this, in order to apply a payment to an invoice the following conditions must be met:
* Invoice.currencyUomId == Payment.currencyUomId == PaymentApplication currency
If the Payment was in a different currency than one of the invoice, the actual currency and amount (in the foreign currency) should be stored in the actualCurrencyAmount and actualCurrencyUomId (these fields are for information only); but the Payment.currencyUomId and Payment.amount fields should always be filled with the currency of the Invoice.

Jacopo




On Mar 14, 2014, at 3:27 PM, Adrian Stern <[hidden email]> wrote:

> Here is the link to the bug for everyone interested:
>
> https://issues.apache.org/jira/browse/OFBIZ-5576
>
>
> On 14 March 2014 15:09, Adrian Stern <[hidden email]> wrote:
>
>> Thanks for your support.
>>
>> The question if it is a bug or not the following:
>>
>> Do you ever need to create invoices in a currency other then your
>> countrys. The payments can always be in a foreign currency but would one
>> need to create an Invoice in a different Currency? Since we can set the
>> currency of the invoice i do beleve that it is a bug. What do you think?
>>
>> This patch fixes the problem, however i'm not able to predict it's further
>> influences:
>>
>> 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"/>
>>
>>
>> I will file a bug.
>>
>>
>> On 14 March 2014 13:36, Pierre Smits <[hidden email]> wrote:
>>
>>> Adrian,
>>>
>>> Given that Jacopo concurs that there is an issue, I suggest you file one
>>> in
>>> JIRA.
>>>
>>> Regards,
>>>
>>> Pierre Smits
>>>
>>> *ORRTIZ.COM <http://www.orrtiz.com>*
>>> Services & Solutions for Cloud-
>>> Based Manufacturing, Professional
>>> Services and Retail & Trade
>>> http://www.orrtiz.com
>>>
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Currencies of invoice and payment not compatible - All the time

hans_bakker
Hi Jacopo,

Thanks for your work on this. However i implemented it the following way:

1. The invoice is in the currency of the related party which can be
foreign and can be shown in local currency by calculation, using the
currency exchange table.
2. The payment is always in the local currency as received from the
bank. (Reconciliation should be done in the ledger not payment?), if it
was a foreign payment the foreign value is entered in the original
currency field of the payment. When a payment is entered that way having
two currencies, the currency table is updated accordingly using the
invoice date so they always fully apply. This is wrong if you want to
record loss/gain of exchange rate and should be a configurable option
using either the invoice date or the payment date for the exchange rate.
This foreign invoice is entered in the ledger using in calculated local
currency however recording the actual foreign currency in the original
value in the ledger.

Matching invoices to payment should match the actual currency (not
calculated) of the invoice with the actual value of the payment and when
not the same use the original currency of the payment.

Regards,
Hans

On 18/03/14 23:18, Jacopo Cappellato wrote:

> Hi Adrian,
>
> I am reviewing the code and I should be able to commit a fix soon.
>
> Hans: could you please clarify the requirements that led you implement all the overly complicated code around actualCurrencyAmount and actualCurrencyUomId?
> The intended purpose of these fields was clearly mentioned in the entity definitions since the beginning:
> <!-- The ActualCurrency amount and uomId are for the values coming from the bank (if known) and are to be used for reconciliation and such later, and not for PaymentApplication. -->
>
> According to this, in order to apply a payment to an invoice the following conditions must be met:
> * Invoice.currencyUomId == Payment.currencyUomId == PaymentApplication currency
> If the Payment was in a different currency than one of the invoice, the actual currency and amount (in the foreign currency) should be stored in the actualCurrencyAmount and actualCurrencyUomId (these fields are for information only); but the Payment.currencyUomId and Payment.amount fields should always be filled with the currency of the Invoice.
>
> Jacopo
>
>
>
>
> On Mar 14, 2014, at 3:27 PM, Adrian Stern <[hidden email]> wrote:
>
>> Here is the link to the bug for everyone interested:
>>
>> https://issues.apache.org/jira/browse/OFBIZ-5576
>>
>>
>> On 14 March 2014 15:09, Adrian Stern <[hidden email]> wrote:
>>
>>> Thanks for your support.
>>>
>>> The question if it is a bug or not the following:
>>>
>>> Do you ever need to create invoices in a currency other then your
>>> countrys. The payments can always be in a foreign currency but would one
>>> need to create an Invoice in a different Currency? Since we can set the
>>> currency of the invoice i do beleve that it is a bug. What do you think?
>>>
>>> This patch fixes the problem, however i'm not able to predict it's further
>>> influences:
>>>
>>> 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"/>
>>>
>>>
>>> I will file a bug.
>>>
>>>
>>> On 14 March 2014 13:36, Pierre Smits <[hidden email]> wrote:
>>>
>>>> Adrian,
>>>>
>>>> Given that Jacopo concurs that there is an issue, I suggest you file one
>>>> in
>>>> JIRA.
>>>>
>>>> Regards,
>>>>
>>>> Pierre Smits
>>>>
>>>> *ORRTIZ.COM <http://www.orrtiz.com>*
>>>> Services & Solutions for Cloud-
>>>> Based Manufacturing, Professional
>>>> Services and Retail & Trade
>>>> http://www.orrtiz.com
>>>>
>>>

12