mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-01 20:17:35 -04:00 
			
		
		
		
	Remove invoice deletion observer
This commit is contained in:
		
							parent
							
								
									4c9f6fcf8f
								
							
						
					
					
						commit
						0b8bf4fbf1
					
				| @ -38,7 +38,7 @@ use Illuminate\Support\Str; | ||||
| 
 | ||||
| /*Multi Mailer implemented*/ | ||||
| 
 | ||||
| class EmailEntity extends BaseMailerJob implements ShouldQueue | ||||
| class EmailEntity implements ShouldQueue | ||||
| { | ||||
|     use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; | ||||
| 
 | ||||
| @ -105,9 +105,6 @@ class EmailEntity extends BaseMailerJob implements ShouldQueue | ||||
|         /* Set DB */ | ||||
|         MultiDB::setDB($this->company->db); | ||||
| 
 | ||||
|         /* Set the correct mail driver */ | ||||
|         $this->setMailDriver(); | ||||
| 
 | ||||
|         $nmo = new NinjaMailerObject; | ||||
|         $nmo->mailable = new TemplateEmail($this->email_entity_builder,$this->invitation->contact); | ||||
|         $nmo->company = $this->company; | ||||
|  | ||||
| @ -52,7 +52,7 @@ class InvoiceObserver | ||||
|             WebhookHandler::dispatch(Webhook::EVENT_UPDATE_INVOICE, $invoice, $invoice->company); | ||||
|         } | ||||
|      | ||||
|         UnlinkFile::dispatchNow(config('filesystems.default'), $invoice->client->invoice_filepath() . $invoice->number.'.pdf'); | ||||
|         // UnlinkFile::dispatchNow(config('filesystems.default'), $invoice->client->invoice_filepath() . $invoice->number.'.pdf');
 | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -147,7 +147,7 @@ class ApplyPayment | ||||
|         event(new InvoiceWasUpdated($this->invoice, $this->invoice->company, Ninja::eventVars())); | ||||
| 
 | ||||
|         if ((int)$this->invoice->balance == 0) { | ||||
|             // $this->invoice->service()->deletePdf();
 | ||||
|             $this->invoice->service()->deletePdf(); | ||||
|             event(new InvoiceWasPaid($this->invoice, $payment, $this->payment->company, Ninja::eventVars())); | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @ -266,7 +266,7 @@ class InvoiceService | ||||
| 
 | ||||
|         //$this->invoice = $this->invoice->calc()->getInvoice();
 | ||||
| 
 | ||||
|         // $this->deletePdf();
 | ||||
|         $this->deletePdf(); | ||||
| 
 | ||||
|         return $this; | ||||
|     } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user