public static function initDefaultCurrency(Gpf_Db_Currency $currency) { $currency->setId('usd00000'); $currency->setName('USD'); $currency->setSymbol('$'); $currency->setPrecision(2); $currency->setWhereDisplay(Gpf_Db_Currency::DISPLAY_LEFT); }
private function migrateCurrency() { echo " Migrating currency....."; $currency = $this->getPap3Setting('Aff_system_currency'); $currencyPosition = $this->getPap3Setting('Aff_currency_left_position'); $currencyRounding = $this->getPap3Setting('Aff_round_numbers'); $obj = new Gpf_Db_Currency(); $obj->setAccountId(Pap3Compatibility_Migration_Pap3Constants::DEFAULT_ACCOUNT_ID); $obj->setExchangeRate(1); $obj->setIsDefault(1); $obj->setName($currency); $obj->setSymbol($currency); $obj->setPrecision($currencyRounding); $obj->setWhereDisplay(($currencyPosition == 1 ? Gpf_Db_Currency::DISPLAY_LEFT : Gpf_Db_Currency::DISPLAY_RIGHT)); $obj->save(); echo "DONE<br/>"; }