1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for deleted invoices showing in portal

This commit is contained in:
David Bomba 2021-10-08 21:23:51 +11:00
parent a303e9bf95
commit ff50c6413f

View File

@ -75,7 +75,10 @@ class InvitationController extends Controller
$entity_obj = 'App\Models\\'.ucfirst(Str::camel($entity)).'Invitation';
$invitation = $entity_obj::whereRaw('BINARY `key`= ?', [$invitation_key])
$invitation = $entity_obj::where('key', $invitation_key)
->whereHas($entity, function ($query) {
$query->where('is_deleted',0);
})
->with('contact.client')
->firstOrFail();