NAME

FICA

SYNOPSIS

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

DESCRIPTION

This module will calculate Social Security 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
      YTD - Year to date amount paid for this type of tax (float)
)

      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 YTD, total year to date )

string lookupDate (date)

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

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

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

void clearError()

Sets $self->error = 0 and $self->{errorString} = ""
returns nothing

scalar didErrorOccur(void)

Returns the value of error.

scalar errorMessage(void)

Returns the value of errorString.

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

NOTE: All data fields are accessible by specifying the object and pointing to the data member to be modified on the left-hand side of the assignment. Ex. $obj->variable($newValue); or $value = $obj->variable;

AUTHOR

JT Moree - www.pcxperience.org

SEE ALSO

perl