From bdd76b88896b663207b48bff4c20889b8b26cd9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B3th=20Rich=C3=A1rd?= Date: Mon, 5 Aug 2019 17:57:07 +0200 Subject: [PATCH] get formatted training price --- _class/class_training.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/_class/class_training.php b/_class/class_training.php index c7b607a..efea7c1 100644 --- a/_class/class_training.php +++ b/_class/class_training.php @@ -89,8 +89,13 @@ class training { return $this->tr_locked; } - public function get_tr_price() { - return $this->tr_price; + public function get_tr_price($formatted = false) { + if (!$formatted) { + return $this->tr_price; + } + else { + return number_format($this->tr_price, 0, ',', ' '); + } } public function get_tr_deleted() {