Make sure import errors end up where the user can read them.

This commit is contained in:
James Cole
2016-08-13 16:29:24 +02:00
parent ef876a165a
commit 3d63903128
3 changed files with 11 additions and 6 deletions

View File

@@ -102,6 +102,7 @@ class ImportValidator
{
if ($entry->fields['amount'] == 0) {
$entry->valid = false;
$entry->errors->push('Amount of transaction is zero, cannot handle.');
Log::warning('Amount of transaction is zero, cannot handle.');
return $entry;
@@ -383,6 +384,7 @@ class ImportValidator
}
Log::warning(sprintf('Opposing account is of type %s, cannot handle this.', $type));
$entry->valid = false;
$entry->errors->push(sprintf('Opposing account is of type %s, cannot handle this.', $type));
return $entry;
}