prevent history creation after invoice/bill delete
This commit is contained in:
		@@ -26,12 +26,16 @@ class DeleteInvoice extends Job
 | 
			
		||||
     */
 | 
			
		||||
    public function handle()
 | 
			
		||||
    {
 | 
			
		||||
        session(['deleting_invoice' => true]);
 | 
			
		||||
 | 
			
		||||
        $this->deleteRelationships($this->invoice, [
 | 
			
		||||
            'items', 'item_taxes', 'histories', 'transactions', 'recurring', 'totals'
 | 
			
		||||
        ]);
 | 
			
		||||
 | 
			
		||||
        $this->invoice->delete();
 | 
			
		||||
 | 
			
		||||
        session()->forget('deleting_invoice');
 | 
			
		||||
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user