## MoneyWorks Manual

Edit

### Ledger Balances

One issue when working with different currencies is that they are no longer additive. For example if I add one US Dollar to one Australian Dollar I don’t come up with a sensible answer of two.

In the MoneyWorks general ledger, a foreign currency account is represented as two separate amounts: the value in the foreign currency, and the value of the difference between that currency and the base currency. The difference is stored in a (normally hidden) account called a “delta account”, so that the following is always true:

`Base Currency Value = Foreign Currency Value + Delta Value`

For simplicity, we’ll refer to this as the Currency Ratio (even though its not technically a ratio).

Thus if I transfer \$100 from my currency to a bank account in currency X, and the exchange rate is 1.5, I will end up with \$X150. In the general ledger this is represented as:

```    \$X Bank Account            \$150
```
```    \$X Bank Delta Account       -50
```

Thus the sum of a foreign currency account and its delta account will always give the local dollar equivalent at the current exchange rate.

In MoneyWorks the Delta accounts have a special code, basically the code of the corresponding account with `-~~DEL` appended. In the normal course of events, you will not see these.

### Exchange Rates

Exchange Rates do of course fluctuate. MoneyWorks stores one exchange rate per currency per period. The exchange rate (R) is stored as the number of foreign currency units the base currency is worth, i.e.

```    \$X = R * \$Local
```

When the exchange rate is changed (using the Change Currency Rate command), MoneyWorks will preserve the Currency Ratio. It does this by (in effect) recalculating what the balance in the delta account should be to preserve the ratio, and transferring the difference to a currency gain/loss account.

Thus if we revalue the exchange rate in the previous example from 1.5 to 1.4:

Our \$X150 are now worth 150/1.4 = \$107.14, so we need to change the amount in our delta account by 7.14 to maintain the Currency Ratio.

Thus we debit the delta account 7.14, and credit the currency gain account by 7.14. The balances in our \$X bank accounts are now:

```        \$X Bank Account             \$150.00
```
```        \$X Bank Delta Account       - 42.86
```

Which is sensible, because we still have \$X150, even though the rate may have changed. The magic thing is that our exchange rate is preserved:

```    \$X = R * \$Local

R = \$X/\$Local

= 150/107.14

= 1.4
```