Skip to content

Commit

Permalink
Merge pull request codinguser#578 from rivaldi8/bugfix-577-cant-save-…
Browse files Browse the repository at this point in the history
…transaction-single-entry

Bugfix 577: Can't save transactions on single entry mode - fixes codinguser#577
  • Loading branch information
codinguser authored Sep 14, 2016
2 parents 57241e8 + 1794882 commit b70f9e7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,9 @@ public boolean onOptionsItemSelected(MenuItem item) {
* @return {@code true} if the transaction can be saved, {@code false} otherwise
*/
private boolean canSave(){
return (mAmountEditText.isInputValid())
&& (mUseDoubleEntry && mTransferAccountSpinner.getCount() > 0);
return (mUseDoubleEntry && mAmountEditText.isInputValid()
&& mTransferAccountSpinner.getCount() > 0)
|| (!mUseDoubleEntry && mAmountEditText.isInputValid());
}

/**
Expand Down

0 comments on commit b70f9e7

Please sign in to comment.