I feel like you have another problem though.  Once something has been paid
out, it's a concrete transaction and you don't want it to ever change.  If
you're using a plugin, there is a very real possibility that you
accidentally change some metadata that retroactively changes a transaction.

I would imagine using metadata to represent current/projected project time
and a script that uses the beancount modules to read your file and generate
concrete transactions for a pay period (probably porting the metadata
snapshot to the generated transactions).  That way you can keep a concrete
list of transactions representing real movements of money and use the
metadata to represent the proportional contributes of your employees.


On Fri, May 12, 2017 at 7:39 AM Ian Soboroff <[email protected]> wrote:

> I am looking for advice on the following design for a payroll module.
>
> I have this data model in mind:
>
> 1. employees.  This is basically a list of accounts that receive payroll
> payments.
>
> 2. cost centers.  This is a list of accounts that employees get paid from,
> they correspond to projects with their own budgets.
>
> 3. a labor distribution.  For a given payroll period, this spells out what
> fraction of each employee's time is paid from each cost center.  So Joe
> Cool's time is 50% on project A and 50% on project B, so when he gets paid,
> I want to automatically generate the two transactions from the correct
> accounts.
>
> Then, in the beancount file, I imagine having a directive called "payroll"
> which would generate all the appropriate transactions following the labor
> distribution.
>
> I'm not sure the best way to integrate this idea into Beancount.  The data
> is hard to represent directly in the data file (or I don't see the right
> way to do it), so I have in mind a plugin where the labor distribution is
> defined in the Python module, and the "payroll" directives would be dummy
> transactions that the plugin would substitute out when mapping over the
> entries list.
>
> Does that make sense, and does it seem the right way to approach this?
>
> Ian
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/65952064-c7ed-4610-8084-cfe5dd76d8e6%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/65952064-c7ed-4610-8084-cfe5dd76d8e6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAFFHUgvAf44dLqQJ8rOdL46rmTdLqQ%2B6KU%3DVc%3Dp6THf6y2AfjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to