mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Fix for restoring invoices
This commit is contained in:
parent
532197621b
commit
bf6044006d
@ -662,6 +662,13 @@ class InvoiceController extends BaseController
|
||||
case 'download':
|
||||
return response()->download(TempFile::path($invoice->pdf_file_path()), basename($invoice->pdf_file_path()));
|
||||
break;
|
||||
case 'restore':
|
||||
$this->invoice_repo->restore($invoice);
|
||||
|
||||
if (!$bulk) {
|
||||
return $this->listResponse($invoice);
|
||||
}
|
||||
break;
|
||||
case 'archive':
|
||||
$this->invoice_repo->archive($invoice);
|
||||
|
||||
|
@ -263,7 +263,7 @@ class BaseRepository
|
||||
//make sure we are creating an invite for a contact who belongs to the client only!
|
||||
$contact = ClientContact::find($invitation['client_contact_id']);
|
||||
|
||||
if ($model->client_id == $contact->client_id);
|
||||
if ($contact && $model->client_id == $contact->client_id);
|
||||
{
|
||||
$new_invitation = $invitation_factory_class::create($model->company_id, $model->user_id);
|
||||
$new_invitation->{$lcfirst_resource_id} = $model->id;
|
||||
|
Loading…
Reference in New Issue
Block a user