abwebdevelopers/aus-income-tax 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

abwebdevelopers/aus-income-tax

Composer 安装命令:

composer require abwebdevelopers/aus-income-tax

包简介

Calculates withheld amounts from gross income as per the Australian Tax Office PAYG (pay-as-you-go) tax tables

README 文档

README

Build Status codecov

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:

composer require abwebdevelopers/aus-income-tax

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:

<?php
use ABWebDevelopers\AusIncomeTax\IncomeTax;
use ABWebDevelopers\AusIncomeTax\Source\ATOExcelSource;

$incomeTax = new IncomeTax(new ATOExcelSource([
    'standardFile' => 'resources/tax-tables/2018-19/NAT_1004_2018.xlsx',
    'helpSfssFile' => 'resources/tax-tables/2018-19/NAT_3539_2018.xlsx',
    'seniorsFile' => 'resources/tax-tables/2018-19/NAT_4466_2018.xlsx'
]));

Once loaded, you can calculate the tax withheld amount of a wage using the following:

$tax = $this->IncomeTax->calculateTax(
    1000,           // The gross wage
    'weekly',       // The pay cycle - must be either `weekly`, `fortnightly`, `monthly` or `quarterly`
    '2018-06-02',   // The payment date
    'standard',     // The type of taxation - either `standard`, `help`, `sfss`, `combo` or `seniors`
     2              // The taxation scale - `1` (tax free threshold not claimed), `2` (tax free threshold claimed), `3` (foreign resident), `4` (no TFN), `5` (full medicare exemption), `5` (half medicare exemption)
);

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.

abwebdevelopers/aus-income-tax 适用场景与选型建议

abwebdevelopers/aus-income-tax 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 03 月 11 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 abwebdevelopers/aus-income-tax 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 abwebdevelopers/aus-income-tax 我们能提供哪些服务?
定制开发 / 二次开发

基于 abwebdevelopers/aus-income-tax 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-03-11