Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 2457

Přidáno uživatelem Ondřej Fibich před více než 9 roky(ů)

Updavy: refs #977: Seznamy uctu - odstranit adresu, pridat ID vlastnika

Zobrazit rozdíly:

freenetis/branches/1.2/application/controllers/transfers.php
'account_attribute_id', Account_attribute_Model::OPERATING
)->find();
// array with only one origin account
$arr_orig_accounts[$oa->id] = $oa->name . ' ' . $oa->id;
$arr_orig_accounts[$oa->id] = $oa->name . ' (' . $oa->id . ', '
. $oa->account_attribute_id . ', ' . $oa->member_id . ')';
// account attributes for types of accounts
$aa_model = new Account_attribute_Model();
$account_attributes = $aa_model->get_account_attributes();
......
$form->group('Origin account');
$form->dropdown('oname')
->label('Origin account (account name, account ID)')
->label('Origin account (name, ID, type, member ID)')
->options($arr_orig_accounts)
->rules('required')
->style('width:450px');
......
->style('width:450px');
$form->dropdown('aname')
->label('Destination account (account name, account ID)')
->label('Destination account (name, ID, type, member ID)')
->options($dst_accounts)
->rules('required')
->selected($operating->id)
......
$form->group('Origin account');
$form->dropdown('oname')
->label('Origin account (account name, account ID)')
->label('Origin account (name, ID, type, member ID)')
->options($arr_accounts)
->rules('required')
->style('width:450px');
......
$form->group('Destination account');
$form->dropdown('aname')
->label('Destination account (account name, account ID)')
->label('Destination account (name, ID, type, member ID)')
->options($arr_accounts)
->rules('required')
->selected($operating->id)
freenetis/branches/1.2/application/i18n/cs_CZ/texts.php
'deselect all' => 'Zrušit výběr',
'destination' => 'Destinace',
'destination account' => 'Cílový účet',
'destination account (account name, account id)' => 'Cílový účet (název účtu, ID účtu)',
'destination account (name, id, type, member id)' => 'Cílový účet (název, ID, typ, ID člena)',
'destination bank account' => 'Cílový bankovní účet',
'destination credit account' => 'Cílový kreditní účet',
'destination language' => 'Cílový jazyk',
......
'organization identifier' => 'IČ',
'organization_identifier' => 'IČ',
'origin account' => 'Zdrojový účet',
'origin account (account name, account id)' => 'Zdrojový účet (název účtu, ID účtu)',
'origin account (name, id, type, member id)' => 'Zdrojový účet (název, ID, typ, ID člena)',
'origin bank account' => 'Zdrojový bankovní účet',
'original term' => 'Původní výraz',
'originating call' => 'Odchozí volání',
freenetis/branches/1.2/application/models/account.php
}
/**
* Function gets some double-entry accounts. Used in dropdown to select destination account.
* Function gets some double-entry accounts. Used in dropdown to select
* destination account.
*
* @param integer $origin
* @param integer $account_attribute_id
* @return Mysql_Result
......
public function get_some_doubleentry_account_names($origin = null, $account_attribute_id = null)
{
// conditions
$cond_origin = "";
$where = "";
$where = $cond_origin = '';
// make origin condition
if ($origin !== null)
{
......
}
// query
return $this->db->query("
SELECT a.id, a.name, a.member_id, m.name AS member_name, a.account_attribute_id,
IF(t.quarter IS NULL, concat(t.town, ' ', p.street_number),
concat(t.town, '-', t.quarter, ' ', p.street_number)) AS addr
SELECT a.id, a.name, a.member_id, m.name AS member_name,
a.account_attribute_id
FROM accounts a
JOIN members m ON
a.member_id=m.id
$cond_origin
JOIN address_points p ON m.address_point_id=p.id
JOIN towns t ON t.id=p.town_id $where
JOIN members m ON a.member_id=m.id $cond_origin
$where
ORDER BY a.name
");
}
......
}
$grouped_accounts[$index][$account->id] = $account->name
. ' ' . $account->id . ' (' . $account->addr . ')';
. ' (' . $account->id . ', '
. $account->account_attribute_id . ', '
. $account->member_id . ')';
}
// done

Také k dispozici: Unified diff