Add some missing db integrity checks.

This commit is contained in:
James Cole
2022-05-07 19:45:26 +02:00
parent df5aff279e
commit 89af363ba1
2 changed files with 13 additions and 5 deletions

View File

@@ -606,7 +606,10 @@ return [
AccountType::RECONCILIATION => TransactionTypeModel::RECONCILIATION,
],
AccountType::CASH => [
AccountType::ASSET => TransactionTypeModel::DEPOSIT,
AccountType::ASSET => TransactionTypeModel::DEPOSIT,
AccountType::LOAN => TransactionTypeModel::DEPOSIT,
AccountType::DEBT => TransactionTypeModel::DEPOSIT,
AccountType::MORTGAGE => TransactionTypeModel::DEPOSIT,
],
AccountType::DEBT => [
AccountType::ASSET => TransactionTypeModel::DEPOSIT,
@@ -688,9 +691,10 @@ return [
AccountType::ASSET => [AccountType::RECONCILIATION],
],
TransactionTypeModel::LIABILITY_CREDIT => [
AccountType::LOAN => [AccountType::LIABILITY_CREDIT],
AccountType::DEBT => [AccountType::LIABILITY_CREDIT],
AccountType::MORTGAGE => [AccountType::LIABILITY_CREDIT],
AccountType::LOAN => [AccountType::LIABILITY_CREDIT],
AccountType::DEBT => [AccountType::LIABILITY_CREDIT],
AccountType::MORTGAGE => [AccountType::LIABILITY_CREDIT],
AccountType::LIABILITY_CREDIT => [AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE],
],
],
// if you add fields to this array, dont forget to update the export routine (ExportDataGenerator).