money deposit list modification

This commit is contained in:
Ricsi
2017-02-07 23:17:38 +01:00
parent 805a5bc440
commit 796156e0fb
3 changed files with 9 additions and 4 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -30,7 +30,7 @@
{$mod->get_mod_user_kid()->get_uk_name()}
</td>
<td class="date">
{$mod->get_mod_date()}
{$mod->get_mod_date(true)}
</td>
<td class="sum">
{$mod->get_mod_sum()|number_format:0:'':' '} Ft