Revize 612
Přidáno uživatelem Tomáš Dulík před více než 14 roky(ů)
freenetis/trunk/kohana/application/models/account.php | ||
---|---|---|
*/
|
||
public function get_some_doubleentry_account_names($origin=null)
|
||
{
|
||
if ($origin !== null) $cond_origin="AND a.id <> $origin ";
|
||
if ($origin !== null) {
|
||
$cond_origin="AND a.id <> $origin
|
||
AND (a.account_attribute_id = ".Account_attribute_Model::$credit."
|
||
OR a.account_attribute_id = ".Account_attribute_Model::$operating."
|
||
OR a.account_attribute_id = ".Account_attribute_Model::$project.")";
|
||
}
|
||
else $cond_origin="";
|
||
return self::$db->query("SELECT a.id, a.name, a.member_id,
|
||
return self::$db->query("SELECT a.id, a.name, a.member_id, 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
|
||
FROM accounts a
|
||
JOIN members m ON
|
||
a.member_id=m.id
|
||
AND (a.account_attribute_id = ".Account_attribute_Model::$credit."
|
||
OR a.account_attribute_id = ".Account_attribute_Model::$operating."
|
||
OR a.account_attribute_id = ".Account_attribute_Model::$project.")
|
||
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"
|
freenetis/trunk/kohana/application/controllers/transfers.php | ||
---|---|---|
foreach ($dst_accounts as $dst_account) { // convert the object into array (used for HTML select list)
|
||
$arr_dst_accounts[$dst_account->id] =
|
||
"$dst_account->name, $dst_account->addr - ".url_lang::lang('texts.Account ID')." $dst_account->id - "
|
||
.url_lang::lang('texts.Member ID')." $dst_account->member_id";
|
||
.url_lang::lang('texts.Member ID')." $dst_account->member_id - "
|
||
.url_lang::lang('texts.Account type'). " $dst_account->account_attribute_id";
|
||
}
|
||
asort($arr_dst_accounts);
|
||
if (!isset($origin_account)) // for transfer from any account, use the same array for origin account list
|
Také k dispozici: Unified diff
V ucetni osnove pridana moznost tvorit prevod mezi opravdu libovolnymi ucty (ne jen projektovymi nebo kreditnimi), k popisu uctu pridan typ