Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

oxVatSelector Class Reference

Inheritance diagram for oxVatSelector:
Collaboration diagram for oxVatSelector:

List of all members.

Public Member Functions

 getUserVat (oxUser $oUser, $blCacheReset=false)
 getArticleVat (oxArticle $oArticle)
 getBasketItemVat (oxArticle $oArticle, $oBasket)
 getArticleUserVat (oxArticle $oArticle)

Protected Member Functions

 _getForeignCountryUserVat (oxUser $oUser, oxCountry $oCountry)
 _getVatForArticleCategory (oxArticle $oArticle)
 _getVatCountry (oxUser $oUser)

Protected Attributes

 $_blCatVatSet = null

Static Protected Attributes

static $_aUserVatCache = array()

Detailed Description

Class, responsible for retrieving correct vat for users and articles

Definition at line 7 of file oxvatselector.php.


Member Function Documentation

oxVatSelector._getForeignCountryUserVat ( oxUser oUser,
oxCountry oCountry 
) [protected]

get vat for user of a foreign country

Parameters:
oxUser $oUser given user object
oxCountry $oCountry given country object
Returns:
mixed

Definition at line 71 of file oxvatselector.php.

oxVatSelector._getVatCountry ( oxUser oUser  )  [protected]

Returns country id which VAT should be applied to. Depending on configuration option either user billing country or shipping country (if available) is returned.

Parameters:
oxUser $oUser user object
Returns:
string

Definition at line 192 of file oxvatselector.php.

oxVatSelector._getVatForArticleCategory ( oxArticle oArticle  )  [protected]

return Vat value for oxcategory type assignment only

Parameters:
oxArticle $oArticle given article
Returns:
float | false

Definition at line 91 of file oxvatselector.php.

oxVatSelector.getArticleUserVat ( oxArticle oArticle  ) 

get article user vat

Parameters:
oxArticle $oArticle article object
Returns:
double | false

Definition at line 174 of file oxvatselector.php.

oxVatSelector.getArticleVat ( oxArticle oArticle  ) 

get VAT for given article, can NOT be null

Parameters:
oxArticle $oArticle given article
Returns:
double

Definition at line 131 of file oxvatselector.php.

oxVatSelector.getBasketItemVat ( oxArticle oArticle,
oBasket 
)

Currently returns vats percent that can be applied for basket item ( executes oxVatSelector.getArticleVat()). Can be used to override basket price calculation behaviour (oxarticle.getBasketPrice())

Parameters:
object $oArticle article object
object $oBasket oxbasket object
Returns:
double

Definition at line 162 of file oxvatselector.php.

oxVatSelector.getUserVat ( oxUser oUser,
blCacheReset = false 
)

get VAT for user, can NOT be null

Parameters:
oxUser $oUser given user object
bool $blCacheReset reset cache
Exceptions:
oxObjectException if wrong country
Returns:
double | false

Definition at line 33 of file oxvatselector.php.


Member Data Documentation

oxVatSelector.$_aUserVatCache = array() [static, protected]

Definition at line 22 of file oxvatselector.php.

oxVatSelector.$_blCatVatSet = null [protected]

Definition at line 15 of file oxvatselector.php.


The documentation for this class was generated from the following file: