Hi,

this is my first time posting here and I'm just getting started with 
ledger. I work in a development cooperative called 100Starlings. We'd like 
to track the hours we work on projects with ledger and properly reflect 
payments received from clients and paid to team members. For this to work 
we need to track external (revenue) and internal (cost) member rates across 
the team.

I've already built a tool to export time slips from the tool we use into 
ledger transactions that look like this:

2017-08-15 Work by Alice on the project in August
  Work:Client:Project:Alice       4h
  Liabilities:Team:Alice

What I'm trying to achieve is to be able to keep this as is in order to 
have the ability of totalling times for projects and prepare invoices. At 
the same time I would like to have the ability of querying the "value" of 
work by using the `--market` or `--historical` options. People's rates may 
change over time or across projects.

I tried three approaches that I could think of. I detailed them in a gist 
with the issues I ran into 
here: https://gist.github.com/lackac/db2364984e49c9f954a85892a1feb518

I would prefer to make the first or second approach work. I think the 
rounding error in the first approach is a bug since ledger-cli is supposed 
to be working with rational numbers all the way except for display.

In the second approach I didn't experience the rounding issue. However, I 
would expect that it's possible to compare a fixed date to the date of the 
posting, but I can't find how. I tried `date`, but that doesn't respect the 
`--historical` option and always returns the date of running the report. I 
tried `post.date` but that fails with the error included in the gist. I 
also tried simply the `d` argument from the value expression function, but 
that is a date/time which I can't compare to a date.

The third approach works, but is quite cumbersome since you need to setup 
custom commodities for all team members and potentially even team member + 
project combinations.

Do you have ideas of how to do this properly? Is there another approach I 
haven't thought of? Is the issue in the first approach a bug that could be 
fixed or the expected behaviour?

Best,
László

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to