src/ShopBundle/objects/db/TShopShippingGroup.class.php
public function GetVat()
    {
        $oVat = $this->GetFromInternalCache('ovat');
        if (is_null($oVat)) {
            $oVat = null;
            $oShopConf = TdbShop::GetInstance();
            if (!$oShopConf->fieldShippingVatDependsOnBasketContents) {
                $oVat = $this->GetFieldShopVat();
                if (is_null($oVat)) {
                    $oShopConf = TdbShop::GetInstance();
                    $oVat = $oShopConf->GetVat();
                }
                $this->SetInternalCache('ovat', $oVat);
            } else {
                // use max vat in basket... if we have contents
                $oBasket = TShopBasket::GetInstance();
                $oVat = $oBasket->GetLargestVATObject();
            }
        }

        return $oVat;
    }
public function GetVat()
    {
        $oVat = $this->GetFromInternalCache('ovat');
        if (is_null($oVat)) {
            $oVat = null;
            $oShopConf = TdbShop::GetInstance();
            if (!$oShopConf->fieldShippingVatDependsOnBasketContents) {
                $oVat = $this->GetFieldShopVat();
                if (is_null($oVat)) {
                    $oShopConf = TdbShop::GetInstance();
                    $oVat = $oShopConf->GetVat();
                }
                $this->SetInternalCache('ovat', $oVat);
            } else {
                // use max vat in basket... if we have contents
                $oBasket = TShopBasket::GetInstance();
                $oVat = $oBasket->GetLargestVATObject();
            }
        }

        return $oVat;
    }
public function GetVat ( ) { $ oVat = $ this -> GetFromInternalCache ( 'ovat' ) ; if ( is_null ( $ oVat ) ) { $ oVat = null ; $ oShopConf = TdbShop :: GetInstance ( ) ; if ( ! $ oShopConf -> fieldShippingVatDependsOnBasketContents ) { $ oVat = $ this -> GetFieldShopVat ( ) ; if ( is_null ( $ oVat ) ) { $ oShopConf = TdbShop :: GetInstance ( ) ; $ oVat = $ oShopConf -> GetVat ( ) ; } $ this -> SetInternalCache ( 'ovat' , $ oVat ) ; } else { // use max vat in basket... if we have contents $ oBasket = TShopBasket :: GetInstance ( ) ; $ oVat = $ oBasket -> GetLargestVATObject ( ) ; } } return $ oVat ; }
return the vat group for this shipping group.

@return TdbShopVat
return the vat group for this shipping group .