Various code cleanup.

This commit is contained in:
James Cole
2021-04-06 08:51:27 +02:00
parent d32446b171
commit 5ceef2e9c3
47 changed files with 161 additions and 557 deletions

View File

@@ -57,7 +57,7 @@ trait ValidatesAutoBudgetRequest
if ('' === $period) {
$validator->errors()->add('auto_budget_period', (string)trans('validation.auto_budget_period_mandatory'));
}
if (null !== $amount && null !== $currencyId && null !== $currencyCode && '' === $currencyCode && '' === $currencyId) {
if (null !== $amount && null !== $currencyId && null !== $currencyCode && '' === $currencyCode && 0 === $currencyId) {
$validator->errors()->add('auto_budget_amount', (string)trans('validation.require_currency_info'));
}
}