Make sure the convert controller works again.

This commit is contained in:
James Cole
2019-07-05 19:43:16 +02:00
parent 3c5c14ff5a
commit 7fd3f77c3e
17 changed files with 703 additions and 275 deletions

View File

@@ -127,9 +127,6 @@ class AccountValidator
case TransactionType::RECONCILIATION:
$result = $this->validateReconciliationDestination($destinationId);
break;
//case TransactionType::OPENING_BALANCE:
//case TransactionType::RECONCILIATION:
// die(sprintf('Cannot handle type "%s"', $this->transactionType));
}
return $result;
@@ -479,8 +476,8 @@ class AccountValidator
return false;
}
$this->destination = $search;
return true;
// must not be the same as the source account
return !(null !== $this->source && $this->source->id === $this->destination->id);
}
/**

View File

@@ -22,6 +22,7 @@ declare(strict_types=1);
namespace FireflyIII\Validation;
use Carbon\Carbon;
use Config;
use DB;
use FireflyIII\Models\Account;