GetFreeAccountName.
1605 $accounts = $s->loadCollection(array(
1606 'exchange' => $this->
id,
1607 'kind' => array(0, 1, 2, 3, 4),
1611 $start = floor((count($accounts) - 1) / 2);
1613 $code = !empty($accounts) ? $accounts[$start]->getCode() : 0;
1614 if (!is_numeric(
$code)) {
1617 for ($i = $start + 1; $i < count($accounts); $i++) {
1618 $acccode = $accounts[$i]->getCode();
1619 if (is_numeric($acccode)) {
1620 if ($acccode -
$code > 1) {
1629 while (drupal_strlen(
$code) < 4) {
1632 return $this->code .
$code;
Loads and saves to db objects of class IcesDBObject.
Definition: common.db.logic.inc:17
$code
Code.
Definition: ces_bank.logic.inc:1455