mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 00:17:34 -05:00 
			
		
		
		
	Changed PDF attachment to use private id
This commit is contained in:
		
							parent
							
								
									7662729570
								
							
						
					
					
						commit
						13994f98a8
					
				@ -25,7 +25,7 @@ class Mailer
 | 
			
		||||
                $invoice = Invoice::find($data['id']);
 | 
			
		||||
                $invoice->load('account');
 | 
			
		||||
                $accountAttributes = $invoice->account()->getParent()->getRelations()['account']->getAttributes();
 | 
			
		||||
                $pdfPath = storage_path().'/pdfcache/cache-'.$invoice->getAttributes()['public_id'].'.pdf';
 | 
			
		||||
                $pdfPath = storage_path().'/pdfcache/cache-'.$invoice->id.'.pdf';
 | 
			
		||||
                
 | 
			
		||||
                if($accountAttributes['pdf_email_attachment'] === 1 && file_exists($pdfPath)) {
 | 
			
		||||
                    $message->attach(
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user