rackbeat / php-vat-helper
Handle simple VAT calculations.
Installs: 28 830
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
Requires (Dev)
- phpunit/phpunit: ^7.0
- satooshi/php-coveralls: ^1.0
README
No more ugly math in your business logic.
Convert numbers to include or exclude VAT.
Installation
You just require using composer and you're good to go!
composer require rackbeat/php-vat-helper
Usage
Rackbeat\VAT::include($amountExclVat = 100.0, 25); // 125.0 Rackbeat\VAT::exclude($amountInclVat = 100.0, 25); // 80.0 Rackbeat\VAT::amount($amountInclVat = 100.0, 25); // 25.0 Rackbeat\VAT::percentage($amountInclVat = 100.0, $amountExclVat = 80.0); // 0.25
Plans
- Better documentation
- Per-country/region defined vat zones
Requirements
- PHP >= 7.1