stadelmanma/Interactive-Ledger-rails

Allow certain categories to be ignored

Closed this issue · 4 comments

mainly discover payments, since if I include those in the running totals everything passed through my Discover card gets doubled.

This might be implemented best in a ledger_categories table where I can specify the category name and other attributes for it such as to include in various total types.

Additionally, it would be good to specify what I want them excluded from. I don't want budgeted items or deposits showing up in my total deficits but I would like them to be shown in the category totals. Whereas "Discover" I want excluded from everywhere.

Discover is currently excluded manually in LedgerSummary#generate_totals and WeekTotal#skip_transaction. I may be able to live with defining a convention around the deposit and budgeted categories as those are fairly broad. However discover has to get generalized.

I think to build in extra flexibility I'll make the exclusions table with the following columns: ledger_id, category and excluded_from where excluded from can be a string denoting what to exclude it from. all will mean exclude it from everything and currently the only phrase I'll probably support.