diff --git a/app/Http/Controllers/ClientPortal/InvitationController.php b/app/Http/Controllers/ClientPortal/InvitationController.php index df6b73d50520..c8ae1a00cec4 100644 --- a/app/Http/Controllers/ClientPortal/InvitationController.php +++ b/app/Http/Controllers/ClientPortal/InvitationController.php @@ -47,10 +47,15 @@ class InvitationController extends Controller $entity_obj = 'App\Models\\'.ucfirst(Str::camel($entity)).'Invitation'; +nlog($entity); +nlog($entity_obj); + $invitation = $entity_obj::whereRaw('BINARY `key`= ?', [$invitation_key]) ->with('contact.client') ->firstOrFail(); +nlog($invitation->getLink()); + /* Return early if we have the correct client_hash embedded */ if (request()->has('client_hash') && request()->input('client_hash') == $invitation->contact->client->client_hash) { diff --git a/app/Services/Quote/GetQuotePdf.php b/app/Services/Quote/GetQuotePdf.php index cad03cf3e250..63eb15ef5dca 100644 --- a/app/Services/Quote/GetQuotePdf.php +++ b/app/Services/Quote/GetQuotePdf.php @@ -34,7 +34,7 @@ class GetQuotePdf extends AbstractService $invitation = $this->quote->invitations->where('client_contact_id', $this->contact->id)->first(); - $path = $this->quote->client->invoice_filepath(); + $path = $this->quote->client->quote_filepath(); $file_path = $path.$this->quote->number.'.pdf'; diff --git a/app/Services/Quote/QuoteService.php b/app/Services/Quote/QuoteService.php index ea17b3deb875..65eb440ec5cd 100644 --- a/app/Services/Quote/QuoteService.php +++ b/app/Services/Quote/QuoteService.php @@ -96,9 +96,7 @@ class QuoteService public function markSent() :self { - $mark_sent = new MarkSent($this->quote->client, $this->quote); - - $this->quote = $mark_sent->run(); + $this->quote = (new MarkSent($this->quote->client, $this->quote))->run(); return $this; }