diff --git a/src/com/money/manager/ex/CheckingAccountActivity.java b/src/com/money/manager/ex/CheckingAccountActivity.java index 8ef386c0c6..373c387fc3 100644 --- a/src/com/money/manager/ex/CheckingAccountActivity.java +++ b/src/com/money/manager/ex/CheckingAccountActivity.java @@ -534,7 +534,7 @@ public void onClick(View v) { intent.putExtra(SplitTransactionsActivity.KEY_DATASET_TYPE, TableSplitTransactions.class.getSimpleName()); // intent.putExtra(SplitTransactionsActivity.KEY_TRANSACTION_TYPE, mTransCode); // int transactionType = TransactionTypes.valueOf(mTransCode).getCode(); - intent.putExtra(SplitTransactionsActivity.KEY_TRANSACTION_TYPE, mTransactionType); + intent.putExtra(SplitTransactionsActivity.KEY_TRANSACTION_TYPE, mTransactionType.getCode()); intent.putParcelableArrayListExtra(SplitTransactionsActivity.KEY_SPLIT_TRANSACTION, mSplitTransactions); intent.putParcelableArrayListExtra(SplitTransactionsActivity.KEY_SPLIT_TRANSACTION_DELETED, mSplitTransactionsDeleted); startActivityForResult(intent, REQUEST_PICK_SPLIT_TRANSACTION); diff --git a/src/com/money/manager/ex/SplitTransactionsActivity.java b/src/com/money/manager/ex/SplitTransactionsActivity.java index 8723930531..6f6ac1e08d 100644 --- a/src/com/money/manager/ex/SplitTransactionsActivity.java +++ b/src/com/money/manager/ex/SplitTransactionsActivity.java @@ -148,9 +148,10 @@ protected void onCreate(Bundle savedInstanceState) { Intent intent = getIntent(); if (intent != null) { this.EntityTypeName = intent.getStringExtra(KEY_DATASET_TYPE); - //this.mParentTransactionType = intent.getStringExtra(KEY_TRANSACTION_TYPE); + int transactionType = intent.getIntExtra(KEY_TRANSACTION_TYPE, 0); mParentTransactionType = TransactionTypes.values()[transactionType]; + mSplitTransactions = intent.getParcelableArrayListExtra(KEY_SPLIT_TRANSACTION); mSplitDeleted = intent.getParcelableArrayListExtra(KEY_SPLIT_TRANSACTION_DELETED); } diff --git a/src/com/money/manager/ex/fragment/SplitItemFragment.java b/src/com/money/manager/ex/fragment/SplitItemFragment.java index 3997ef8b5d..f63c04bee5 100644 --- a/src/com/money/manager/ex/fragment/SplitItemFragment.java +++ b/src/com/money/manager/ex/fragment/SplitItemFragment.java @@ -93,10 +93,7 @@ public ISplitTransactionsDataset getSplitTransaction(TransactionTypes parentTran // otherwise figure out which sign to use for the amount. // toString takes the localized text! Use value. -// Object selectedItem = spinTransCode.getSelectedItem(); -// long id = spinTransCode.getSelectedItemId(); int position = spinTransCode.getSelectedItemPosition(); -// String transactionType = spinTransCode.getSelectedItem().toString(); TransactionTypes transactionType = TransactionTypes.values()[position]; if(!parentTransactionType.equals(transactionType)){ @@ -220,7 +217,8 @@ private int getTransactionTypeSelection(){ int transactionTypeSelection; SplitTransactionsActivity splitActivity = (SplitTransactionsActivity) getActivity(); - boolean parentIsWithdrawal = splitActivity.mParentTransactionType.equals(getString(R.string.withdrawal)); +// boolean parentIsWithdrawal = splitActivity.mParentTransactionType.equals(getString(R.string.withdrawal)); + boolean parentIsWithdrawal = splitActivity.mParentTransactionType.equals(TransactionTypes.Withdrawal); double amount = mSplitTransaction.getSplitTransAmount(); if(parentIsWithdrawal){ // parent is Withdrawal.