Add "Hide Liabilities with zero balance" option to home view

Authored by whiting on Jun 16 2019, 3:33 PM.



To make it quicker and easier to see all liabilities at once add the (disabled by default) option to hide liabilities that have a zero balance.

Test Plan

When this new option is enabled, all liability accounts with a 0 balance do not appear on the home screen summary.

Diff Detail

Lint Skipped
Unit Tests Skipped
whiting requested review of this revision.Jun 16 2019, 3:33 PM
whiting created this revision.

I'm open to having this option also hide asset accounts with zero balance, though that might be better as a separate option. Personally I'd like to continue to see my zero balance assets to be reminded I need to put something in them at some point (or close them if they are not being useful, etc.)

tbaumgart requested changes to this revision.Jun 16 2019, 5:15 PM

Other than that it looks good. Also having a separate option for asset accounts is fair enough.


I would change this into:

const auto value = MyMoneyFile::instance()->balance((*it).id(), QDate::currentDate());
if (!(KMyMoneySettings::hideZeroBalanceLiabilities() &&
            value.isZero())) {
This revision now requires changes to proceed.Jun 16 2019, 5:15 PM
whiting updated this revision to Diff 59953.Jun 16 2019, 7:17 PM

Changed logic to match review comments.

tbaumgart accepted this revision.Jun 16 2019, 7:47 PM
This revision is now accepted and ready to land.Jun 16 2019, 7:47 PM

Wow, so looking forward to gitlab. So after a revision has been accepted what's the preferred way to land it? merge? cherry-pick? just rebase on the 5.0 branch and push?

Rebasing a branch that you have pushed before is usually a bad idea. Since you pushed the branch to the git repo, I recommend to merge it onto the 5.0 branch. That should be possible without problems from what I see.

Using Phab, I keep stuff on a local branch and don't push it but only upload it to Phab using 'arc diff'. Then once approved, I use 'arc land' to create a commit on the branch it should go onto. This way, you get a reference to the Delta-Entry on phab which is automatically closed when you commit (ehm, arc land). See for the details on the 'Differential Revision' keyword.

Hope that helps.

Awesome, k, I nuked my branch when I modified it. I'll just push the commit on the 5.0 branch and close this revision, makes sense.

whiting closed this revision.Jun 18 2019, 5:22 PM