@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | 'manager' => [ |
44 | 44 | 'cols' => ['user:id', 'user_id', 'currency_id', 'amount'], |
45 | 45 | 'sortable' => ['user:id', 'user_id', 'currency_id', 'amount'], |
46 | - 'filters' => [ 'currency_id'], |
|
46 | + 'filters' => ['currency_id'], |
|
47 | 47 | ] |
48 | 48 | ]; |
49 | 49 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | $amount = (float) $amount; |
68 | 68 | $query = \App::$cur->db->newQuery(); |
69 | - $string = 'UPDATE ' . \App::$cur->db->table_prefix . $this->table() . ' SET `' . $this->colPrefix() . 'amount`=`' . $this->colPrefix() . 'amount`+' . $amount . ' where `' . $this->index() . '` = ' . $this->id; |
|
69 | + $string = 'UPDATE '.\App::$cur->db->table_prefix.$this->table().' SET `'.$this->colPrefix().'amount`=`'.$this->colPrefix().'amount`+'.$amount.' where `'.$this->index().'` = '.$this->id; |
|
70 | 70 | $query->query($string); |
71 | 71 | $history = new Wallet\History(); |
72 | 72 | $history->wallet_id = $this->pk(); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | { |
87 | 87 | switch ($this->currency->round_type) { |
88 | 88 | case 'floor': |
89 | - $dif = (float) ('1' . str_repeat('0', $this->currency->round_precision)); |
|
89 | + $dif = (float) ('1'.str_repeat('0', $this->currency->round_precision)); |
|
90 | 90 | return floor($this->amount * $dif) / $dif; |
91 | 91 | default : |
92 | 92 | return $this->amount; |