Skip to content

Tax Helpers

This helper provides utility methods to work with taxes.

getTax19

The getTax19 method returns the tax entity with a tax rate of 19%, or null if it doesn't exist.

php
<?php

class MyFixture extends Fixture {
    public function load(): void {
        $tax = $this->helper->Tax()->getTax19(); 
    }
}

getTax

The getTax method takes a tax rate as a parameter and returns the tax entity with that given tax rate, or null if it doesn't exist.

php
<?php

class MyFixture extends Fixture {
    public function load(): void {
        $tax = $this->helper->Tax()->getTax(16.0); 
    }
}

Released under the MIT License.