On Fri, Sep 30, 2011 at 10:24 AM, Zack Williams <[email protected]> wrote:
> I've been playing around with ledger again for doing payroll. My > payroll ledger file looks like this: > > -- > ; Process with `ledger3 -f payroll.ledger -V bal` > ; display money in this format > D $1,000.00 > > ; payroll taxes as given by http://www.ssa.gov/pubs/10003.html > ; codes from: http://en.wikipedia.org/wiki/Payroll_tax#United_States > > = /Employees:.*:Payroll$/ > EFTPS:FICA:$account:Employee 0.042 > EFTPS:FICA:$account:Company 0.062 > EFTPS:MED:$account:Employee 0.0145 > EFTPS:MED:$account:Company 0.0145 > $account:Taxes:FICA -0.042 > $account:Taxes:MED -0.0145 > Company:Taxes:EFTPS -0.0765 > AZDOR:Withholding:$account 0.051 ; Withholding of 5.1%, per AZ State Form > A-4 > $account:Taxes:AZDOR -0.051 > > ; Hourly pay rates for employees > P 2010/01/01 EMP1 $15 > > ; Payroll for 2011-09-17 > 2011-09-17 JohnDoe Payroll ending 9/17 > Company:Labor:JohnDoe 20 EMP1 > Employees:JohnDoe:Payroll > -- > > The above is all fine and correct (for the most part - I'm not taking > into account the "don't deduct FICA/MED" when total wages exceed a > certain amount rule), and lets me enter working hours directly and > automatically perform > > The problem comes in when calculating US federal tax withholding. > These are done in a programmatic method, with different amounts > depending on the total amount of taxes - see this form: > http://www.irs.gov/pub/irs-pdf/n1036.pdf > > Basically, there are rules like: > > if the Wages are below amount X, then withholding = 0 > if Wages are between X and Y, then withholding is (Wages - X) * > Percentage1 > if Wages are between Y and Z, then withholding is (Wages - Y) * > Percentage2 + AmountA > > and so on. For right now, I'm manually calculating these amounts out > and entering them into ledger, which is annoying. > > From what I can tell, there's no way to have several automated > transactions that only happen when an amount is within a certain > range, is there? Would this feature be useful to others? > > Any ideas? I'm thinking of making a script that does the math, then > creates new ledger entries in the file that reflect the rules, but I'd > love to avoid doing so. > > NOT an expert on ledger by any stretch!!!!!!! I don't think there is a way around using the script. Here in Canad we have some very similar kind of thing. I rolled a spreasheet tha does what I need it to do. Not being a programmer I am thinking something in a script should do the same. As I am not sure exactly how extensible ledger is directly I do not know if that would be a separate program or not. It may be better if it were because then I could take the same program and change the variables and use it for payroll here (and in any other location too!!!). Darald
