Default currency cannot be changed - is it a trapdoor setting?

Description

This bug occurs in 1.0. I'll log this now, and later when I have time I'll try
it on 1.1 and update the Issue with the results. Note: the 1.1 config file
(applicationConfiguration.default.properties) says the currency code is always
mutable.

On 1.0:
Change the default_currency in the currency table from for example currency_id
2, RUPEE, to currency_id 5, SHILLING.
Start mifos.
Click on a branch, then click on a loan officer.
Next, click on a Center.
Result: an HTTP 500 error with the message:
"javax.servlet.ServletException: java.lang.IllegalArgumentException: The desired
operation on money class is not possible because the two money objects are of
different currencies."

I'll put the full error in the correspondence.

Environment

Platform: All, OS: All

Activity

Show:
bberning
June 3, 2008, 10:25 AM

exception

javax.servlet.ServletException: java.lang.IllegalArgumentException: The desired
operation on money class is not possible because the two money objects are of
different currencies.
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.mifos.framework.struts.action.MifosRequestProcessor.processActionPerform(MifosRequestProcessor.java:266)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.mifos.framework.security.util.LoginFilter.doFilter(LoginFilter.java:109)
org.mifos.framework.persistence.DatabaseVersionFilter.doFilter(DatabaseVersionFilter.java:39)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause
java.lang.IllegalArgumentException: The desired operation on money class is not
possible because the two money objects are of different currencies.
org.mifos.framework.util.helpers.Money.add(Money.java:134)
org.mifos.application.customer.business.service.CustomerBusinessService.getTotalOutstandingLoan(CustomerBusinessService.java:263)
org.mifos.application.customer.business.service.CustomerBusinessService.getCenterPerformanceHistory(CustomerBusinessService.java:332)
org.mifos.application.customer.center.struts.action.CenterCustAction.get(CenterCustAction.java:382)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
org.mifos.framework.struts.action.BaseAction.execute(BaseAction.java:65)
org.mifos.framework.struts.action.MifosRequestProcessor.processActionPerform(MifosRequestProcessor.java:232)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.mifos.framework.security.util.LoginFilter.doFilter(LoginFilter.java:109)
org.mifos.framework.persistence.DatabaseVersionFilter.doFilter(DatabaseVersionFilter.java:39)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

emilytucker
June 4, 2008, 7:51 PM

Moving to vNext. We need to clarify the config file, and have marked this
as "Document in FS"

Kay Chau
December 16, 2008, 10:00 PM

moving all enhancements, p4, and p5 bugs to Unscheduled

Jeff Brewster
January 26, 2010, 5:47 PM

closing this issue reported against 1.0. Mifos now allows trapdoor setting for CurrencyCode via the custom properties file.

Invalid

Assignee

mifosdeveloperqueue

Reporter

bberning

Labels

None

URL

None

Story Points

None

Team

None

Scheduled For

None

Epic

None

Notify

None

productboard URL

None

Man Day Estimate

None

Components

Fix versions

Affects versions

Priority

Minor
Configure