ebcrowder / rust_ledger

Rust implementation of ledger, the command line accounting tool.
GNU General Public License v3.0
137 stars 21 forks source link

Bugfix: account name cant be same #8

Closed dantuck closed 4 years ago

dantuck commented 4 years ago

TLDR;

Found a bug where account names are the same for both income and expense then the value would be duplicated in the balances.

Details

To correct it I check the account type when matching the transaction for balancing.

Additionally I removed the red coloring in the balances for all but assets for now. I didn't see it making sense to show red which means alert for the others even if they are negative... really negative is what we want for income and equity.

How to verify

Run tests

Gif

ebcrowder commented 4 years ago

LGTM