balance list can be sorted. balanace can be updated
This commit is contained in:
@@ -1,17 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
# HA NINCS ID, AKKOR EGYENLEGLISTA
|
# HA NINCS ID, AKKOR EGYENLEGLISTA
|
||||||
# HA VAN ID, AKKOR EMPTY
|
# HA VAN ID, AKKOR RENDEZÉS IS VAN
|
||||||
|
|
||||||
if ($this->is_id()) {
|
if ($this->is_id()) {
|
||||||
# EMPTY
|
# RENDEZÉS
|
||||||
|
|
||||||
|
/*
|
||||||
|
1 - egyenleg szerint növekvő
|
||||||
|
*/
|
||||||
|
|
||||||
|
$order_by = 'uk_balance ASC';
|
||||||
|
$url_postfix = '/' . $this->get_id();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# EGYENLEG LISTA
|
# EGYENLEG LISTA
|
||||||
|
$order_by = 'uk_name ASC';
|
||||||
|
$url_postfix = '';
|
||||||
|
|
||||||
$active_kid_assoc_array = $sql->assoc_array('select * from user_kid where uk_deleted = 0 and uk_is_active = 1 order by uk_name asc;');
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$active_kid_assoc_array = $sql->assoc_array('select * from user_kid where uk_deleted = 0 and uk_is_active = 1 order by '. $order_by .';');
|
||||||
$user_kids = array();
|
$user_kids = array();
|
||||||
foreach ($active_kid_assoc_array as $kid) {
|
foreach ($active_kid_assoc_array as $kid) {
|
||||||
$new_kid = new user_kid();
|
$new_kid = new user_kid();
|
||||||
@@ -20,8 +31,7 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$smarty->assign('user_kids', $user_kids);
|
$smarty->assign('user_kids', $user_kids);
|
||||||
|
$smarty->assign('url_postfix', $url_postfix);
|
||||||
$smarty->display('user_balance_list.tpl');
|
$smarty->display('user_balance_list.tpl');
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -143,4 +143,6 @@ order by object_date ASC;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header('Location: /admin/balance_list' . ($this->is_id()?'/'.$this->get_id():''));
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,3 +1,11 @@
|
|||||||
|
<div class="buttons">
|
||||||
|
|
||||||
|
<a href="/admin/balance_list" class="addbutton big">Név szerinti rendezés</a>
|
||||||
|
<a href="/admin/balance_list/1" class="addbutton big">Egyenleg szerinti rendezés</a>
|
||||||
|
<a href="/admin/money_update{$url_postfix}" class="addbutton add-big">Egyenleg frissítése</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="list">
|
<div class="list">
|
||||||
{foreach $user_kids as $user}
|
{foreach $user_kids as $user}
|
||||||
<a href="#">
|
<a href="#">
|
||||||
|
|||||||
Reference in New Issue
Block a user