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

FIxes for approve with no conversion from AP

This commit is contained in:
David Bomba 2022-04-26 08:51:14 +10:00
parent 290775040e
commit bc76424fd7
2 changed files with 6 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -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();
}