fix user bugs

This commit is contained in:
Tóth Richárd
2018-12-11 19:52:43 +01:00
parent 7a24fdee51
commit ddd2727ef2
2 changed files with 141 additions and 141 deletions

View File

@@ -531,17 +531,17 @@ class user_kid extends user_parent {
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
//8-nál több edzés / hónap
//10-nál több edzés / hónap
//első két alkalom egyike
//var_dump($_de);
//echo $_de->get_de_first_two() . '<br>';
//echo $_de->get_de_training_per_month() . '<br>';
//echo $_de->get_de_training_per_day() . '<br><br><br>';
if ($_de->get_de_first_two() > 0 || $_de->get_de_training_per_month() > 8 || $_de->get_de_training_per_day() > 1) {
if ($_de->get_de_first_two() > 0 || $_de->get_de_training_per_month() > 10 || $_de->get_de_training_per_day() > 1) {
//do nothing
$_de->set_de_transaction(0);
$_de->set_de_has_discount(true);
//TODO: ha van már havi 8+ akk ne nézze a duplázót!
//TODO: ha van már havi 10+ akk ne nézze a duplázót!
if ($_de->get_de_first_two() > 0) $_de->set_de_discount_id(1);
if ($_de->get_de_training_per_day() > 1) $_de->set_de_discount_id(3);
if ($_de->get_de_training_per_month() > 10) $_de->set_de_discount_id(2);