Adding a Payroll calculator

Jay Scherrer jay at scherrer.com
Sun Oct 30 01:48:29 EDT 2005


On Sat, 2005-10-29 at 21:44 -0400, Derek Atkins wrote:
> Quoting Jay Scherrer <jay at scherrer.com>:
> 
> > Do you think a good place to start would be to add an gnc_employeeType
> > and a to your class _gncEmployee? Then we could create an editable
> > member of the tax class to match the companies Labor and Industry's
> > employee classification. Then would it be wise to add a business class
> > to gncBusiness.c to include a member like ( gnc_BusinessIndustry and
> > gnc_BusinessRating for unemployment rates ) or something? Is there a
> > class for different Job descriptions already? We already know that FICA
> > and Medicaid are pretty much uniform but still should be adjustable.
> 
> Honestly, I don't know..  I suspect the best approach would be to look
> at it from the other side.  Figure out what information you need to
> compute payroll and write the code that computes that.  Then we can
> figure out where to store the necessary information.  Also keep in mind
> that Gnucash's payroll system needs to handle more than just US payroll.
> (This is where the payroll plugins come in).
> 
> Specifically, yes, I can see where you might need to extend GncEmployee
> to store information about the employee's salary/rate and payroll types,
> and potentially even per-person deduction information.  There is no
> "GncBusiness" object; the business information is stored in the book itself.
> So, no, nothing to extend there.
> 
> I don't know enough about payroll systems to know whether you need an
> industry type -- I would think that you could just create appropriate
> plugins for various tables and just use a reference to the table in
> the data file to know which one to use.  But that's why I think it would
> be best to start by figuring out how to compute the payroll and then
> work backwards towards object extensions.
> 
> I think further discussions should be on gnucash-devel.  You should subscribe
> there and follow-ups to this message should go to -devel and not -user.
> 
> > Jay Scherrer
> 
> -derek
I would like to use my payroll calculator as an example to start working
with: <http://jay.scherrer.com/payroll.html> although it is written with
html and JavaScript, the basic function's are the same and created in c
pretty easy. The sections that require tables (rates) should be left to
the payroll admin to adjust, they would be notified of the rates by
their state or government. [view source: payroll.html ] I am suggesting
that when an employee is added that a selection of employee type be
offered. And when a Business is created that their respective business
type be recorded. Then as businesses and or employee's are added the
classification they can be entered respectively. The payroll admin
should be given an option if any changes occur by the state to update.
This shouldn't need any sort of subscription just an entry while
creating the employee or business. Any way am I on the right track? How
can I help?
   
########payroll.html source############
###These rates are based on state notification####
##Employee section##
empMedi = document.payroll.medi.value = Math.round(empWages * .0145); 
/* Employee medicare rate */
empSSI = document.payroll.ssi.value = Math.round(empWages * .062);
/* Employee Social security rate */
empFed = document.payroll.fedWit.value = Math.round(empWages * .087);
/* Employee's Federal withholding rate figured from W-4 */
eLandI = document.payroll.empLandI.value = Math.round(empWages * .0256);
/* Employee's portion of L&I insurance */

##Business Section##
sui = document.payroll.stateUnemployment.value = Math.round(empWages * .0276);
/* State unemployment */ 
suio = document.payroll.stateUnemploymentOffice.value = (empWages * .0002);
/* State Unemployment Office expense "Washington" */ 
compLandI= document.payroll.compLandI.value = Math.round(empWages * .2270);
/* Company's L&I portion*/
compMedi = document.payroll.compMed.value = Math.round(empWages * .0145);
/* Company's Medicare portion */
compSSI = document.payroll.compSSI.value = Math.round(empWages * .062); 
/* Company's Social Security portion */

Jay Scherrer



More information about the gnucash-devel mailing list