定制 biblys/eurotax 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

biblys/eurotax

最新稳定版本:v1.0.3

Composer 安装命令:

composer require biblys/eurotax

包简介

Calculates taxes for all european countries

README 文档

README

Calculates taxes for all european countries, according to whether the seller's country tax rate (most product types) or the customer's country tax rate (downlodable products among others since 1st january 2015) applies.

VAT rates are extracted from this document: http://ec.europa.eu/taxation_customs/resources/documents/taxation/vat/how_vat_works/rates/vat_rates_en.pdf

Installation

With composer :

composer require biblys/eurotax:dev-master

Packagist page: https://packagist.org/packages/biblys/eurotax

Usage

Say you're selling an ebook from a french bookshop to a belgian customer: Belgium standard tva rate must be used.

$tax = new \Biblys\EuroTax('FR', 'BE', \Biblys\EuroTax::EBOOK);
$tax->isNewLawApplicable(); // Will return true 
echo $tax->getTaxRate(); // Will echo 21

Available countries

  • BE: Belgium
  • BU: Bulgaria
  • CZ: Czech Republic
  • DK: Denmark
  • DE: Germany
  • EE: Estonia
  • EL: Greece
  • ES: Spain
  • FR: France
  • HR: Croatia
  • IE: Ireland
  • IT: Italy
  • CY: Cyprus
  • LV: Latvia
  • LT: Lithania
  • LU: Luxembourg
  • HU: Hungary
  • MT: Malta
  • NL: Netherlands
  • AT: Austria
  • PL: Poland
  • PT: Portugal
  • RO: Romania
  • SI: Slovenia
  • SK: Slovakia
  • FI: Finland
  • SE: Sweden
  • UK: United Kingdom

Available product types

  • BOOK
  • EBOOK
  • AUDIOEBOOK (selled on physical support, eg. CD)
  • EAUDIOBOOK (downloable audio books)
  • PERIODICAL (magazines, etc.)
  • CD
  • DVD

Contribute

I created this class with only the countries and product types I needed in my app, but feel free to add whatever your need and share it by doing pull requests.

Changelog

1.0.3 (05/01/2015)

  • Quickfix setting isNewLawApplicable to false for non downloadable

1.0.2 (05/01/2015)

  • Added books & ebooks VAT rates for all european countries
  • Added method isNewLawApplicable() that returns false if country is not in Europe or date of sale is < 2015-01-01
  • Various bug fixes

1.0.1 (02/01/2015)

  • Allow lowercase for country codes
  • Fallback to seller's country if customer's unknown
  • Fallback to STANDARD product type if type does not exist

1.0.0 (01/01/2015)

  • First release

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-18