How to deal with multi currencies

# Settings
- Settings -> Configuration -> Accounting <p><p>

    - [x] Allow multi currencies
        - Gain Exchange Rate Account: **Realized Gain**
        - Loss Exchange Rate Account: **Realized Loss**

> **Realized Gain/Loss**
>
> Consider a case the company currency and the trading currency are different.
> Debit/Credit in Journal Entry is always registered with the company currency.
> If there is a period between Invoice and Payment that generate Journals, 
> a rate (that the system applies) between the company and trading currencies may change during the period. 
> Realized Gain/Loss is automatically registered to reconcile this revaluation. 
> <p>
> 
> - Purchase Journal (HKD) - 08/2015
> 
|Name|Account|Debit|Credit|Amount Currency|Currency|
|:--|:--|--:|--:|--:|:--|
||Accounts Payable (JPY)|0.00|314.03|-5000.00|JPY|
|Product|GR/IR Cleaning|314.03|0.00|5000.00|JPY| 
> 
> <p>
>
> - Bank (JPY) - 09/2015
>
|Name|Account|Debit|Credit|Amount Currency|Currency|
|:--|:--|--:|--:|--:|:--|
|change:|Realized Loss|19.30|0.00|0.00|JPY|
|change:|Accounts Payable (JPY)|0.00|19.30|0.00|JPY|
||Accounts Payable (JPY)|333.33|0.00|5000.00|JPY|
||Bank (JPY)|0.00|333.33|-5000.00|JPY|
> 
> <p>
> <p>
> 
> **Unrealized Gain/Loss**
>
> Consider a case the company has Bank or Cash in foreign currency.
> If there is a period from Payment with foreign currency,
> a rate (that the system applies) between the company and foreign currencies may change during the period.
> Unrealized Gain/Loss represents revaluation of assets such as Bank or Cash.
> (It is manually registered when it is formally required such as opening/closing.)
> <p>
>
- Accounting -> Reporting -> Generic Reporting -> Multi-Currencies -> Unrealized Gain or Loss
> 
|Name|Secondary Currency|Exchange Rate|Foreign Balance|Adjusted Balance|Balance|Unrealized Gain or Loss|
|:--|:--|--:|--:|--:|--:|--:|
|Bank (JPY)|JPY|16.000000|-5000.00|-312.50|-333.33|20.83|
|Accounts Payable (JPY)|JPY|16.000000|0.00|0.00|0.00|0.00|
> 
> They are all the Accounts with Secondary Currency.
>
- `Foreign Balance`: total amount for transactions in the second currency
- `Adjusted Balance`: total amount for transactions in the company currency with current exchange rate
- `Balance`: Debit/Credit balance for the Accounts
- `Unrealized Gain or Loss`: Adjusted Balance - Balance
>


## Setting of Partner
- create **Pricelists**, **Pricelist Versions** and **Accounts Payable/Receivable** per currency
- set them for Partners
<p>

- When you create Purchase Orders, select the Partner, 
and the Pricelist and currency are automatically proposed.
- When you generate Invoices, select the Partner,
and the Accounts Payable/Receivable and currency are automatically proposed.
<p>

> As follows, Pricelist and Pricelist Version determine a rule of Cost Price and Sales Price of a product.
>
> **Pricelists**
>
- Pricelist Name: `Default Purchase Pricelist`
- Pricelist Type: Purchase Pricelist
- Currency: `XXX`
- Pricelist Versions: `Default Purchase Pricelist Version`

> **Pricelist Versions**
>
- Name: `Default Purchase Pricelist Version`
- Pricelist: `Default Purchase Pricelist (XXX)`
- Start Date:
- End Date:
- Price List Items
    - Rule Name: `Default Purchase Pricelist Line`
    - Product:
    - Min. Quantity:
    - Sequence:
    - Price Computation
        - Based on: `Cost Price`
        - New Price = Base Price * ( 1.00 + `0.00` ) + `0.00`
        - Rounding Method:
        - Min. Margin:
        - Max. Margin:

> **Accounts Payable/Receivable**
>
> We should create new Accounts Payable/Receivable with Secondary Currency per currency,
> so that the Accounts have consistency between Debit/Credit and Amount Currency
> (which is also required when we register Unrealized Gain/Loss).


## Setting of Payment Method
- In case the company pays using the trading currency not the company currency,
  we need to create Journals corresponding to Payment Methods
<p>

- create **Accounts**, **Sequence** and **Journals**

> **Accounts**
>
- Accounts Name: `Bank (XXX)`
- Parent:
- Internal Type: `Liquidity`
- Account Type: `Bank`
- Secondary Currency: `XXX`

> **Sequences**
> Settings -> Technical -> Sequences & Identifiers -> Sequences
>
- Name: `Bank (XXX)`
- Sequence
    - Prefix: `BNKXXX/%(yrear)/s`

> **Journals**
>
- Journal Name: `Bank`
- Code: `BNK`
- Type: Bank and Checks
- Default Debit Account: `Bank (XXX)`
- Default Credit Account: `Bank (XXX)`
- Currency: `XXX`
- Advanced Settings
    - Entry Sequence: `Bank (XXX)`
    - [x] Autopost Created Moves
    - [x] Allow Cancelling Entries

<p>
<p>

- If you Setup Your Bank Accounts without assignment of Account Journal, <br>
  (Accounting -> Configuration -> Accounts -> Setup Your Bank Accounts) <br>
  Accounts, Sequences and Journals are automatically generated.