@@ -263,22 +263,22 @@ public void onClick(View v) {
263263 * Starts the transfer of funds from one currency to another
264264 */
265265 private void startTransferFunds () {
266- Currency fromCurrency = Currency .getInstance (mTransactionsDbAdapter .getAccountCurrencyCode (mAccountUID ));
266+ Commodity fromCommodity = Commodity .getInstance (( mTransactionsDbAdapter .getAccountCurrencyCode (mAccountUID ) ));
267267 long id = mTransferAccountSpinner .getSelectedItemId ();
268- String targetCurrency = mAccountsDbAdapter .getCurrencyCode (mAccountsDbAdapter .getUID (id ));
268+ String targetCurrencyCode = mAccountsDbAdapter .getCurrencyCode (mAccountsDbAdapter .getUID (id ));
269269
270- if (fromCurrency .equals (Currency .getInstance (targetCurrency ))
270+ if (fromCommodity .equals (Commodity .getInstance (targetCurrencyCode ))
271271 || !mAmountEditText .isInputModified ()
272272 || mSplitQuantity != null ) //if both accounts have same currency
273273 return ;
274274
275275 BigDecimal amountBigd = mAmountEditText .getValue ();
276276 if (amountBigd .equals (BigDecimal .ZERO ))
277277 return ;
278- Money amount = new Money (amountBigd , Commodity . getInstance ( fromCurrency . getCurrencyCode ()) ).abs ();
278+ Money amount = new Money (amountBigd , fromCommodity ).abs ();
279279
280280 TransferFundsDialogFragment fragment
281- = TransferFundsDialogFragment .getInstance (amount , targetCurrency , this );
281+ = TransferFundsDialogFragment .getInstance (amount , targetCurrencyCode , this );
282282 fragment .show (getFragmentManager (), "transfer_funds_editor" );
283283 }
284284
@@ -496,8 +496,8 @@ private void initializeViewsWithTransaction(){
496496 }
497497
498498 String currencyCode = mTransactionsDbAdapter .getAccountCurrencyCode (mAccountUID );
499- Currency accountCurrency = Currency .getInstance (currencyCode );
500- mCurrencyTextView .setText (accountCurrency .getSymbol ());
499+ Commodity accountCommodity = Commodity .getInstance (currencyCode );
500+ mCurrencyTextView .setText (accountCommodity .getSymbol ());
501501
502502 Commodity commodity = Commodity .getInstance (currencyCode );
503503 mAmountEditText .setCommodity (commodity );
@@ -549,10 +549,9 @@ private void initalizeViews() {
549549 if (mAccountUID != null ){
550550 code = mTransactionsDbAdapter .getAccountCurrencyCode (mAccountUID );
551551 }
552- Currency accountCurrency = Currency .getInstance (code );
553- mCurrencyTextView .setText (accountCurrency .getSymbol ());
554552
555- Commodity commodity = Commodity .getInstance (code );
553+ Commodity commodity = Commodity .getInstance (code );
554+ mCurrencyTextView .setText (commodity .getSymbol ());
556555 mAmountEditText .setCommodity (commodity );
557556
558557 if (mUseDoubleEntry ){
0 commit comments