From 1d6f2bd03a92f7bf8a8da71346605c5c11e39a1f Mon Sep 17 00:00:00 2001 From: Ricsi Date: Sat, 18 Feb 2017 10:05:38 +0100 Subject: [PATCH] balance update bug fix (balance NULL case) --- _class/class_user_kid.php | 1 + _include/include_balance_list.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/_class/class_user_kid.php b/_class/class_user_kid.php index d82a276..6611a4a 100644 --- a/_class/class_user_kid.php +++ b/_class/class_user_kid.php @@ -504,6 +504,7 @@ class user_kid extends user_parent { if (isset($_de)) $sql->update_table('user_kid', (array('uk_balance' => $_de->get_de_balance())), array('uk_id' => (is_object($_user_obj)?$_user_obj->get_uk_id():$this->get_uk_id())), false); + else $sql->update_table('user_kid', (array('uk_balance' => 0)), array('uk_id' => (is_object($_user_obj)?$_user_obj->get_uk_id():$this->get_uk_id())), false); return $_de_obj_array; } diff --git a/_include/include_balance_list.php b/_include/include_balance_list.php index c90b4d2..787feb2 100644 --- a/_include/include_balance_list.php +++ b/_include/include_balance_list.php @@ -10,7 +10,7 @@ if ($this->is_id()) { 1 - egyenleg szerint növekvő */ - $order_by = 'uk_balance ASC'; + $order_by = 'uk_balance ASC, uk_name ASC'; $url_postfix = '/' . $this->get_id(); }