function getBaseCurrencyHourlyRate($rate) { if ($rate == '') { return FALSE; } $clf = new CurrencyListFactory(); $clf->getByCompanyIdAndBase($this->getUserObject()->getCompany(), TRUE); if ($clf->getRecordCount() > 0) { $base_currency_obj = $clf->getCurrent(); //If current currency is the base currency, just return the rate. if ($base_currency_obj->getId() == $this->getUserObject()->getCurrency()) { return $rate; } else { //Debug::text(' Base Currency Rate: '. $base_currency_obj->getConversionRate() .' Hourly Rate: '. $rate , __FILE__, __LINE__, __METHOD__,10); return CurrencyFactory::convertCurrency($this->getUserObject()->getCurrency(), $base_currency_obj->getId(), $rate); } } return FALSE; }