autepos/tax
Composer 安装命令:
composer require autepos/tax
包简介
Tax package for laravel
README 文档
README
This package is a tax calculator for Laravel for those who like it interface.
Requirements
- PHP 8.0+
- Laravel 9.x+
Installation
Install the package via composer:
composer require autepos/tax php artisan migrate
Simple usage
use Autepos\Tax\Contracts\TaxableDevice; use Autepos\Tax\Contracts\TaxCalculatorFactory; class Order implements TaxableDevice{ //... Implementation of certain methods require other interfaces to be implemented } $order = new Order(); $taxCalculator = app(TaxCalculatorFactory::class); $taxCalculator->addTaxableDevice($order); $taxLineList=$taxCalculator->calculate(); $totalTax=$taxLineList->totalAmount();// To be displayed as a total tax $exclusiveTax=$taxLineList->exclusiveAmount();// To be added to the order subtotal $inclusiveTax=$taxLineList->inclusiveAmount(); // Already included in the order subtotal
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-08