/** * @return Am_Currency */ function getCurrency($value = null) { $c = new Am_Currency($this->currency); if ($value) { $c->setValue($value); } return $c; }
function renderPayments(User $record) { if ($record->payments_count) { $curr = new Am_Currency(); $curr->setValue($record->payments_sum); $text = $record->payments_count . ' - ' . $curr->toString(); $link = REL_ROOT_URL . "/admin-user-payments/index/user_id/{$record->user_id}"; $text = sprintf('<a class="link" target="_top" href="%s#payments">%s</a>', $link, $text); } else { $text = ___('Never'); } return sprintf('<td>%s</td>', $text); }