mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-11-27 07:15:30 -05:00
Merge pull request #957 from codedge/#949-Improve-activity-stream-invoices
Show client name next to invoice no. on dashboard
This commit is contained in:
commit
61d3adecff
@ -49,6 +49,13 @@ class Client extends EntityModel
|
|||||||
'website',
|
'website',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $appends = [
|
||||||
|
'display_name',
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
@ -331,6 +338,17 @@ class Client extends EntityModel
|
|||||||
return $contact->getDisplayName();
|
return $contact->getDisplayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Making the virtual property display_name accessible
|
||||||
|
* via an accessor
|
||||||
|
*
|
||||||
|
* @return mixed|string
|
||||||
|
*/
|
||||||
|
public function getDisplayNameAttribute()
|
||||||
|
{
|
||||||
|
return $this->getDisplayName();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -140,7 +140,9 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||||||
*/
|
*/
|
||||||
public function getDisplayName()
|
public function getDisplayName()
|
||||||
{
|
{
|
||||||
return $this->is_recurring ? trans('texts.recurring') : $this->invoice_number;
|
return $this->is_recurring
|
||||||
|
? trans('texts.recurring')
|
||||||
|
: $this->invoice_number.' ('.$this->client->display_name.')';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user