Exemplo n.º 1
0
 /**
  * Applies VAT to article
  *
  * @param oxPrice $oPrice Price object
  * @param double  $dVat   VAT percent
  */
 protected function _applyVAT(oxPrice $oPrice, $dVat)
 {
     startProfile(__FUNCTION__);
     $oPrice->setVAT($dVat);
     /** @var oxVatSelector $oVatSelector */
     $oVatSelector = oxRegistry::get("oxVatSelector");
     if (($dVat = $oVatSelector->getArticleUserVat($this)) !== false) {
         $oPrice->setUserVat($dVat);
     }
     stopProfile(__FUNCTION__);
 }
Exemplo n.º 2
0
 /**
  * Applies VAT to article
  *
  * @param oxPrice $oPrice Price object
  * @param double  $dVat   VAT percent
  *
  * @return null
  */
 protected function _applyVAT(oxPrice $oPrice, $dVat)
 {
     startProfile(__FUNCTION__);
     $oPrice->setVAT($dVat);
     if (($dVat = oxVatSelector::getInstance()->getArticleUserVat($this)) !== false) {
         $oPrice->setUserVat($dVat);
     }
     stopProfile(__FUNCTION__);
 }