NAME

FedIncome

SYNOPSIS

use Payroll::US::FedIncome;
my $fedIncome = Payroll::US::FedIncome->new();
if ($fedIncome->didErrorOccur())
{
  die $fedIncome->errorMessage();
}

DESCRIPTION

This module will calculate Federal Income Taxes for the US based on internal tables when given a gross amount

Exported FUNCTIONS

scalar new()

Creates a new instance of the object.

integer isValid( gross => $gross)

      gross - floating point > 0
      date -  YYYYMMDD
      method -
      allowances - integer > 0
      period - annual, semiannual, quarterly, monthly, semimonthly, biweekly, weekly, daily
      marital - single | married
      periodDays -
      round - yes, no
)

      This method will check an argument sent in for validity.  returns 0 for no, 1 for yes .
      NOTE:  Only send one argument at a time.  If you send all you will not know which one is invalid

integer calculate( gross - total amount of pay date - date to be paid on. affects tax rates format YYYYMMDD method - the method to use for calculation (currently only percentage ) allowances - federal allowances period - annual, semiannual, quarterly, monthly, semimonthly, biweekly, weekly, daily marital - single or married round - yes, no - defaults to yes - or should user sprintf the result. seems that would be more efficient )

bool generateTable( period, marital, date )

string lookupDate (date)

Returns the date closest to the given date that is less than or equal to it

string firstDate()

This method will return the earliest date in the datatables.
Combined with the lastDate method, you can find the date range of the data

string lastDate()

This method will return the earliest date in the datatables.
Combined with the firstDate method, you can find the date range of the data

void setError() or setError("My Error") or setError(errorString => "My Error")

Sets error = 1 and $self->{errorString} = "My Error"
returns nothing

scalar didErrorOccur(void)

Returns the value of error.

scalar errorMessage(void)

Returns the value of errorString.

AUTHOR

JT Moree

SEE ALSO

perl