Example #1
0
 /**
  * get VAT for given article, can NOT be null
  *
  * @param Article $oArticle given article
  *
  * @return double
  */
 public function getArticleVat(Article $oArticle)
 {
     startProfile("_assignPriceInternal");
     // article has its own VAT ?
     if (($dArticleVat = $oArticle->getCustomVAT()) !== null) {
         stopProfile("_assignPriceInternal");
         return $dArticleVat;
     }
     if (($dArticleVat = $this->_getVatForArticleCategory($oArticle)) !== false) {
         stopProfile("_assignPriceInternal");
         return $dArticleVat;
     }
     stopProfile("_assignPriceInternal");
     return $this->getConfig()->getConfigParam('dDefaultVAT');
 }