From 5d4b4260b1f970ee3bb6bb43885b4b47cc043f6f Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 11 Feb 2023 08:17:54 +1100 Subject: [PATCH] Fixes for quote triggered actions --- app/Services/Quote/TriggeredActions.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/Services/Quote/TriggeredActions.php b/app/Services/Quote/TriggeredActions.php index ee2c619c690a..ba44a3d34fb9 100644 --- a/app/Services/Quote/TriggeredActions.php +++ b/app/Services/Quote/TriggeredActions.php @@ -53,6 +53,24 @@ class TriggeredActions extends AbstractService $this->quote = $this->quote->service()->approveWithNoCoversion()->save(); } + if($this->request->has('save_default_footer') && $this->request->input('save_default_footer') == 'true') { + $company = $this->quote->company; + $settings = $company->settings; + $settings->quote_footer = $this->quote->footer; + $company->settings = $settings; + $company->save(); + } + + if($this->request->has('save_default_terms') && $this->request->input('save_default_terms') == 'true') { + $company = $this->quote->company; + $settings = $company->settings; + $settings->quote_terms = $this->quote->terms; + $company->settings = $settings; + $company->save(); + } + + + return $this->quote; }