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