That's a very good point, and anyway the allocations change over time, and I want to run projections with hypothetical allocations.
Ian On Friday, May 12, 2017 at 12:10:26 PM UTC-4, Jason Chu wrote: > > 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] > <javascript:>> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> 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/37201072-a954-4ff8-9052-822f5e22d812%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
