| 
				 public 
				
				
				 | 
			#
			__construct( )
				
Initialize Currencies Overrides | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getList( integer $company_id, integer $page = 1, string $order_by = array('code'=>"ASC") )
				
Fetches a list of all currencies for a given company 
				
Fetches a list of all currencies for a given company Parameters
						$company_idinteger$company_id The ID of the company to fetch currencies for
$pageinteger$page The page to return results for (optional, default 1)
$order_bystring$order_by The sort and order conditions (e.g. array('sort_field'=>"ASC"),
optional)
Returns
						mixedAn array of stdClass objects representing currencies, false if no currencies
found
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			getListCount( integer $company_id )
				
Returns the total number of currencies returned from Currencies::getList(),
useful in constructing pagination for the getList() method. 
				
Returns the total number of currencies returned from Currencies::getList(),
useful in constructing pagination for the getList() method. Parameters
						$company_idinteger$company_id The ID of the company to fetch currencies for
Returns
						integerThe total number of currencies
 
 See | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getAll( integer $company_id )
				
Fetches a full list of all currencies for a given company 
				
Fetches a full list of all currencies for a given company Parameters
						$company_idinteger$company_id The ID of the company to fetch currencies for
Returns
						mixedAn array of stdClass objects representing all currencies, or false if no
currencies found
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			get( string $currency_code, integer $company_id )
				
Fetches a currency using the given currency code 
				
Fetches a currency using the given currency code Parameters
						$currency_codestring$currency_code The ISO 4217 currency code to fetch on
$company_idinteger$company_id The ID of the company whose currency to fetch
Returns
						mixedstdClass object representing the currency if it exists, false otherwise
 
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getFormats( )
				
Returns an array containing every supported currency format with an example
in key/value pairs 
				
Returns an array containing every supported currency format with an example
in key/value pairs Returns
						arrayAn array of currency formats in key/value pairs where the key is the format and
the value is an example
 
 | 
		
			| 
				 public 
				
				
				 | 
			#
			add( array $vars )
				
Adds a new currency Parameters
						$varsarray$vars An array of currency info including: - code The ISO 4217 currency code -
company_id The Company ID - format The format code to use for this currency -
precision The decimal precision to use for this currency - prefix The prefix to
use for this currency - suffix The suffix to use for this currency -
exchange_rate The exchange rate in relation to the primary currency -
exchange_updated The datetime the exchange_rate was last updated
 | 
		
			| 
				 public 
				
				
				 | 
			#
			edit( string $currency_code, integer $company_id, array $vars )
				
Edits an existing currency 
				
Edits an existing currency Parameters
						$currency_codestring$currency_code The ISO 4217 currency code we are updating
$company_idinteger$company_id The Company ID for this currency code
$varsarray$vars An array of currency info including: - format The format code to use for
this currency - precision The decimal precision to use for this currency -
prefix The prefix to use for this currency - suffix The suffix to use for this
currency - exchange_rate The exchange rate in relation to the primary currency -
exchange_updated The datetime the exchange_rate was last updated
 | 
		
			| 
				 public 
				
				
				 | 
			#
			delete( string $currency_code, integer $company_id )
				
Deletes an existing currency 
				
Deletes an existing currency Parameters
						$currency_codestring$currency_code The ISO 4217 currency code we are deleting
$company_idinteger$company_id The Company ID for this currency code
 | 
		
			| 
				 public 
				float
				
				 | 
			#
			convert( float $amount, string $from_currency, string $to_currency, integer $company_id )
				
Converts an amount from one currency to another using the exchange rate 
				
Converts an amount from one currency to another using the exchange rate Parameters
						$amountfloat$amount The amount to convert
$from_currencystring$from_currency The ISO 4217 currency code format representing $amount
$to_currencystring$to_currency The ISO 4217 currency code to format to
$company_idinteger$company_id The ID of the company
Returns
						floatThe $amount converted between currencies
 
 | 
		
			| 
				 public 
				string
				
				 | 
			#
			toDecimal( string $value, string $currency, integer $company_id = null, integer $decimals = 2 )
				
Converts a currency value into a decimal representation based on ISO 31-0 
				
Converts a currency value into a decimal representation based on ISO 31-0 Parameters
						$valuestring$value A currency value
$currencystring$currency The ISO 4217 currency code format representing $value
$company_idinteger$company_id The company ID to fetch the currency for
$decimalsinteger$decimals The number of decimals points (precision)
Returns
						stringThe value in decimal format based on ISO 31-0
 
 See | 
		
			| 
				 public 
				string
				
				 | 
			#
			toCurrency( float $value, string $currency, integer $company_id = null, boolean $prefix = true, boolean $suffix = true, boolean $code = false, boolean $with_separator = true, integer $decimals = 2 )
				
Converts the given decimal value into a currency value. 
				
Converts the given decimal value into a currency value. Parameters
						$valuefloat$value The decimal value to convert
$currencystring$currency The ISO 4217 currency code format to apply to $value
$company_idinteger$company_id The company ID to fetch the currency for
$prefixboolean$prefix True to include the prefix symbol for this currency, false otherwise
$suffixboolean$suffix True to include the suffix symbol for this currency, false otherwise
$codeboolean$code True to include the currency code for this currency, false otherwise
$with_separatorboolean$with_separator True to include the separator for this currency, false otherwise
$decimalsinteger$decimals The number of decimal places (precision)
Returns
						stringThe value formatted for the specified currency
 
 See | 
		
			| 
				 public 
				string
				
				 | 
			#
			toCurrencyValue( float $value, string $currency, boolean $with_separator = true, integer $company_id = null, integer $decimals = 2 )
				
Converts the given decimal value into a currency value excluding the prefix,
suffix, and currency code symbols 
				
Converts the given decimal value into a currency value excluding the prefix,
suffix, and currency code symbols Parameters
						$valuefloat$value The decimal value to convert
$currencystring$currency The ISO 4217 currency code format to apply to $value
$with_separatorboolean$with_separator True to include the separator for this currency, false otherwise
$company_idinteger$company_id The company ID to fetch the currency for
$decimalsinteger$decimals The number of decimal places (precision)
Returns
						stringThe value formatted for the specified currency
 
 See | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			validateCurrencyInUse( string $currency_code, integer $company_id )
				
Checks if a currency code is currently in use 
				
Checks if a currency code is currently in use Parameters
						$currency_codestring$currency_code The ISO 4217 currency code to check
$company_idinteger$company_id The company ID whose currency to check
Returns
						booleanTrue if the currency code is in use, false otherwise
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			validateCurrencyIsDefault( string $currency_code, integer $company_id )
				
Checks if the given currency code is set as the default currency 
				
Checks if the given currency code is set as the default currency Parameters
						$currency_codestring$currency_code The ISO 4217 currency code to check
$company_idinteger$company_id The company ID whose default currency to check
Returns
						booleanTrue if the currency is the default currency for this company, false otherwise
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			validateCurrencyFormat( string $format )
				
Validates a currency's 'format' field 
				
Validates a currency's 'format' field Parameters
						$formatstring$format The format to check, (e.g. "#.###")
Returns
						booleanTrue if validated, false otherwise
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			validateCurrencyExists( string $code, integer $company_id )
				
Validates a currency exists 
				
Validates a currency exists Parameters
						$codestring$code The currency code
$company_idinteger$company_id The company ID
Returns
						booleanTrue if the currency exists, false otherwise
 
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getExchangeRateProcessors( )
				
Retrieves a list of exchange rate processors 
				
Retrieves a list of exchange rate processors Returns
						arrayA list of exchange rate processors
 
 | 
		
			| 
				 public 
				
				
				 | 
			#
			updateRates( )
				
Updates all currency exchange rates for the current company using the
configured processor. 
				
Updates all currency exchange rates for the current company using the
configured processor. |