mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Improve expense display name
This commit is contained in:
parent
f49baa3e38
commit
02cfdf90eb
@ -107,7 +107,13 @@ class Expense extends EntityModel
|
|||||||
*/
|
*/
|
||||||
public function getName()
|
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…
x
Reference in New Issue
Block a user