Improve expense display name
This commit is contained in:
parent
f49baa3e38
commit
02cfdf90eb
1 changed files with 7 additions and 1 deletions
|
|
@ -107,7 +107,13 @@ class Expense extends EntityModel
|
|||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->transaction_id ?: '#' . $this->public_id;
|
||||
if ($this->transaction_id) {
|
||||
return $this->transaction_id;
|
||||
} elseif ($this->public_notes) {
|
||||
return mb_strimwidth($this->public_notes, 0, 16, "...");
|
||||
} else {
|
||||
return '#' . $this->public_id;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue