diff --git a/app/Http/Requests/Client/UpdateClientRequest.php b/app/Http/Requests/Client/UpdateClientRequest.php index ccc6af785c47..0d4661321278 100644 --- a/app/Http/Requests/Client/UpdateClientRequest.php +++ b/app/Http/Requests/Client/UpdateClientRequest.php @@ -158,7 +158,11 @@ class UpdateClientRequest extends Request unset($settings->{$key}); } - if($key == 'default_task_rate'){ + //26-04-2022 - In case settings are returned as array instead of object + if($key == 'default_task_rate' && is_array($settings)){ + $settings['default_task_rate'] = floatval($value); + } + elseif($key == 'default_task_rate' && is_object($settings)) { $settings->default_task_rate = floatval($value); } } diff --git a/app/Services/Quote/TriggeredActions.php b/app/Services/Quote/TriggeredActions.php index 3ee104670288..4b9fbe5fbff7 100644 --- a/app/Services/Quote/TriggeredActions.php +++ b/app/Services/Quote/TriggeredActions.php @@ -51,7 +51,7 @@ class TriggeredActions extends AbstractService } if ($this->request->has('approve') && $this->request->input('approve') == 'true' && in_array($this->quote->status_id, [Quote::STATUS_SENT, Quote::STATUS_DRAFT])) { - $this->quote = $this->quote->service()->convert()->save(); + $this->quote = $this->quote->service()->approveWithNoCoversion()->save(); }