NAME
StateIncome
SYNOPSIS
use Payroll::US::MO::StateIncome;
my $stateIncome = Payroll::US::MO::StateIncome->new();
if ($stateIncome->didErrorOccur())
{
die $stateIncome->errorMessage();
}
DESCRIPTION
This package will calculate the income tax based on a gross salary amount given.
Exported FUNCTIONS
scalar new()
Creates a new instance of the object.
takes:
integer calculate
(
gross, # - gross pay
date, #- date of payment format YYYYMMDD
method, #- specifies method to use. currently only 1
allowances #, - state allowances claimed, integer
period, #- annual, semiannual, quarterly, monthly, semimonthly, biweekly, weekly, daily
marital, #- single, married, spouseWorks, head
federal, #- amount of federal tax withheld here
fYTD, #- total federal tax withheld year to date
round, #yes, no - defaults to yes
)
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 | spouseWorks | head
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
float annualize(amount, period)
This method will change the given floating point to an
annual number based on the corresponding period.
i.e. X, monthly will yield (X * 12)
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
Xperience, Inc. (mailto:admin@pcxperience.com)
SEE ALSO
perl(1)