From b28d76d491e06d138a157ac261ee67c72e9f62d3 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 1 Oct 2021 08:55:35 +1000 Subject: [PATCH] Minor fixes --- app/Http/Controllers/CompanyController.php | 2 +- app/Http/Controllers/SubdomainController.php | 1 + app/Models/Account.php | 2 +- app/Services/Quote/TriggeredActions.php | 4 ++++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/CompanyController.php b/app/Http/Controllers/CompanyController.php index c40b349d5b..5ac5ed157a 100644 --- a/app/Http/Controllers/CompanyController.php +++ b/app/Http/Controllers/CompanyController.php @@ -500,7 +500,7 @@ class CompanyController extends BaseController $account->delete(); if(Ninja::isHosted()) - \Modules\Admin\Jobs\Account\NinjaDeletedAccount::dispatch($account_key); + \Modules\Admin\Jobs\Account\NinjaDeletedAccount::dispatch($account_key, $request->all()); LightLogs::create(new AccountDeleted()) ->increment() diff --git a/app/Http/Controllers/SubdomainController.php b/app/Http/Controllers/SubdomainController.php index 6a25f79560..153c12b91d 100644 --- a/app/Http/Controllers/SubdomainController.php +++ b/app/Http/Controllers/SubdomainController.php @@ -30,6 +30,7 @@ class SubdomainController extends BaseController 'invoiceninja', 'cname', 'sandbox', + 'stage', ]; public function __construct() diff --git a/app/Models/Account.php b/app/Models/Account.php index d7a9f2d6ce..2884c6aca8 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -407,7 +407,7 @@ class Account extends BaseModel } } catch(\Exception $e){ - \Sentry\captureMessage("I encountered an error with email quotas - defaulting to SEND"); + \Sentry\captureMessage("I encountered an error with email quotas for account {$this->key} - defaulting to SEND"); } return false; diff --git a/app/Services/Quote/TriggeredActions.php b/app/Services/Quote/TriggeredActions.php index 055d2216df..e1ec9a37a0 100644 --- a/app/Services/Quote/TriggeredActions.php +++ b/app/Services/Quote/TriggeredActions.php @@ -45,6 +45,10 @@ class TriggeredActions extends AbstractService $this->quote = $this->quote->service()->markSent()->save(); } + if ($this->request->has('convert') && $this->request->input('convert') == 'true') { + $this->quote = $this->quote->service()->convert()->save(); + } + return $this->quote; }