ununhunun/taxman
Composer 安装命令:
composer require ununhunun/taxman
包简介
PHP Sales Tax calculator using custom or Canadian rates
README 文档
README
PHP Sales Tax calculator using custom or Canadian rates
Requierements
Requires php >= 7.1
Installation
Install the packages via composer: composer require chriys/taxman.
Getting started
This package allows to easily calculate taxes on an amount. Currently two main ways are available: using rates of Canadian provinces or using custom rates.
Using Canadian's provinces rates
Taxes::calculate('10.00', 'alberta');
// expected result
[
'sub_total' => '10.00',
'taxes_details' => [
'gst' => '0.5',
'pst' => '0.8',
],
'taxes' => '1.3',
'total' => '11.3',
];
Using custom taxes rates
Taxes::calculate('45', [1, 2, 3]);
// expected result
[
'sub_total' => '45',
'taxes_details' => [
0 => '0.45',
1 => '0.9',
2 => '1.35',
],
'taxes' => '2.7',
'total' => '47.7',
];
Security
If you discover any security related issues, please contact the package developer at christian.ahidjo@gmail.com
License
The Taxman package is open-sourced licensed under the MIT License.
统计信息
- 总下载量: 5.81k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-09-24