From 38657432730e54175f7f38864bd36d6e91700644 Mon Sep 17 00:00:00 2001 From: Sofiosko Date: Wed, 23 Jan 2019 17:59:01 +0100 Subject: [PATCH] readme update --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a97dd52..8571e85 100644 --- a/README.md +++ b/README.md @@ -1 +1,16 @@ -The whole library purpose is to simplify working with Czech VAT while it allows to extend and bend computing logic of every important operation. \ No newline at end of file +The whole library purpose is to simplify working with Czech VAT while it allows to extend and bend computing logic of every important operation. + +```php +$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() +]); +``` \ No newline at end of file