Skip to content

Commit

Permalink
Merge d13081b into d2c7b95
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadaljunied committed Oct 30, 2019
2 parents d2c7b95 + d13081b commit b0e6ba0
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 5 deletions.
11 changes: 11 additions & 0 deletions docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,17 @@ The following activity diagram summarizes what happens when a user enter somethi

image::AutocompleteActivityDiagram.png[]

=== Currency Conversion

The Currency conversion is achieved by having a default base currency that all expenses and budgets use if one is not specified. The expenses that are stored
with a different currency can be converted from the base currency and back. Every time a currency is specified, the present day exchange rate is stored with the expense. This
is to ensure that the expense value is timeless.

Foreign Currency exchange rates between the default currency, Singapore Dollars (SGD) and a number of supported currencies is made possible by means
of a HTTP Request to an endpoint returning a JSON containing the exchange rates. This JSON response is stored as is on disk and is only requested once
upon first launching the application. A default data-set with relatively recent data is in place to ensure that MyMorise is still usable, albeit with some margin of error
with conversions, even without internet access to retrieve the latest data for the day.

=== Logging

We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations.
Expand Down
50 changes: 45 additions & 5 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,51 @@ Deletes the 1st expense in the results of the find command.
Deletes the second budget in the budget list in MYMorise.
// end::delete[]

=== Setting a default currency for MYMorise
todo

=== Convert budgets or expenses to a different currency
{Shows the current list of expenses in a certain currency}
=== Automatic currency conversion for foreign currencies
MyMorise is able to automatically display foreign currencies in the default currency set by the user. By default this is set
to Singapore Dollars (SGD). The conversions are done in the following scenarios:

* When an expenses specifies a currency that is not the default currency
* When an expense specifies a currency that is different from that budget it is associated to.

This automatic conversion allows for the computation of budgets and expenses regardless of their underlying currencies to provide
a cleaner experience when viewing budgets and expenses with multiple differing currencies.

The latest Foreign Exchange data for a limited set of supported currencies are updated whenever the application is launched. The list of supported currencies are as follows:

* CAD
* HKD
* ISK
* PHP
* DKK
* HUF
* CZK
* GBP
* RON
* SEK
* IDR
* INR
* BRL
* RUB
* HRK
* JPY
* THB
* CHF
* EUR
* MYR
* BGN
* TRY
* CNY
* NOK
* NZD
* ZAR
* USD
* MXN
* SGD
* AUD
* ILS
* KRW
* PLN

=== Autocomplete
Equip with IDE-like autocomplete function for faster input and
Expand Down

0 comments on commit b0e6ba0

Please sign in to comment.