
Mileage

use Business::Payroll::US::Mileage;
my $mileage = Business::Payroll::US::Mileage->new();
if ($mileage->error())
{
die $mileage->errorMessage();
}
my $value = $mileage->calculate(date => $date, miles => $miles);

This module will calculate Mileage re-imbursements for the US based on internal tables when given the number of miles.

Creates a new instance of the object.
miles - integer > 0
date - YYYYMMDD
)
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
Returns the date closest to the given date that is less than or equal to it
This method will return the earliest date in the datatables.
Combined with the lastDate method, you can find the date range of the data
This method will return the earliest date in the datatables.
Combined with the firstDate method, you can find the date range of the data

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;

JT Moree - www.pcxperience.org

perl