src/PrestaShop/Invoice/Creator.php
protected function getVatRateLookupMetadata($addressId, $taxRulesGroupId)
    {
        try {
            $taxRulesGroup = new TaxRulesGroup($taxRulesGroupId);
            $address = new Address($addressId);
            $taxManager = TaxManagerFactory::getManager($address, $taxRulesGroupId);
            $taxCalculator = $taxManager->getTaxCalculator();
            $result = array(
                Meta::VatClassId => $taxRulesGroup->id,
                Meta::VatClassName => $taxRulesGroup->name,
                Meta::VatRateLookup => $taxCalculator->getTotalRate(),
                Meta::VatRateLookupLabel => $taxCalculator->getTaxesName(),
            );
        } catch (\Exception $e) {
            $result = array();
        }
        return $result;
    }
protected function getVatRateLookupMetadata($addressId, $taxRulesGroupId)
    {
        try {
            $taxRulesGroup = new TaxRulesGroup($taxRulesGroupId);
            $address = new Address($addressId);
            $taxManager = TaxManagerFactory::getManager($address, $taxRulesGroupId);
            $taxCalculator = $taxManager->getTaxCalculator();
            $result = array(
                Meta::VatClassId => $taxRulesGroup->id,
                Meta::VatClassName => $taxRulesGroup->name,
                Meta::VatRateLookup => $taxCalculator->getTotalRate(),
                Meta::VatRateLookupLabel => $taxCalculator->getTaxesName(),
            );
        } catch (\Exception $e) {
            $result = array();
        }
        return $result;
    }
protected function getVatRateLookupMetadata ( $ addressId , $ taxRulesGroupId ) { try { $ taxRulesGroup = new TaxRulesGroup ( $ taxRulesGroupId ) ; $ address = new Address ( $ addressId ) ; $ taxManager = TaxManagerFactory :: getManager ( $ address , $ taxRulesGroupId ) ; $ taxCalculator = $ taxManager -> getTaxCalculator ( ) ; $ result = array ( Meta :: VatClassId => $ taxRulesGroup -> id , Meta :: VatClassName => $ taxRulesGroup -> name , Meta :: VatRateLookup => $ taxCalculator -> getTotalRate ( ) , Meta :: VatRateLookupLabel => $ taxCalculator -> getTaxesName ( ) , ) ; } catch ( \ Exception $ e ) { $ result = array ( ) ; } return $ result ; }
Looks up and returns vat rate metadata.

@param int $addressId
@param int $taxRulesGroupId

@return array
An empty array or an array with keys:
- Meta::VatClassId: int
- Meta::VatClassName: string
- Meta::VatRateLookup: float
- Meta::VatRateLookupLabel: string
Looks up and returns vat rate metadata .