mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix missing account validation step.
This commit is contained in:
parent
1ef9b83180
commit
309d3e8e95
@ -130,11 +130,13 @@ trait WithdrawalValidation
|
||||
{
|
||||
$accountId = array_key_exists('id', $array) ? $array['id'] : null;
|
||||
$accountName = array_key_exists('name', $array) ? $array['name'] : null;
|
||||
$accountIban = array_key_exists('iban', $array) ? $array['iban'] : null;
|
||||
$accountNumber =array_key_exists('number', $array) ? $array['number'] : null;
|
||||
|
||||
Log::debug('Now in validateWithdrawalSource', $array);
|
||||
// source can be any of the following types.
|
||||
$validTypes = array_keys($this->combinations[$this->transactionType]);
|
||||
if (null === $accountId && null === $accountName && false === $this->canCreateTypes($validTypes)) {
|
||||
if (null === $accountId && null === $accountName && null === $accountNumber && null === $accountIban && false === $this->canCreateTypes($validTypes)) {
|
||||
// if both values are NULL we return false,
|
||||
// because the source of a withdrawal can't be created.
|
||||
$this->sourceError = (string)trans('validation.withdrawal_source_need_data');
|
||||
|
@ -90,7 +90,7 @@ trait TransactionValidation
|
||||
Log::error(sprintf('Transactions array is not countable, because its a %s', gettype($transactions)));
|
||||
return [];
|
||||
}
|
||||
Log::debug('Returning transactions.', $transactions);
|
||||
//Log::debug('Returning transactions.', $transactions);
|
||||
|
||||
return $transactions;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user