From cf3140f03250219552630522d67cd60949b4cff7 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 17 Mar 2022 15:48:50 +1100 Subject: [PATCH] Minor fixes for quote approvals --- VERSION.txt | 2 +- app/Services/Quote/QuoteService.php | 6 ++++++ config/ninja.php | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 6d00630e87c6..b2c42b050e6c 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.3.69 \ No newline at end of file +5.3.70 \ No newline at end of file diff --git a/app/Services/Quote/QuoteService.php b/app/Services/Quote/QuoteService.php index 960fce39fe5c..f04eb8444739 100644 --- a/app/Services/Quote/QuoteService.php +++ b/app/Services/Quote/QuoteService.php @@ -131,6 +131,12 @@ class QuoteService { $this->setStatus(Quote::STATUS_APPROVED)->save(); + if (!$contact) { + $contact = $this->quote->invitations->first()->contact; + } + + event(new QuoteWasApproved($contact, $this->quote, $this->quote->company, Ninja::eventVars())); + return $this; } diff --git a/config/ninja.php b/config/ninja.php index c611199a9549..cc95a2475b6f 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -14,8 +14,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => '5.3.69', - 'app_tag' => '5.3.69', + 'app_version' => '5.3.70', + 'app_tag' => '5.3.70', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''),