mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 19:37:32 -05:00 
			
		
		
		
	Fix for retrieving quote PDF
This commit is contained in:
		
							parent
							
								
									c18c9e5a66
								
							
						
					
					
						commit
						a6121295c2
					
				@ -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) {
 | 
			
		||||
 | 
			
		||||
@ -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';
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user