Just a guess. Have you looked at: ./applications/accounting/config/AccountingUiLabels.xml
On Wed, Mar 12, 2014 at 12:18 PM, Adrian Stern <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> wrote: > >>> > >>>> Yes. It is in the entity with the same name. > >>>> > >>>> Sent from my iPhone > >>>> > >>>> > On 11 mrt. 2014, at 15:22, Adrian Stern <[email protected]> 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 <[email protected]> > 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 > >>>> >> > >>>> > >>> > >>> > >> > > >
