2017 © Pedro Peláez
 

library eurotax

Calculates taxes for all european countries

image

biblys/eurotax

Calculates taxes for all european countries

  • Friday, January 2, 2015
  • by biblys
  • Repository
  • 1 Watchers
  • 1 Stars
  • 58 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

biblys/eurotax

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., (*1)

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, (*2)

Installation

With composer :, (*3)

composer require biblys/eurotax:dev-master

Packagist page: https://packagist.org/packages/biblys/eurotax, (*4)

Usage

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

$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., (*6)

Changelog

1.0.3 (05/01/2015) * Quickfix setting isNewLawApplicable to false for non downloadable, (*7)

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, (*8)

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, (*9)

1.0.0 (01/01/2015)
* First release, (*10)

The Versions

02/01 2015

dev-master

9999999-dev https://github.com/biblys/eurotax

Calculates taxes for all european countries

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Clement Bourgoin

tva vat tax europe

02/01 2015

v1.0.1

1.0.1.0 https://github.com/biblys/eurotax

Calculates taxes for all european countries

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Clement Bourgoin

tva vat tax europe

02/01 2015

v1.0.2

1.0.2.0 https://github.com/biblys/eurotax

Calculates taxes for all european countries

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Clement Bourgoin

tva vat tax europe

02/01 2015

v1.0.3

1.0.3.0 https://github.com/biblys/eurotax

Calculates taxes for all european countries

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Clement Bourgoin

tva vat tax europe

02/01 2015

v1.0.0

1.0.0.0 https://github.com/biblys/eurotax

Calculates taxes for all european countries

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Clement Bourgoin

tva vat tax europe

01/01 2015

1.0.0

1.0.0.0 https://github.com/biblys/eurotax

Calculates taxes for all european countries

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Clement Bourgoin

tva vat tax europe