Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add capability to edit existing transaction entry #9

Closed
utkuufuk opened this issue Sep 25, 2019 · 8 comments
Closed

Add capability to edit existing transaction entry #9

utkuufuk opened this issue Sep 25, 2019 · 8 comments

Comments

@utkuufuk
Copy link
Owner

No description provided.

@vitokhangnguyen
Copy link
Contributor

Hi,
I would very much like to work on this issue!

@utkuufuk
Copy link
Owner Author

utkuufuk commented Sep 26, 2019

@vitokhangnguyen That'd be great!

Firstly we would need to display row numbers next to each row within the output of budget log command.

Then we can define a new command to edit the selected row like so:

# let's say we want to edit line 12
budget edit 12 "<new_date>, <new_amount>, <new_description>, <new_category>"

Of course I'm open to suggestions if you have something else in mind in terms of how to use the new command.

@vitokhangnguyen
Copy link
Contributor

Hi,
Sorry for not reaching to you for a while. I am setting up the program and encounter this error when I ran ./install.sh:

  File "createtoken.py", line 1, in <module>
    from oauth2client import file, client, tools
ModuleNotFoundError: No module named 'oauth2client'

Although apparently installed, the createtoken.py module still cannot recognize the module.
I am doing this in a virtual environment.

@utkuufuk
Copy link
Owner Author

utkuufuk commented Oct 8, 2019

Maybe you could try running

pip3 install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib oauth2client

separately and see if you get any errors.

If you don't, running

python3 createtoken.py

should work as long as you have python3 and pip3 installed.

@vitokhangnguyen
Copy link
Contributor

I tried that and the output is many "Requirement already up-to-date/satisfied" including this line:

Requirement already up-to-date: oauth2client in d:\my workspace\budget-cli\venv\lib\site-packages (4.1.3)

However, when I run python3 createtoken.py, it still raises error:

Traceback (most recent call last):
  File "createtoken.py", line 1, in <module>
    from oauth2client import file, client, tools
ModuleNotFoundError: No module named 'oauth2client'

@vitokhangnguyen
Copy link
Contributor

vitokhangnguyen commented Oct 8, 2019

Actually, I fixed the issue by changing all the commands from "python3" to "python" and "pip3" to "pip". I do not know why since I do not have Python 2 on my computer and the only version is Python 3.7.4.

@utkuufuk
Copy link
Owner Author

utkuufuk commented Oct 8, 2019

It's very strange, I'm glad you found a solution though 👍

@vitokhangnguyen
Copy link
Contributor

Hi @utkuufuk,

I have done the basics of the feature. Just polishing and adding a few details now. The way I construct the new command is:

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

The line number will display in the budget log command and is separated between the expense and income (that's why the 3rd argument indicating which one to edit is needed). Here's an example:

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

Is this what you want? Tell me if you want me to improve something.

vitokhangnguyen added a commit to vitokhangnguyen/budget-cli that referenced this issue Oct 14, 2019
Update .gitignore to exclude config.json and venv

Add line index to `budget log`

add basic edit feature

add constraint check and date adjustment

Document changes in README.md
vitokhangnguyen added a commit to vitokhangnguyen/budget-cli that referenced this issue Oct 14, 2019
Update .gitignore to exclude config.json and venv

Add line index to `budget log`

add basic edit feature

add constraint check and date adjustment

Document changes in README.md

Improve code for edit feature
vitokhangnguyen added a commit to vitokhangnguyen/budget-cli that referenced this issue Oct 14, 2019
Update .gitignore to exclude config.json and venv

Add line index to `budget log`

add basic edit feature

add constraint check and date adjustment

Document changes in README.md

Improve code for edit feature

Improve edit message
utkuufuk pushed a commit that referenced this issue Oct 15, 2019
* Issue #9: Add edit transaction feature

Update .gitignore to exclude config.json and venv

Add line index to `budget log`

add basic edit feature

add constraint check and date adjustment

Document changes in README.md

Improve code for edit feature

Improve edit message

* restore config.json

* polish error messages

* rename some variables

* simplify 'parseTransaction' function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants