mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +00:00
Forgot the credit card type [skip ci]
This commit is contained in:
@@ -204,10 +204,11 @@ class TransactionFactory
|
|||||||
throw new FireflyException(sprintf('Source and destination account cannot be both of the type "%s"', $destinationType));
|
throw new FireflyException(sprintf('Source and destination account cannot be both of the type "%s"', $destinationType));
|
||||||
}
|
}
|
||||||
// source must be in this list AND dest must be in this list:
|
// source must be in this list AND dest must be in this list:
|
||||||
$list = [AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH, AccountType::DEBT, AccountType::MORTGAGE, AccountType::LOAN, AccountType::MORTGAGE];
|
$list = [AccountType::DEFAULT, AccountType::ASSET, AccountType::CREDITCARD, AccountType::CASH, AccountType::DEBT, AccountType::MORTGAGE,
|
||||||
|
AccountType::LOAN, AccountType::MORTGAGE];
|
||||||
if (
|
if (
|
||||||
!\in_array($sourceType, $list, true) &&
|
!\in_array($sourceType, $list, true)
|
||||||
!\in_array($destinationType, $list, true)) {
|
&& !\in_array($destinationType, $list, true)) {
|
||||||
throw new FireflyException(sprintf('At least one of the accounts must be an asset account (%s, %s).', $sourceType, $destinationType));
|
throw new FireflyException(sprintf('At least one of the accounts must be an asset account (%s, %s).', $sourceType, $destinationType));
|
||||||
}
|
}
|
||||||
// either of these must be asset or default account.
|
// either of these must be asset or default account.
|
||||||
|
Reference in New Issue
Block a user