Fix amount thing.

This commit is contained in:
James Cole 2023-12-31 17:18:54 +01:00
parent a49cf1fd3d
commit 51ca8277bb
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
2 changed files with 3 additions and 3 deletions

View File

@ -92,8 +92,8 @@ class StoreRequest extends FormRequest
'transactions.*.foreign_currency_code' => 'min:3|max:51|exists:transaction_currencies,code|nullable',
// amount
'transactions.*.amount' => 'required|numeric|gt:0',
'transactions.*.foreign_amount' => 'numeric',
'transactions.*.amount' => 'required|numeric|gt:0|max:1000000000',
'transactions.*.foreign_amount' => 'numeric|max:1000000000',
// description
'transactions.*.description' => 'nullable|between:1,1000',

View File

@ -88,7 +88,7 @@ class BudgetRepository implements BudgetRepositoryInterface
$limitRepository = app(BudgetLimitRepository::class);
$limitRepository->setUser($this->user);
$budgets = $this->getActiveBudgets();
$defaultCurrency = Amount::getDefaultCurrencyByUser($this->user);
$defaultCurrency = app('amount')->getDefaultCurrency();
$converter = new ExchangeRateConverter();
/** @var Budget $budget */