Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

firefly-iii/firefly-iii

21505 stars
2 code files
View firefly-iii/firefly-iii on GitHub

app/Models/AccountType.php

Open in GitHub
use 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 GitHub
use 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();
//
}
//
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.