src/Invoice/Completor.php
protected function getVatRatesByCountryAndDate($countryCode, $date = null)
    {
        if (empty($date)) {
            $date = $this->getInvoiceDate();
        }
        $result = $this->service->getVatInfo($countryCode, $date);
        if ($result->hasMessages()) {
            $this->result->mergeMessages($result);
        }
        $vatInfo = $result->getResponse();
        // PHP5.5: array_column($vatInfo, Tag::VatRate);
        $vatInfo = array_unique(array_map(function ($vatInfo1) {
            return $vatInfo1[Tag::VatRate];
        }, $vatInfo));
        return $vatInfo;
    }
protected function getVatRatesByCountryAndDate($countryCode, $date = null)
    {
        if (empty($date)) {
            $date = $this->getInvoiceDate();
        }
        $result = $this->service->getVatInfo($countryCode, $date);
        if ($result->hasMessages()) {
            $this->result->mergeMessages($result);
        }
        $vatInfo = $result->getResponse();
        // PHP5.5: array_column($vatInfo, Tag::VatRate);
        $vatInfo = array_unique(array_map(function ($vatInfo1) {
            return $vatInfo1[Tag::VatRate];
        }, $vatInfo));
        return $vatInfo;
    }
protected function getVatRatesByCountryAndDate ( $ countryCode , $ date = null ) { if ( empty ( $ date ) ) { $ date = $ this -> getInvoiceDate ( ) ; } $ result = $ this -> service -> getVatInfo ( $ countryCode , $ date ) ; if ( $ result -> hasMessages ( ) ) { $ this -> result -> mergeMessages ( $ result ) ; } $ vatInfo = $ result -> getResponse ( ) ; // PHP5.5: array_column($vatInfo, Tag::VatRate); $ vatInfo = array_unique ( array_map ( function ( $ vatInfo1 ) { return $ vatInfo1 [ Tag :: VatRate ] ; } , $ vatInfo ) ) ; return $ vatInfo ; }
Helper method to get the vat rates for the current invoice.

- This method contacts the Acumulus server.
- The vat rates returned reflect those as they were at the invoice date.
- No zero vat rates are returned.

@param string $countryCode
The country to fetch the vat rates for.
@param string|null $date
The date (yyyy-mm-dd) to fetch the vat rates for.

@return float[]
Actual type will be string[] containing strings representing floats.

@see \Siel\Acumulus\Web\Service::getVatInfo().
Helper method to get the vat rates for the current invoice .