applied new features of money package

This commit is contained in:
Denis Duliçi
2023-07-11 12:03:14 +03:00
parent 20e5b57562
commit bfb37c62c6
51 changed files with 110 additions and 105 deletions

View File

@@ -71,7 +71,7 @@ class MatchBankingDocumentTransaction extends Job
$error_amount = round($converted_amount, $precision);
}
$message = trans('messages.error.over_match', ['type' => ucfirst($this->model->type), 'amount' => money($error_amount, $code, true)]);
$message = trans('messages.error.over_match', ['type' => ucfirst($this->model->type), 'amount' => money($error_amount, $code)]);
throw new \Exception($message);
} else {
@@ -83,7 +83,7 @@ class MatchBankingDocumentTransaction extends Job
protected function createHistory(): void
{
$history_desc = money((double) $this->transaction->amount, (string) $this->transaction->currency_code, true)->format() . ' ' . trans_choice('general.payments', 1);
$history_desc = money((double) $this->transaction->amount, (string) $this->transaction->currency_code)->format() . ' ' . trans_choice('general.payments', 1);
$this->dispatch(new CreateDocumentHistory($this->model, 0, $history_desc));
}