bnvk / Conjuror

An experiment in the CSV format, open data, magic, and wizardly things!
Other
11 stars 2 forks source link

Pro-rated hours #15

Closed simonv3 closed 6 years ago

simonv3 commented 9 years ago

What about hour tracking for pro-rated contracts?

bnvk commented 9 years ago

@simonv3 elaborate on what you mean here? The fact that you can add a unique $0.00 rate per item entry makes me think that is handled already. Layout the user story please :)

simonv3 commented 9 years ago

So I'm working on a contract where I get paid x amount every month based on a pre-calculated "how long it will take me". 0.00 rate per item works, but the meaning of that gets lost. If I were to look back at the job a year later, how would I know what I was charging?

There's a semantic difference between pro-rated work listed as 0.00, and gratis work listed as 0.00, which I think might be lost at the moment, but might be useful in the future.

Similarly, what about daily rates or weekly rates? The more work I put in to that project, the less my hourly rate is, but that's still something I want to see about the work, without having to re-calculate all of that.

What might work is an additional column for payment_rate with a "dropdown" of options: 'fixed', 'weekly', 'daily', 'hourly'. Exclusion of a value could default to hourly.

That way, I can list the total contract amount under the rate column, and when I generate an invoice (or some other document for my own records) it would be able to deduce that cleverly.

But then, are we storing duplicate information?

date, time, description, client, location, rate, payment_rate
2015-02-23, 2, merging things, openfarm, home, 10.00, hourly
2015-02-24, 1.5, code review and ux research review, uklo, home, 1000.00, fixed
2015-02-25, 1, code review talking about best way to sort users, uklo, home, 1000.00, fixed

Definitely let me know if this is going beyond the purpose of Conjuror!

bnvk commented 9 years ago

I understand now, it is definitely a case which comes up often for freelancers as I experienced this quite a bit myself over the years.

I think it's outside the scope of the Conjuror "core" but totally within the scope of the "invoice module" which will ship with the code... so yah, worth some thought and implementing :wink:

This is a really good case that will force us to plumb out just how extensible + robust the two aspects of the system are. I tried importing an old CSV dataset of freelance hours that I exported from Freckle and it has the following fields which are similar to what we're doing: Date, Person, Client/Project, Minutes, Hours, Tags, Description

But also has the relevant bits Billable,Invoiced,Invoice Reference,Paid all of which are booleans, except for Invoice Reference which has an "invoice ID" of sorts, which seems to only exist is a range of house has been "invoiced" which makes sense and is something we should think about down the line!

date, time, description, client, location, rate, billing, invoice, status
2015-02-23, 2, merging things, openfarm, home, 10.00, hourly, ,work 
2015-02-24, 1.5, code review and ux research review, uklo, home, 1000.00, fixed, 123, sent
2015-02-25, 1, code review talking about best way to sort users, uklo, home, 1000.00, fixed, 123, sent

Also, billing $1000 fixed rate for 1 hour of code review... that's good money, son :grin:

simonv3 commented 9 years ago

Hah, those were just inserted to illustrate what I'm saying - I worked on uklo for 1.5 hours that day, but it's within a fixed contract of 1000 (insert money units). Then the next line is for that same contract (which means that at that point I had worked 2.5 hours for that fixed 1000 euros). So in that case, the rate is duplicately stored, and might make sense to be stored somewhere else (linked to a contract module?), but for the sake of simplicity and right now - we store it within the same CSV, and the invoicing module can just say "ah, this uklo client is fixed, what's the rate? and it just sets the invoice to that amount.

An alternative stop-gap that I just thought of, and might make more sense - is to just add an option to the invoice generation script:

conjuror -i data/clients.json -o "Feb Invoice" -t client-name --date Feb --total 1000.00

And that overwrites whatever gets calculated.

This stuff starts getting interesting when you want to calculate what your hourly rate actually was for that project (and you don't want to put it in an invoice, ex, just want to know how much you should charge).

bnvk commented 9 years ago

Gothca. I see your point here and it makes more sense to me now. Earlier in chat today we discussed the idea of spells and potions one of which is more basic functions or actions and is currently implemented filter by --date March --trim Client-1 --output Output-Filename

I think the potion aspect perhaps is where a custom cases where a fixed attribute like you have means Do Not Tally This Number with the Other Numbers Thus generating an invoice (Spell) has a mixture of "potions" inside of it. I think potions get "made" by coding up a config adapter or something, not something the CLI or Web interface would ever have access to.

bnvk commented 6 years ago

There is rudimentary ability to generate outputs (pdf, html) with either tally or specified value

? Add a fixed price or leave blank to: (tally)

It is not super robust, but is good enough for scope of what Conjuror aims to do.