biteit/taxes

Library for working with Czech taxes

Maintainers

Package info

github.com/Sofiosko/taxes

pkg:composer/biteit/taxes

Statistics

Installs: 10 114

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

0.0.5 2024-06-28 09:39 UTC

This package is auto-updated.

Last update: 2026-02-28 13:27:31 UTC


README

The whole library purpose is to simplify working with Czech VAT while it allows to extend and bend computing logic of every important operation.

$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()
]);