-
app/Models/AccountType.php
Open in GitHubuse Illuminate\Database\Eloquent\Model; class AccountType extends Model { public const DEFAULT = 'Default account'; public const CASH = 'Cash account'; public const ASSET = 'Asset account'; public const EXPENSE = 'Expense account'; public const REVENUE = 'Revenue account'; public const INITIAL_BALANCE = 'Initial balance account'; public const BENEFICIARY = 'Beneficiary account'; public const IMPORT = 'Import account'; public const RECONCILIATION = 'Reconciliation account'; public const LOAN = 'Loan'; public const DEBT = 'Debt'; public const MORTGAGE = 'Mortgage'; public const CREDITCARD = 'Credit card'; public const LIABILITY_CREDIT = 'Liability credit account'; // }
-
app/Api/V1/Controllers/Chart/AccountController.php
Open in GitHubuse FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Models\AccountType; use Illuminate\Http\JsonResponse; class AccountController extends Controller { // public function overview(DateRequest $request): JsonResponse { // $defaultSet = $this->repository->getAccountsByType([AccountType::ASSET])->pluck('id')->toArray(); $frontPage = app('preferences')->get('frontPageAccounts', $defaultSet); $default = app('amount')->getDefaultCurrency(); // } // }