jazzband / Watson

:watch: A wonderful CLI to track your time!
http://tailordev.github.io/Watson/
MIT License
2.44k stars 239 forks source link

Add billing info (feature) #508

Open saharakks opened 1 month ago

saharakks commented 1 month ago

So for so great, watson is helping with my daily time tracking. I just miss one thing if it was possible to log time paid or unpaid status with a comment for invoice/billing purpose.

for-example watson invoice paid --from "2024-04-24" --to "2024-07-17" --comment "Invoice #223" funny-meme-task

and in reporting it should be appear with the invoice status unpaid(by-default) or paid with comment for exmaple:

Wed 24 April 2024 -> Wed 17 July 2024
funny-meme-task - 5h 15m 59s
   [Research 1h 20m 33s]
   [Invoice Status: Paid(Invoice #233)]

something like this or may be more better. also reporting may also be added additional attribute to filter unpaid and paid hours.

acidjunk commented 1 month ago

Nice idea: I would love something like that.

I wonder if it's flexible enough. You want to link the invoice to a project? It might also be good to "invoice all projects" or "invoice a tag" to accommodate other Customer strategies/conventions that people could have.

saharakks commented 1 month ago

I am not sure about the flexibility, but it seems like the frames are stored as json if i am not wrong so it seems flexible.

A plain text comment will be enough just like a commit message, you can save URL if you want so yes storing a link is a good idea. Yes There can be many options and strategies. I have to maintain a separate sheet for hours which are paid and unpaid even a basic project level option will be very very helpful. rest the options are limitless.

kuon commented 2 weeks ago

Maybe we don't need to add --paid option as it would be specific to a a paid flag, but I would suggest batch edition of tag and comment.

The idea is to be able to do this:

 watson batch  --from "2024-04-24" --to "2024-07-17" --project myproject --tag mytag --add-comment "My comment" --add-tag hello

The idea is to support the same syntax as log for filtering (from, to, project, tag, ...) and add the following actions:

Note that the "comment" feature would be a feature on its own.

When creating an invoice, you would do something like this:

watson log -f 2000 -p myproject --ignore-tag invoiced --json | my-invoice-creator
watson batch -f 2000 -p myproject --ignore-tag invoiced --add-tag invoiced --add-comment "Invoice 23"