parent view hotfix
This commit is contained in:
@@ -545,6 +545,8 @@ class user_kid extends user_parent {
|
||||
//ha user_obj null, akkor az aktuális usernél állítja be
|
||||
global $sql;
|
||||
|
||||
$actualExpireDate = '2100-01-01';
|
||||
|
||||
//kezdetben 0
|
||||
if (is_object($_user_obj)) {
|
||||
if (null == $_user_obj->get_uk_balance_transfer()) {
|
||||
@@ -570,6 +572,11 @@ class user_kid extends user_parent {
|
||||
else {
|
||||
$_de->set_de_balance($balance);
|
||||
}
|
||||
|
||||
if ($_de->get_de_date() > $actualExpireDate) {
|
||||
$_de->set_de_balance(0);
|
||||
}
|
||||
|
||||
if ($_de->get_de_type() == 'training') {
|
||||
|
||||
//$balance -= 1200;
|
||||
@@ -586,15 +593,18 @@ class user_kid extends user_parent {
|
||||
|
||||
}
|
||||
elseif ($_de->get_de_type() == 'money_deposit') {
|
||||
$actualExpireDate = $_de->get_de_money_deposit()->get_mod_expire_date();
|
||||
$_de->set_de_transaction($_de->get_de_money_deposit()->get_mod_money_income()->get_mi_sum());
|
||||
if (!$_de->get_de_expired()) {
|
||||
if (!$_de->get_de_expired() || !$update) {
|
||||
$_de->set_de_balance($_de->get_de_balance()+$_de->get_de_transaction());
|
||||
} else {
|
||||
} elseif($update) {
|
||||
$_de->set_de_balance(0);
|
||||
}
|
||||
//$balance += $_de->get_de_money_deposit()->get_mod_sum();
|
||||
//echo $_de->get_de_date() . " plussz " . $_de->get_de_money_deposit()->get_mod_sum() . "<br><br>";
|
||||
}
|
||||
|
||||
//var_dump('balance: '.$_de->get_de_balance());
|
||||
}
|
||||
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);
|
||||
@@ -658,7 +668,6 @@ class user_kid extends user_parent {
|
||||
";
|
||||
|
||||
$action_assoc_array = $sql->assoc_array($action_list_query);
|
||||
var_dump($action_assoc_array);
|
||||
$actions = array();
|
||||
$de_array = array();
|
||||
foreach ($action_assoc_array as $action) {
|
||||
|
||||
Reference in New Issue
Block a user