Update model exchange rate if client currency differs from company
This commit is contained in:
parent
a33c781919
commit
6f95715917
1 changed files with 5 additions and 0 deletions
|
|
@ -202,6 +202,11 @@ class BaseRepository
|
|||
|
||||
/* Model now persisted, now lets do some child tasks */
|
||||
|
||||
/* If client currency differs from the company default currency, then insert the client exchange rate on the model.*/
|
||||
if($client->currency()->id != (int) $model->company->settings->currency_id)
|
||||
$model->exchange_rate = $client->currency()->exchange_rate;
|
||||
|
||||
/* Save any documents */
|
||||
if (array_key_exists('documents', $data))
|
||||
$this->saveDocuments($data['documents'], $model);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue