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);
|
||||
|
||||
@@ -44,9 +44,9 @@ if ($this->is_id()) {
|
||||
FROM `presence`
|
||||
JOIN user_kid ON uk_id = pr_user_kid_uk_id
|
||||
JOIN training ON tr_id = pr_training_tr_id
|
||||
WHERE `pr_training_tr_id`
|
||||
IN ( " . implode(',', $tr_ids) . " )
|
||||
AND `uk_deleted` = 0
|
||||
WHERE `pr_training_tr_id`".
|
||||
(!empty($tr_ids)?"IN ( " . implode(',', $tr_ids) . " ) ":" ")
|
||||
."AND `uk_deleted` = 0
|
||||
AND `tr_deleted` = 0
|
||||
AND `uk_is_active` = 1
|
||||
GROUP BY `pr_user_kid_uk_id`
|
||||
@@ -71,7 +71,7 @@ if ($this->is_id()) {
|
||||
}
|
||||
|
||||
if (!empty($exeptions)) $rest_user_query = "SELECT * FROM user_kid WHERE uk_id NOT IN (" . implode(',', $exeptions) . ") AND uk_deleted = 0 AND uk_is_active = 1 ORDER BY uk_name ASC;"; //ha vannak kiemelt userek
|
||||
else $rest_user_query = "SELECT * FROM user_kid WHERE uk_deleted = 0 ORDER BY uk_name;"; //ha nincsenek kiemelt userek
|
||||
else $rest_user_query = "SELECT * FROM user_kid WHERE uk_deleted = 0 AND uk_is_active = 1 ORDER BY uk_name;"; //ha nincsenek kiemelt userek
|
||||
$rest_user_assoc_array = $sql->assoc_array($rest_user_query);
|
||||
foreach ($rest_user_assoc_array as $rest_user) {
|
||||
$user = new user_kid();
|
||||
|
||||
@@ -38,6 +38,10 @@ if ($this->is_id()) {
|
||||
header('Location: /admin/' . $new_setting->get_setv_varchar());
|
||||
}
|
||||
|
||||
elseif ($new_setting->get_setv_setting()->get_set_setting_type_st_id() == 4) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$smarty->assign("setting", $new_setting);
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
<div class="list">
|
||||
|
||||
{if count($actions) == 0}
|
||||
<div class="row">
|
||||
<div class="list_item line_height14 bigger_space money_deposit">
|
||||
Áthozat: <span class="bold">{$balance_transfer} Ft</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{foreach $actions as $action}
|
||||
|
||||
{if $action->get_de_training()|is_a:'training'}
|
||||
@@ -61,7 +70,7 @@
|
||||
{if $action->get_de_discount_id() == 1}
|
||||
{assign var="discount" value="Próba kedvezmény"}
|
||||
{elseif $action->get_de_discount_id() == 2}
|
||||
{assign var="discount" value="Havi 8+ kedvezmény"}
|
||||
{assign var="discount" value="Havi 10+ kedvezmény"}
|
||||
{elseif $action->get_de_discount_id() == 3}
|
||||
{assign var="discount" value="Duplázó kedvezmény"}
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user