Extra content to fix recurrences.

This commit is contained in:
James Cole
2021-03-15 08:51:21 +01:00
parent 8d84dfb3aa
commit 1783f0beb1
5 changed files with 137 additions and 29 deletions

View File

@@ -138,7 +138,9 @@ trait RecurringTransactionTrait
if (!$validator->validateDestination($destination->id, null, null)) {
throw new FireflyException(sprintf('Destination invalid: %s', $validator->destError)); // @codeCoverageIgnore
}
if(array_key_exists('foreign_amount', $array) && '' === (string)$array['foreign_amount']) {
unset($array['foreign_amount']);
}
// TODO typeOverrule: the account validator may have another opinion on the transaction type.
$transaction = new RecurrenceTransaction(
[