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

Make quantity a floating point number not an integer. #22

Open
rouilj opened this issue Jul 3, 2023 · 6 comments
Open

Make quantity a floating point number not an integer. #22

rouilj opened this issue Jul 3, 2023 · 6 comments

Comments

@rouilj
Copy link

rouilj commented Jul 3, 2023

For invoices that bill by time, --quantity should be a floating point number so 1/2 hour or other
time periods can be specified. Currently using --quantity 0.5 --rate 175 I get:

2023/07/03 23:32:17 invalid argument "0.5" for "-q, --quantity" flag: strconv.Atoi:
  parsing "0.5": invalid syntax

for invoicing a 1/2 hour call.

Thanks.

@pyrite357
Copy link

pyrite357 commented Jul 12, 2023

@rouilj until this is fixed, you can change your rate on items that are qty < 1 to match, for e.g. -q 1 -r 87.5 since -r or --rates DOES support floating/decimals. Then, in the item notes, in parens, you can say (1/2 hrs @ $175/hr = $87.50). Just a work around.

@rouilj
Copy link
Author

rouilj commented Jul 12, 2023 via email

@pyrite357
Copy link

@rouilj you may have responded before I edited my response and added this part Then, in the item notes, in parens, you can say (1/2 hrs @ $175/hr = $87.50). Just a work around.

But trust me, I'm with you on this, take a look at #31 , I said the same things ;)

@pyrite357
Copy link

@rouilj I posted a patch in #31 , you can use go build (if you don't already know) to build it

@rouilj
Copy link
Author

rouilj commented Jul 13, 2023

I actually decided to give a shot to learning a little go. So I have my own change for it. But thanks for the pointer. I'll use your pointer to see if my change is idiomatic go.

@pyrite357
Copy link

I actually decided to give a shot to learning a little go. So I have my own change for it. But thanks for the pointer. I'll use your pointer to see if my change is idiomatic go.

LOL, me too. Today is my first day ever writing any GO code. Take a look at #31 I just submitted code for implementing version command, Chinese char support,and the qty change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants