Phang  2.1
 All Classes Files Functions Variables Pages
Static Public Member Functions | Public Attributes
Vat Class Reference

Calculate VAT. More...

Inheritance diagram for Vat:
Base

List of all members.

Static Public Member Functions

static vat_rate ()
 Returns the VAT rate, e.g.
static vat_constant ($vat_rate=null)
 Gets the VAT constant, to use in calculations.
static paid_from_gross ($price, $vat_rate=null)
 Works out the tax paid from a gross price IMPORTANT: this is not to add to a net price! use Vat::add() instead.
static add ($price, $vat_rate=null)
 Add VAT to a net price.
static deduct ($price, $vat_rate=null)
 Remove VAT from a gross price.

Public Attributes

const STANDARD_VAT_RATE = 20
 Standard VAT rate. (Unused)

Additional Inherited Members

- Public Member Functions inherited from Base
 __call ($function, $params)
 The 'magic' call method will get/set for us invoked when the interpreter can not find a method the user is asking for.
 set_parameters ($arguments)
 Set variables from an array to member fields requires $this->optional_arguments or $this->required_arguments to have been set by the subclass.
- Protected Attributes inherited from Base
 $optional_arguments = array()
 Array of options that can be set to variables.
 $required_arguments = array()
 Array of options that need to be set to variables.

Detailed Description

Calculate VAT.


Member Function Documentation

static Vat::vat_rate ( )
static

Returns the VAT rate, e.g.

'20' (%)


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