close #2292 Fixed: Unable to change the customer of a duplicated invoice

This commit is contained in:
Cüneyt Şentürk
2021-11-08 10:46:26 +03:00
parent d9d0e09e3a
commit 9ddbeddd2b
2 changed files with 6 additions and 2 deletions

View File

@ -71,6 +71,10 @@ class SelectContactCard extends Component
{
if (empty($this->contacts)) {
$this->contacts = Contact::{$this->type}()->enabled()->orderBy('name')->take(setting('default.select_limit'))->get();
if (!empty($this->contact) && (!$this->contacts->contains('id', $contact->id))) {
$this->contacts->push($this->contact);
}
}
if (empty($this->searchRoute)) {