worksome / uk-tax-allowance
A package helping in determining the Uk weekly or monthly tax allowance for a specific date range
Installs: 415 348
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 15
Forks: 0
Open Issues: 0
Requires
- php: ^8.2
- azuyalabs/yasumi: ^2.5
Requires (Dev)
- orchestra/testbench: ^8.0 || ^9.0
- pestphp/pest: ^2.33
- worksome/coding-style: ^2.8
README
This package is for determining a UK employee tax allowance for a specific date range.
You may get weekly or monthly number of allowance, as well as weekly or monthly period end dates for the provided date range.
Installation
composer require worksome/uk-tax-allowance
Usages
UkTaxAllowanceCalculator
/** * @param \Worksome\UkTaxAllowance\UkTaxAllowanceCalculator $ukTaxAllowanceCalculator * @param $dateStart \Carbon\Carbon * @param $dateEnd \Carbon\Carbon */
Weekly allowance
// Get weekly allowance count for a specific date range $weeklyAllowanceCount = $ukTaxAllowanceCalculator->weekly($dateStart, $dateEnd); // Get weekly allowance end dates for a specific date range $weeklyAllowanceEndDates = $ukTaxAllowanceCalculator->weeklyEndDatesBetween($dateStart, $dateEnd);
Monthly allowance
// Get monthly allowance end dates for a specific date range $monthlyAllowanceEndDates = $ukTaxAllowanceCalculator->monthlyEndDatesBetween($dateStart, $dateEnd); // Get monthly allowance count for a specific date range $monthlyAllowanceCount = $ukTaxAllowanceCalculator->monthly($dateStart, $dateEnd);
Calendar
You may use our YasumiUkCalendar which relies on the azuyalabs/yasumi package. For Laravel users, UkTaxAllowanceServiceProvider
will register it by default.
Or create your own and have it implement Worksome\UkTaxAllowance\Contracts\UkCalendar