1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Autoarchive quotes on convert

This commit is contained in:
David Bomba 2021-07-08 11:48:11 +10:00
parent 57293ac816
commit 9fd3bff97d
3 changed files with 9 additions and 6 deletions

View File

@ -120,8 +120,7 @@ class Handler extends ExceptionHandler
}
}
// if(config('ninja.expanded_logging'))
parent::report($exception);
parent::report($exception);
}

View File

@ -190,6 +190,9 @@ class Import implements ShouldQueue
{
set_time_limit(0);
nlog("Starting Migration");
nlog($this->user->email);
auth()->login($this->user, false);
auth()->user()->setCompany($this->company);

View File

@ -51,6 +51,11 @@ class QuoteService
$this->quote->fresh();
if ($this->quote->client->getSetting('auto_archive_quote')) {
$quote_repo = new QuoteRepository();
$quote_repo->archive($this->quote);
}
return $this;
}
@ -129,10 +134,6 @@ class QuoteService
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->invoice->service()->createInvitations();