mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 08:17:32 -05:00 
			
		
		
		
	Merge pull request #6229 from turbo124/v5-develop
Autoarchive quotes on convert
This commit is contained in:
		
						commit
						a875aea736
					
				@ -120,7 +120,6 @@ class Handler extends ExceptionHandler
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // if(config('ninja.expanded_logging'))
 | 
					 | 
				
			||||||
        parent::report($exception);
 | 
					        parent::report($exception);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -190,6 +190,9 @@ class Import implements ShouldQueue
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        set_time_limit(0);
 | 
					        set_time_limit(0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        nlog("Starting Migration");
 | 
				
			||||||
 | 
					        nlog($this->user->email);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        auth()->login($this->user, false);
 | 
					        auth()->login($this->user, false);
 | 
				
			||||||
        auth()->user()->setCompany($this->company);
 | 
					        auth()->user()->setCompany($this->company);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -51,6 +51,11 @@ class QuoteService
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $this->quote->fresh();
 | 
					        $this->quote->fresh();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ($this->quote->client->getSetting('auto_archive_quote')) {
 | 
				
			||||||
 | 
					            $quote_repo = new QuoteRepository();
 | 
				
			||||||
 | 
					            $quote_repo->archive($this->quote);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $this;
 | 
					        return $this;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -129,10 +134,6 @@ class QuoteService
 | 
				
			|||||||
    public function convertToInvoice()
 | 
					    public function convertToInvoice()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //to prevent circular references we need to explicit call this here.
 | 
					 | 
				
			||||||
        // $mark_approved = new MarkApproved($this->quote->client);
 | 
					 | 
				
			||||||
        // $this->quote = $mark_approved->run($this->quote);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        $this->convert();
 | 
					        $this->convert();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $this->invoice->service()->createInvitations();
 | 
					        $this->invoice->service()->createInvitations();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user