PHP code example of biteit / taxes
1. Go to this page and download the library: Download biteit/taxes library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
biteit / taxes example snippets
$cl = new \BiteIT\Taxes\CalcLogic();
$pl = new \BiteIT\Taxes\PriceList(\BiteIT\Taxes\Rates::HIGH_PERCENT, $cl);
$pl->addWithVat(121, 1);
$pl->addWithVat(200, 2, \BiteIT\Taxes\Rates::MEDIUM_PERCENT);
$pl->addWithVat(299, 4, \BiteIT\Taxes\Rates::LOW_PERCENT);
var_dump([
$pl->getTotalsWithVat(),
$pl->getTotalsWithoutVat()
]);