eZ Publish  [trunk]
eZMultiPrice Class Reference

Handles prices in different currencies with VAT and discounts. More...

+ Inheritance diagram for eZMultiPrice:
+ Collaboration diagram for eZMultiPrice:

List of all members.

Public Member Functions

 addPrice ($currencyCode, $value, $type)
 attribute ($attr)
 attributes ()
 autoCurrencyList ()
 autoPrice ($currencyCode)
 autoPriceList ()
 baseCurrency ()
 basePrice ()
 calcPriceList ($calculationType, $priceType)
 createPrice ($currencyCode, $value, $type)
 currency ()
 currencyByCode ($currencyCode)
 currencyList ()
 customPrice ($currencyCode)
 customPriceList ()
 decodeDOMTree ($rootNode)
 discountExVATPriceList ($type=false)
 discountIncVATPriceList ($type=false)
 DOMDocument ()
 exVATPriceList ($type=false)
 eZMultiPrice ($classAttribute, $contentObjectAttribute, $storedPrice=null)
 hasAttribute ($attr)
 hasDirtyData ()
 incVATPriceList ($type=false)
 preferredCurrencyCode ()
 price ()
 priceByCurrency ($currencyCode, $type=false)
 priceList ($type=false)
 removePriceByCurrency ($currencyCode)
 setAttribute ($attr, $value)
 setAutoPrice ($currencyCode, $value)
 setCustomPrice ($currencyCode, $value)
 setHasDirtyData ($hasDirtyData)
 setPrice ($value)
 setPriceByCurrency ($currencyCode, $value, $type)
 store ()
 storePriceList ()
 updateAutoPriceList ()
 updatePrice ($currencyCode, $value, $type)

Static Public Member Functions

static removeByID ($objectAttributeID, $objectAttributeVersion=null)

Public Attributes

 $ContentObjectAttribute
 $CurrencyList
 $HasDataDirty
 $PriceList
const CALCULATION_TYPE_DISCOUNT_EXCLUDE = 4
const CALCULATION_TYPE_DISCOUNT_INCLUDE = 3
const CALCULATION_TYPE_VAT_EXCLUDE = 2
const CALCULATION_TYPE_VAT_INCLUDE = 1

Detailed Description

Handles prices in different currencies with VAT and discounts.

The available attributes are:

  • vat_type
  • current_user
  • is_vat_included
  • selected_vat_type
  • vat_percent
  • inc_vat_price
  • ex_vat_price
  • discount_percent
  • discount_price_inc_vat
  • discount_price_ex_vat
  • has_discount
  • price

Definition at line 31 of file ezmultiprice.php.


Member Function Documentation

eZMultiPrice::addPrice ( currencyCode,
value,
type 
)

Definition at line 397 of file ezmultiprice.php.

Referenced by setPriceByCurrency().

Returns:
The value of the attribute named $attr or null if it doesn't exist.

Reimplemented from eZSimplePrice.

Definition at line 117 of file ezmultiprice.php.

Referenced by DOMDocument(), and priceByCurrency().

Returns:
An array with attributes that is available.

Reimplemented from eZSimplePrice.

Definition at line 58 of file ezmultiprice.php.

Referenced by hasAttribute().

functional attribute

Definition at line 195 of file ezmultiprice.php.

Referenced by attribute(), and updateAutoPriceList().

eZMultiPrice::autoPrice ( currencyCode)

Definition at line 438 of file ezmultiprice.php.

Definition at line 222 of file ezmultiprice.php.

Referenced by attribute().

Returns a currency code of the first custom price.

Definition at line 520 of file ezmultiprice.php.

Referenced by basePrice().

Definition at line 536 of file ezmultiprice.php.

Referenced by updateAutoPriceList().

eZMultiPrice::calcPriceList ( calculationType,
priceType 
)
eZMultiPrice::createPrice ( currencyCode,
value,
type 
)

Definition at line 383 of file ezmultiprice.php.

Referenced by addPrice().

Return the currency for the datatype.

Reimplemented from eZSimplePrice.

Definition at line 542 of file ezmultiprice.php.

eZMultiPrice::currencyByCode ( currencyCode)

Definition at line 474 of file ezmultiprice.php.

Referenced by createPrice().

Definition at line 182 of file ezmultiprice.php.

Referenced by attribute(), autoCurrencyList(), and currencyByCode().

eZMultiPrice::customPrice ( currencyCode)

Definition at line 433 of file ezmultiprice.php.

functional attribute

Definition at line 217 of file ezmultiprice.php.

Referenced by attribute(), autoCurrencyList(), and baseCurrency().

eZMultiPrice::decodeDOMTree ( rootNode)

Definition at line 577 of file ezmultiprice.php.

Definition at line 277 of file ezmultiprice.php.

Referenced by attribute().

Definition at line 272 of file ezmultiprice.php.

Referenced by attribute().

Definition at line 547 of file ezmultiprice.php.

Definition at line 267 of file ezmultiprice.php.

Referenced by attribute().

eZMultiPrice::eZMultiPrice ( classAttribute,
contentObjectAttribute,
storedPrice = null 
)

Constructor

Definition at line 41 of file ezmultiprice.php.

Returns:
true if the attribute named $attr exists.

Reimplemented from eZSimplePrice.

Definition at line 75 of file ezmultiprice.php.

Definition at line 507 of file ezmultiprice.php.

Referenced by store().

Definition at line 262 of file ezmultiprice.php.

Referenced by attribute().

functional attribute

Definition at line 177 of file ezmultiprice.php.

Referenced by currency(), and price().

Reimplemented from eZSimplePrice.

Definition at line 459 of file ezmultiprice.php.

eZMultiPrice::priceByCurrency ( currencyCode,
type = false 
)
static eZMultiPrice::removeByID ( objectAttributeID,
objectAttributeVersion = null 
) [static]

Definition at line 325 of file ezmultiprice.php.

Referenced by eZMultiPriceType\deleteStoredObjectAttribute().

Definition at line 330 of file ezmultiprice.php.

eZMultiPrice::setAttribute ( attr,
value 
)

Sets the attribute named $attr to value $value.

Reimplemented from eZSimplePrice.

Definition at line 83 of file ezmultiprice.php.

eZMultiPrice::setAutoPrice ( currencyCode,
value 
)

Definition at line 346 of file ezmultiprice.php.

Referenced by updateAutoPriceList().

eZMultiPrice::setCustomPrice ( currencyCode,
value 
)

Definition at line 341 of file ezmultiprice.php.

eZMultiPrice::setHasDirtyData ( hasDirtyData)

Definition at line 512 of file ezmultiprice.php.

Referenced by addPrice(), store(), and updatePrice().

eZMultiPrice::setPrice ( value)

Reimplemented from eZSimplePrice.

Definition at line 363 of file ezmultiprice.php.

eZMultiPrice::setPriceByCurrency ( currencyCode,
value,
type 
)

Definition at line 351 of file ezmultiprice.php.

Referenced by decodeDOMTree(), setAutoPrice(), and setCustomPrice().

Definition at line 486 of file ezmultiprice.php.

Definition at line 495 of file ezmultiprice.php.

Referenced by store().

Definition at line 367 of file ezmultiprice.php.

eZMultiPrice::updatePrice ( currencyCode,
value,
type 
)

Definition at line 412 of file ezmultiprice.php.

Referenced by setPriceByCurrency().


Member Data Documentation

eZMultiPrice::$ContentObjectAttribute

Definition at line 598 of file ezmultiprice.php.

eZMultiPrice::$CurrencyList

Definition at line 596 of file ezmultiprice.php.

eZMultiPrice::$HasDataDirty

Definition at line 597 of file ezmultiprice.php.

eZMultiPrice::$PriceList

Definition at line 595 of file ezmultiprice.php.

Definition at line 34 of file ezmultiprice.php.

Definition at line 33 of file ezmultiprice.php.


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