mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-02 12:27:04 +00:00
Expand types.
This commit is contained in:
@@ -38,6 +38,8 @@ class AccountType extends Model
|
||||
const 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.
|
||||
|
||||
@@ -37,6 +37,7 @@ class TransactionType extends Model
|
||||
const 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 Model
|
||||
public 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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user