Skip to content

Dev check multi#228

Merged
codinguser merged 10 commits intocodinguser:developfrom
fefe982:dev-check-multi
Sep 24, 2014
Merged

Dev check multi#228
codinguser merged 10 commits intocodinguser:developfrom
fefe982:dev-check-multi

Conversation

@fefe982
Copy link
Copy Markdown
Contributor

@fefe982 fefe982 commented Sep 24, 2014

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.

codinguser added a commit that referenced this pull request Sep 24, 2014
Transaction involving multiple currencies cannot be modified.
Also add some bug fix to make mutli-currency transactions display correctly.

- 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.

- 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.

- 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.
@codinguser codinguser merged commit 998527c into codinguser:develop Sep 24, 2014
@fefe982 fefe982 deleted the dev-check-multi branch September 25, 2014 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants