Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Expand types.
James Cole5f127b7becdf
diff --git a/app/Models/AccountType.php b/app/Models/AccountType.phpindex 0b00a1bce4..40b9a872eb 100644--- a/app/Models/AccountType.php+++ b/app/Models/AccountType.php@@ -38,6 +38,8 @@ class AccountType extends Modelconst INITIAL_BALANCE = 'Initial balance account';const BENEFICIARY = 'Beneficiary account';const IMPORT = 'Import account';+ const RECONCILIATION = 'Reconciliation account';+ const LOAN = 'Loan';/*** The attributes that should be casted to native types.diff --git a/app/Models/TransactionType.php b/app/Models/TransactionType.phpindex a915e849a0..33f5dc58eb 100644--- a/app/Models/TransactionType.php+++ b/app/Models/TransactionType.php@@ -37,6 +37,7 @@ class TransactionType extends Modelconst DEPOSIT = 'Deposit';const TRANSFER = 'Transfer';const OPENING_BALANCE = 'Opening balance';+ const RECONCILIATION = 'Reconciliation';/*** The attributes that should be casted to native types.@@ -58,13 +59,13 @@ class TransactionType extends Modelpublic static function routeBinder(string $type){if (!auth()->check()) {- throw new NotFoundHttpException;+ throw new NotFoundHttpException();}$transactionType = self::where('type', ucfirst($type))->first();if (null !== $transactionType) {return $transactionType;}- throw new NotFoundHttpException;+ throw new NotFoundHttpException();}/**diff --git a/database/seeds/AccountTypeSeeder.php b/database/seeds/AccountTypeSeeder.phpindex 721dffaafb..9ebbbfa91d 100644--- a/database/seeds/AccountTypeSeeder.php+++ b/database/seeds/AccountTypeSeeder.php@@ -21,14 +21,15 @@ class AccountTypeSeeder extends Seeder{public function run(){- AccountType::create(['type' => 'Default account']);- AccountType::create(['type' => 'Cash account']);- AccountType::create(['type' => 'Asset account']);- AccountType::create(['type' => 'Expense account']);- AccountType::create(['type' => 'Revenue account']);- AccountType::create(['type' => 'Initial balance account']);- AccountType::create(['type' => 'Beneficiary account']);- AccountType::create(['type' => 'Import account']);- AccountType::create(['type' => 'Loan']);+ AccountType::create(['type' => AccountType::DEFAULT]);+ AccountType::create(['type' => AccountType::CASH]);+ AccountType::create(['type' => AccountType::ASSET]);+ AccountType::create(['type' => AccountType::EXPENSE]);+ AccountType::create(['type' => AccountType::REVENUE]);+ AccountType::create(['type' => AccountType::INITIAL_BALANCE]);+ AccountType::create(['type' => AccountType::BENEFICIARY]);+ AccountType::create(['type' => AccountType::IMPORT]);+ AccountType::create(['type' => AccountType::LOAN]);+ AccountType::create(['type' => AccountType::RECONCILIATION]);}}diff --git a/database/seeds/TransactionTypeSeeder.php b/database/seeds/TransactionTypeSeeder.phpindex af070ba825..c9d9cc37df 100644--- a/database/seeds/TransactionTypeSeeder.php+++ b/database/seeds/TransactionTypeSeeder.php@@ -25,5 +25,6 @@ class TransactionTypeSeeder extends SeederTransactionType::create(['type' => TransactionType::DEPOSIT]);TransactionType::create(['type' => TransactionType::TRANSFER]);TransactionType::create(['type' => TransactionType::OPENING_BALANCE]);+ TransactionType::create(['type' => TransactionType::RECONCILIATION]);}}