Minor update

Fixed a situation where the amount might not be displayed when ordering the server
This commit is contained in:
Sergei Solovev 2023-12-03 22:33:51 +03:00
parent 669866b59c
commit 880494ad85

View file

@ -355,7 +355,7 @@ class games
$sql->query('SELECT `' . $sel . '` FROM `users` WHERE `id`="' . $user['id'] . '" LIMIT 1');
$user = array_merge($user, $sql->get());
$sum = strpos($user[$sel], '%') ? $sum - $sum / 100 * $user[$sel] : $sum - $user[$sel];
$sum = strpos($user[$sel], '%') ? $sum - $sum / 100 * floatval($user[$sel]) : $sum - floatval($user[$sel]);
if ($sum < 0)
sys::outjs(array('e' => 'Ошибка: сумма за услугу неверна'));