mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Update various things. I know, great description.
This commit is contained in:
@@ -127,7 +127,7 @@ trait DepositValidation
|
||||
|
||||
// if there is an iban, it can only be in use by a valid source type, or we will fail.
|
||||
if (null !== $accountIban && '' !== $accountIban) {
|
||||
app('log')->debug('Check if there is not already an account with this IBAN');
|
||||
app('log')->debug('Check if there is not already another account with this IBAN');
|
||||
$existing = $this->findExistingAccount($validTypes, ['iban' => $accountIban], true);
|
||||
if (null !== $existing) {
|
||||
$this->sourceError = (string)trans('validation.deposit_src_iban_exists');
|
||||
|
||||
@@ -265,6 +265,7 @@ class AccountValidator
|
||||
* @param bool $inverse
|
||||
*
|
||||
* @return Account|null
|
||||
* @SuppressWarnings(PHPMD.BooleanArgumentFlag)
|
||||
*/
|
||||
protected function findExistingAccount(array $validTypes, array $data, bool $inverse = false): ?Account
|
||||
{
|
||||
|
||||
@@ -563,7 +563,7 @@ trait TransactionValidation
|
||||
return;
|
||||
}
|
||||
$transactions = $this->getTransactionsArray($validator);
|
||||
foreach ($transactions as $key => $value) {
|
||||
foreach (array_keys($transactions) as $key) {
|
||||
if (!is_int($key)) {
|
||||
$validator->errors()->add('transactions.0.description', (string)trans('validation.at_least_one_transaction'));
|
||||
app('log')->debug('Added error: at_least_one_transaction.');
|
||||
|
||||
Reference in New Issue
Block a user