custom training price

This commit is contained in:
Tóth Richárd
2019-07-25 12:22:15 +02:00
parent 161453e9b5
commit 2c663d7ed1
20 changed files with 266 additions and 156 deletions

View File

@@ -531,7 +531,9 @@ class user_kid extends user_parent {
if ($_de->get_de_type() == 'training') {
//$balance -= 1200;
$_de->set_de_transaction(-1000); //beállítjuk, mennyivel csökken az egyenleg
$training = $_de->get_de_training();
$trainingPrice = $training->get_tr_price();
$_de->set_de_transaction(-$trainingPrice); //beállítjuk, mennyivel csökken az egyenleg
if (0 == $i) {
$_de->set_de_balance($balance+$_de->get_de_transaction()); //beállítjuk az új egyenleget
}
@@ -588,7 +590,7 @@ class user_kid extends user_parent {
if(pr_training_tr_id is not null, 'training', null) as object_type
FROM
presence
JOIN training ON tr_id = pr_training_tr_id
JOIN training ON (tr_id = pr_training_tr_id AND tr_locked = 1)
WHERE
pr_user_kid_uk_id = ".$userId."
AND tr_deleted = 0) UNION (SELECT