fixes
This commit is contained in:
@@ -105,8 +105,11 @@ class money_expense {
|
||||
//a paraméterül kapott nevet megpróbálja coach ID-ra alakítani
|
||||
//ha sikerül, akkor visszaadja a coach ID-t
|
||||
//egyébként beszúr egy újat, törölt stáusszal, majd visszatér annak az id-jával
|
||||
if ($sql->num_of_rows("select ua_id from user_coach where ua_name = '".$_ua_name."';")) {
|
||||
return $sql->single_variable("select ua_id from user_coach where ua_name = '".$_ua_name."';");
|
||||
if ($sql->num_of_rows("select ua_id from user_coach where ua_name = '".$_ua_name."' and ua_deleted = 0;")) {
|
||||
return $sql->single_variable("select ua_id from user_coach where ua_name = '".$_ua_name."' and ua_deleted = 0;");
|
||||
}
|
||||
elseif ($sql->num_of_rows("select ua_id from user_coach where ua_name = '".$_ua_name."' and ua_deleted = 1;")) {
|
||||
return $sql->single_variable("select ua_id from user_coach where ua_name = '".$_ua_name."' and ua_deleted = 1;");
|
||||
}
|
||||
else {
|
||||
return $sql->insert_into('user_coach', array('ua_name' => $_ua_name, 'ua_deleted' => 1));
|
||||
|
||||
@@ -504,6 +504,9 @@ class user_kid extends user_parent {
|
||||
if (isset($_de_obj_array[$i-1])) {
|
||||
$_de->set_de_balance($_de_obj_array[$i-1]->get_de_balance());
|
||||
}
|
||||
else {
|
||||
$_de->set_de_balance($balance);
|
||||
}
|
||||
if ($_de->get_de_type() == 'training') {
|
||||
//ha edzés, akkor -1200 levonás, kivéve, ha kedvezményes:
|
||||
//1-nél több edzés / nap
|
||||
@@ -541,7 +544,6 @@ class user_kid extends user_parent {
|
||||
//echo $_de->get_de_date() . " plussz " . $_de->get_de_money_deposit()->get_mod_sum() . "<br><br>";
|
||||
}
|
||||
}
|
||||
|
||||
if ($update) {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user