Skip to content

Commit

Permalink
codinguser#876 - In Splits Editor, display imbalance as if account is…
Browse files Browse the repository at this point in the history
… an asset
  • Loading branch information
JeanGarf committed May 24, 2020
1 parent 07cf91e commit b59e69b
Showing 1 changed file with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,10 @@ public void onActivityCreated(Bundle savedInstanceState) {
view.findViewById(R.id.input_accounts_spinner).setEnabled(false);
view.findViewById(R.id.btn_remove_split).setVisibility(View.GONE);

// Get Preference about showing signum in Splits
boolean shallDisplayNegativeSignumInSplits = PreferenceManager.getDefaultSharedPreferences(getActivity())
.getBoolean(getString(R.string.key_display_negative_signum_in_splits),
false);
accountType.displayBalance(mImbalanceTextView,
// Display imbalance with signum and currency as if it was an asset
AccountType.ASSET.displayBalance(mImbalanceTextView,
new Money(mBaseAmount.negate(),
mCommodity),
shallDisplayNegativeSignumInSplits);
mCommodity));
}

}
Expand Down Expand Up @@ -660,15 +656,12 @@ public void afterTextChanged(Editable editable) {

} // for

// Get Preference about showing signum in Splits
boolean shallDisplayNegativeSignumInSplits = PreferenceManager.getDefaultSharedPreferences(getActivity())
.getBoolean(getString(R.string.key_display_negative_signum_in_splits),
false);
// AccountType accountType = mAccountsDbAdapter.getAccountType(mAccountUID);

// Display imbalance with signum and currency as if it was an asset
AccountType.ASSET.displayBalance(mImbalanceTextView,
new Money(imbalance,
mCommodity),
shallDisplayNegativeSignumInSplits);
mCommodity));
}
}

Expand Down

0 comments on commit b59e69b

Please sign in to comment.