Skip to content

Firefly III: a personal finances manager

Add invalid transaction type.

James Coleaec70cf6a05e
diff --git a/app/Models/TransactionType.php b/app/Models/TransactionType.php
index 1d159ca24a..7f3f9f5c23 100644
--- a/app/Models/TransactionType.php
+++ b/app/Models/TransactionType.php
@@ -57,39 +57,20 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class TransactionType extends Model
{
use SoftDeletes;
-
- /**
- *
- */
public const WITHDRAWAL = 'Withdrawal';
- /**
- *
- */
public const DEPOSIT = 'Deposit';
- /**
- *
- */
public const TRANSFER = 'Transfer';
- /**
- *
- */
public const OPENING_BALANCE = 'Opening balance';
- /**
- *
- */
public const RECONCILIATION = 'Reconciliation';
- /**
- * The attributes that should be casted to native types.
- *
- * @var array
- */
+ public const INVALID = 'Invalid';
+ /** @var string[] */
protected $casts
= [
'created_at' => 'datetime',
'updated_at' => 'datetime',
'deleted_at' => 'datetime',
];
- /** @var array Fields that can be filled */
+ /** @var string[] */
protected $fillable = ['type'];
/**
diff --git a/database/seeders/TransactionTypeSeeder.php b/database/seeders/TransactionTypeSeeder.php
index 412246a673..97eb6c19d0 100644
--- a/database/seeders/TransactionTypeSeeder.php
+++ b/database/seeders/TransactionTypeSeeder.php
@@ -39,6 +39,7 @@ class TransactionTypeSeeder extends Seeder
TransactionType::TRANSFER,
TransactionType::OPENING_BALANCE,
TransactionType::RECONCILIATION,
+ TransactionType::INVALID
];
foreach ($types as $type) {