utkuufuk / budget-cli

Manage your Google budget spreadsheets from terminal
https://utkuufuk.com/2018/11/10/budget-cli
MIT License
34 stars 6 forks source link

Close issue #9: Edit transaction feature added #10

Closed vitokhangnguyen closed 5 years ago

vitokhangnguyen commented 5 years ago

This pull request closes issue #9.

The syntax for the new command is as following and documented in README.md

budget edit [income | expense] [line_index] [new_transsaction]

When a date is not specified in new_transasction, the original date is used. When a date is specified, the new date is used. The monthly spreadsheet's ID will be identified based on the month in the transaction date.

The budget log command now displays line index to be used in editing transaction:

Oct Expense Log
===============================================================================      
   1   08/09/2000    $1,500.00    Rent                                Home
   2   13/10/2019       $35.00    Groceries                           Home
   3   13/10/2019        $5.00    Pizza                               Food
   4   13/10/2019        $5.00    Pizza                               Food

Oct Income Log
===============================================================================      
   1   08/09/2000    $2,000.00    Paycheck                            Paycheck       
   2   13/10/2019       $75.00    Tax Return                          Other
   3   13/10/2019      $100.00    Scholarship                         Bonus
   4   13/10/2019      $100.00    Scholarship                         Bonus
   5   13/10/2019       $75.00    Tax Return                          Other
vitokhangnguyen commented 5 years ago

I have adjusted the code. Please review it when you can.

utkuufuk commented 5 years ago

Great work thank you 👍 I just made some minor adjustments.

vitokhangnguyen commented 5 years ago

I am happy to contribute. If you don't mind, I think deleting a transaction can be a good feature, too. If you want, please open an issue for that.