autepos/tax 问题修复 & 功能扩展

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

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

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-08