diff --git a/app/Models/Expense.php b/app/Models/Expense.php index f5cb229fea24..3fe5e1b071bc 100644 --- a/app/Models/Expense.php +++ b/app/Models/Expense.php @@ -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; + } } /**