hilinksnetworks/ng-paye-calculator
Composer 安装命令:
composer require hilinksnetworks/ng-paye-calculator
包简介
A simple PHP library for calculating PAYE in Nigeria.
README 文档
README
A PHP library for calculating Pay As You Earn (PAYE) tax in Nigeria. This library computes PAYE based on the annual salary, an array of allowances, and an array of deductions using the Nigerian tax system.
Features
- Supports input of annual salary, allowances, and deductions.
- Automatically calculates total allowances and deductions.
- Computes PAYE using Nigeria's progressive tax brackets.
- Easy to integrate into any PHP project.
Installation
Install the library via Composer:
composer require hilinksnetworks/ng-paye-calculator
Usage
Here's how to use the PAYE Calculator in your PHP project:
require 'vendor/autoload.php'; use PAYE\PAYECalculator; // Input data $annualSalary = 5000000; // Annual Salary: ₦5,000,000 $allowances = [1000000, 500000, 250000]; // Array of allowances $deductions = [200000, 150000, 100000]; // Array of deductions // Calculate PAYE $paye = PAYECalculator::calculate($annualSalary, $allowances, $deductions); echo "The PAYE tax is: ₦" . number_format($paye, 2);
Explanation of Inputs
- Annual Salary: Total annual salary (numeric value).
- Allowances: An array of all allowances (e.g., housing, transport).
- Deductions: An array of all deductions (e.g., pension, insurance).
How PAYE is Calculated
The PAYE is computed using the following steps:
- Gross Income = Annual Salary + Total Allowances.
- Consolidated Relief Allowance (CRA):
- ₦200,000 or 1% of gross income (whichever is higher) + 20% of gross income.
- Taxable Income = Gross Income - (CRA + Total Deductions).
- Progressive Tax Rates:
- First ₦300,000: 7%
- Next ₦300,000: 11%
- Next ₦500,000: 15%
- Next ₦500,000: 19%
- Next ₦1,600,000: 21%
- Above ₦3,200,000: 24%
Requirements
- PHP 7.4 or higher.
- Composer.
License
This project is licensed under the MIT License.
Author
Your Name
Email: contact@hilinksnetworks.ng
GitHub: hilinksnetworks
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-16