codinguser/gnucash-android — pull request #228 by fefe982 (2014-09-24 14:56:59+00:00)
Title: Dev check multi

Add one restriction discussed in #220 : Transaction involving multiple currencies cannot be modified.
Also add some bug fix to make mutli-currency transactions display correctly.

1. Rewrite `setSplits` in `Transaction`. Now split is not added one by one through `addSplit`, but the split list is directly assigned. This way the currency information in split is kept. `addSplit` will reset the currency information. The currency information is used to display the correct currency symbol in split view.
2. In `TransactionFormFragment`, when a multi-currency transaction is loaded, every control is disabled except the split edit button. Pressing "save" or changing the account dropdown list on the upper left corner wouldn't change the transaction, an warning is shown instead. Transfer account dropdown is loaded with accounts without the currency restriction, so the correct transfer account can be shown. The split edit button will bring the `SplitEditDialogFragment`.
3. in `SplitEditDialogFragment`, when a multi-currency transaction is loaded, every control in each split is disabled. Pressing the "Add Split" button or "save" button would not change the transaction, a warning is shown instead. Balance in the lower right corner would not be calculated and fixed to zero. The account drop-down for each split is load without the currency restriction, so the correct account can be shown. As currency information for each split is kept (see 1), correct currency symbol is used for each split.