Time Tracker Administrators Manual
From LinuxServerTech
How to add new US Federal Taxes
Create a series of database insert statements of the form:
Using circular P15 from the IRS, location Section 16, How To Use the Income Tax Withholding and Advance Earned Income Credit (EIC) Payment Tables. From Table 5, determine the One Withholding Allowance value for the pay period(s) in question.
On the following page (possibly two down), locate the Tables for Percentage Method of Withholding. Using the appropriate table(s) (weekly, biweekly), create a series of database insert statements in the following form:
insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (TAX_YEAR,MARITAL_STATUS,PAY_PERIOD,BASE_AMOUNT,MIN_PAY,MAX_PAY,BASE_DEDUCTION,RATE_DEDUCTION);
substituting the appropriate values for the items italicized above (definitions given below). Note that MARITAL_STATUS and PAY_PERIOD must have a single quote around them (see example below).
TAX_YEAR -- The four digit year for the taxes, ie 2008 or 2009 MARITAL_STATUS -- A single character, in quotes, for marital status. One of 'S' for Single and 'M' for Married. Must be capitalized. PAY_PERIOD -- A single character, in quotes, for pay period. Currently implemented are 'W' for Weekly BASE_AMOUNT -- From the first value you found in Section 16, this is a base deduction per withholding allowance for anyone, married or single, in this particular pay period. MIN_PAY -- From Tables for Percentage Method of Withholding, this is the lower end of the range, the one that comes under the heading Over. Use 0 for the initial line. MAX_PAY -- From Tables for Percentage Method of Withholding, this is the upper end of the pay range, the one that comes under the heading But not over. Use 99999999 for the high end of the range. BASE_DEDUCTION -- From Tables for Percentage Method of Withholding, you will see a dollar amount and a percentage. This is where you put the dollar amount. RATE_DEDUCTION -- From Tables for Percentage Method of Withholding, you will see a dollar amount and a percentage. This is where you put the percentage, as a whole number, ie 10% is written as just plain 10.
Example
Following images are taken from the 2008 Publication 15:
Table 5 showing the base tax rate for Weekly
Weekly Table of deductions
From Table 5, we can see that the base deduction per withholding for Weekly is $67.31. We must remember that number. Now, create the insert statement. For Single being paid Weekly, the first four values will be all the same.
insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'S','W',67.31
So, all we need are the MIN_PAY, MAX_PAY, BASE_DEDUCTION and RATE_DEDUCTION values for each row. For the first row, the Minimum Pay amount is 0, and Maximum Pay amount is $51, with no taxes taken out. So, we add these values to the above ,0,51,0,0); resulting in
insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'S','W',67.31,0,51,0,0);
The next line shows that the minimum is $51, maximum is $198, and we withold no base amount, but take a 10% tax off the balance. This results in
insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'S','W',67.31,51,198,0,10);
The third line has both a BASE_DEDUCTION and an RATE_DEDUCTION, so it is
insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'S','W',67.31,198,653,14.7,15);
Following is a complete list of statements to be able to calculate taxes for all weekly payroll in 2008, Married and Single.
insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'S','W',67.31,0,51,0,0); insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'S','W',67.31,51,198,0,10); insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'S','W',67.31,198,653,14.7,15); insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'S','W',67.31,653,1533,82.95,25); insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'S','W',67.31,1533,3202,302.95,28); insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'S','W',67.31,3202,6916,770.27,33); insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'S','W',67.31,6916,99999999,1995.89,35); insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'M','W',67.31,0,154,0,0); insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'M','W',67.31,154,453,0,10); insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'M','W',67.31,453,1388,29.9,15); insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'M','W',67.31,1388,2651,170.15,25); insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'M','W',67.31,2651,3994,485.9,28); insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'M','W',67.31,3994,7021,861.94,33); insert into tax_rate_info(pay_year,marital_status,pay_period,withholding_rate,min_pay,max_pay,flat_tax,rate) values (2008,'M','W',67.31,7021,99999999,1860.85,35);


