Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

ZurmoCurrencyHelper Class Reference

Public Member Functions

 setBaseCode ($value)
 getBaseCode ()
 setServiceType ($value)
 getServiceType ()
 getActiveCurrencyForCurrentUser ()
 getCodeForCurrentUserForDisplay ()
 getConversionRateToBase ($fromCode)
 getWebServiceErrorMessage ()
 getWebServiceErrorCode ()
 checkAndUpdateCurrencyRates ($forceCheck=false)
 getActiveCurrenciesOrSelectedCurrenciesData ($selectedCurrencyId)
 getLastAttemptedRateUpdateDateTime ()
 resetErrors ()

Data Fields

const ERROR_INVALID_CODE = 1
const ERROR_WEB_SERVICE = 2

Protected Member Functions

 setCurrencyService ()

Protected Attributes

 $_baseCode
 $_serviceType
 $currencyService

Detailed Description

Application loaded component at run time.

See also:
BeginBehavior - calls load() method.

Definition at line 40 of file ZurmoCurrencyHelper.php.


Member Function Documentation

setBaseCode ( value  ) 

This is set from the value in the application common config file.

Definition at line 68 of file ZurmoCurrencyHelper.php.

setServiceType ( value  ) 

This is set from the value in the application common config file.

Definition at line 82 of file ZurmoCurrencyHelper.php.

getActiveCurrencyForCurrentUser (  ) 

Resolve the active currency for the current user. If the user does not have a currency, it will fall back to the base system currency. If the base system currency does not exist, it will attempt to make it.

Exceptions:
NotSupportedException 

Definition at line 106 of file ZurmoCurrencyHelper.php.

getConversionRateToBase ( fromCode  ) 

Get the conversion rate from the supplied currency code to the base currency.

Parameters:
int $fromCode;

Definition at line 147 of file ZurmoCurrencyHelper.php.

checkAndUpdateCurrencyRates ( forceCheck = false  ) 

Check if the currency rate has been updated within the last 24 hours. If not, then perform a currency update and update the lastAttemptedRateUpdateTimeStamp.

Parameters:
boolean $forceCheck - If true, it will ignore the last time the check was made

Definition at line 176 of file ZurmoCurrencyHelper.php.

getActiveCurrenciesOrSelectedCurrenciesData ( selectedCurrencyId  ) 

Given a selectedCurrencyId, return an array of available currencies for selection in the user interface. If the selected currency is inactive, include this in the returned data.

Parameters:
mixed $selectedCurrencyId

Definition at line 204 of file ZurmoCurrencyHelper.php.

getLastAttemptedRateUpdateDateTime (  ) 
Returns:
Date/Time of the last attempted rate update.

Definition at line 226 of file ZurmoCurrencyHelper.php.


Field Documentation

$_baseCode [protected]

Base currency all currency values have rates against. ISO-4217 code.

Definition at line 50 of file ZurmoCurrencyHelper.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon Mar 18 07:11:06 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8