mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Add invalid transaction type.
This commit is contained in:
@@ -57,39 +57,20 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
|||||||
class TransactionType extends Model
|
class TransactionType extends Model
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public const WITHDRAWAL = 'Withdrawal';
|
public const WITHDRAWAL = 'Withdrawal';
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public const DEPOSIT = 'Deposit';
|
public const DEPOSIT = 'Deposit';
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public const TRANSFER = 'Transfer';
|
public const TRANSFER = 'Transfer';
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public const OPENING_BALANCE = 'Opening balance';
|
public const OPENING_BALANCE = 'Opening balance';
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public const RECONCILIATION = 'Reconciliation';
|
public const RECONCILIATION = 'Reconciliation';
|
||||||
/**
|
public const INVALID = 'Invalid';
|
||||||
* The attributes that should be casted to native types.
|
/** @var string[] */
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $casts
|
protected $casts
|
||||||
= [
|
= [
|
||||||
'created_at' => 'datetime',
|
'created_at' => 'datetime',
|
||||||
'updated_at' => 'datetime',
|
'updated_at' => 'datetime',
|
||||||
'deleted_at' => 'datetime',
|
'deleted_at' => 'datetime',
|
||||||
];
|
];
|
||||||
/** @var array Fields that can be filled */
|
/** @var string[] */
|
||||||
protected $fillable = ['type'];
|
protected $fillable = ['type'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -39,6 +39,7 @@ class TransactionTypeSeeder extends Seeder
|
|||||||
TransactionType::TRANSFER,
|
TransactionType::TRANSFER,
|
||||||
TransactionType::OPENING_BALANCE,
|
TransactionType::OPENING_BALANCE,
|
||||||
TransactionType::RECONCILIATION,
|
TransactionType::RECONCILIATION,
|
||||||
|
TransactionType::INVALID
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
|
Reference in New Issue
Block a user