diff --git a/_class/class_money_deposit.php b/_class/class_money_deposit.php index b05c3f4..a528407 100644 --- a/_class/class_money_deposit.php +++ b/_class/class_money_deposit.php @@ -48,8 +48,9 @@ class money_deposit { return $this->mod_user_kid; } - public function get_mod_date() { - return $this->mod_date; + + public function get_mod_date($_formatted = false) { + return !$_formatted ? $this->mod_date : date("Y. m. d.", strtotime($this->mod_date)); } public function get_mod_date_day() { @@ -58,6 +59,10 @@ class money_deposit { return date("d", strtotime($this->mod_date)); } + public function get_mod_date_day_of_week() { + return date("w", strtotime($this->mod_date)); + } + public function get_mod_sum($formatted = null) { if (!$formatted) { return $this->mod_sum; diff --git a/_include/include_money_deposit.php b/_include/include_money_deposit.php index 3748e50..e536380 100644 --- a/_include/include_money_deposit.php +++ b/_include/include_money_deposit.php @@ -29,7 +29,7 @@ if ($this->is_id()) { } else { # BEFIZETÉS LISTA - $mod_query = "SELECT * FROM money_deposit WHERE mod_deleted = 0 ORDER BY mod_date DESC;"; + $mod_query = "SELECT * FROM money_deposit WHERE mod_deleted = 0 ORDER BY mod_date DESC, mod_id DESC;"; $mod_array = array(); $mod_assoc_array = $sql->assoc_array($mod_query); diff --git a/template/templates/money_deposit.tpl b/template/templates/money_deposit.tpl index ae61e7c..133ec65 100644 --- a/template/templates/money_deposit.tpl +++ b/template/templates/money_deposit.tpl @@ -30,7 +30,7 @@ {$mod->get_mod_user_kid()->get_uk_name()} - {$mod->get_mod_date()} + {$mod->get_mod_date(true)} {$mod->get_mod_sum()|number_format:0:'':' '} Ft