Download the PHP package abwebdevelopers/aus-income-tax without Composer
On this page you can find all versions of the php package abwebdevelopers/aus-income-tax. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download abwebdevelopers/aus-income-tax
More information about abwebdevelopers/aus-income-tax
Files in abwebdevelopers/aus-income-tax
Package aus-income-tax
Short Description Calculates withheld amounts from gross income as per the Australian Tax Office PAYG (pay-as-you-go) tax tables
License MIT
Informations about the package aus-income-tax
Australian Income Tax Calculator
Calculates withheld amounts from gross income as per the Australian Tax Office PAYG (pay-as-you-go) tax tables (currently on the 2018-2019 financial year).
Requirements
- PHP 7.1 or above
If using the included Excel Spreadsheet source reader, you will also need the following PHP extensions enabled:
ctype
dom
gd
iconv
fileinfo
libxml
mbstring
SimpleXML
xml
xmlreader
xmlwriter
zip
zlib
Installation
Include this library in your application through Composer:
Usage
The library requires the published formulas from the Australian Tax Office in order to calculate the withheld amounts from gross income. These are generally published shortly before the end of the financial year. We have provided the latest files in the resources/tax-tables
folder.
The codes that the ATO uses are as follows:
Code | Contains |
---|---|
NAT 1004 | Standard formula for working out income tax. |
NAT 3539 | Formula for working out income tax for people who claim a HELP (Higher Education Loan Program), SFSS (Student Financial Supplement Scheme) or other student assistance debt. |
NAT 4466 | Formula for working out income tax for seniors and pensioners |
The easiest way to use this library is to use the Excel Spreadsheet reader to automatically feed this formula into the library:
Once loaded, you can calculate the tax withheld amount of a wage using the following:
This should return an integer
value of the amount of tax to be withheld for the gross income.
Exception codes
\ABWebDevelopers\AusIncomeTax\Exception\CalculationException
Code | Message |
---|---|
1000 | Default error code for calculation errors. |
1001 | Gross amount cannot be negative. |
1002 | Invalid payment frequency specified. |
2001 | Invalid threshold type or scale provided. |
2002 | No tax table source provided. |
\ABWebDevelopers\AusIncomeTax\Exception\SourceException
Code | Message |
---|---|
2000 | Default error code for source errors. |
2001 | Invalid threshold type or scale provided. |
2002 | Missing or invalid source file provided. |
2003 | Invalid seniors offset value. |
2004 | Invalid Medicare Levy Exemption value. |
2005 | Malformed source file provided. |
Disclaimer
Whilst great care has been taken to ensure that this library returns correct withheld tax calculations and has been thoroughly checked against the ATO test data, it does not take into account certain offsets or adjustments that can be made to a person's taxation responsibility. You should always verify any calculations with a registered tax agent. AB Web Developers accepts no responsibility for any tax miscalculations or assumptions that are made as the result of using this library.