Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Ifrs Laravel Package

ekmungai/laravel-ifrs

Laravel IFRS brings double-entry accounting and IFRS-compliant financial reporting to Laravel apps. Manage chart of accounts, journal entries, ledgers, and trial balances, then generate balance sheets, income statements, and other audit-ready financial reports from clean data.

View on GitHub
Deep Wiki
Context7

Getting Started

This release targets Laravel 11–13 on PHP 8.2+, so confirm your app is on a supported runtime before anything else:

php -v                      # must be >= 8.2
composer require vendor/package:^6.0
php artisan vendor:publish --tag=package-migrations
php artisan migrate

If you published migrations in a previous major, re-check remove_vat_id_column — v6 changes the drop order (foreign key before column). On SQLite with Laravel 11+ the old ordering fails during the table rebuild, so either republish the migration or add a follow-up migration that drops the FK explicitly first.

Look first at the config file (chart of accounts / default currency / VAT settings) and the migrations, since the data model is the actual API surface here. The first meaningful use case is a single end-to-end posting:

  1. Seed or create your accounts and VAT rates.
  2. Create a journal/entry with LineItem records referencing those accounts.
  3. Generate a Trial Balance to confirm debits equal credits.

If that round-trip works, the rest of the package is variations on it.

Implementation Patterns

Chart of accounts as data, not code. Seed accounts in a seeder and reference them by a stable code/slug in your app rather than by ID, so re-seeding in test or staging environments doesn't break posting logic.

Wrap posting in a transaction with a service class. Line items, VAT rows and totals should be written atomically. A thin LedgerService::post() around the package models keeps controllers and jobs clean, and gives you one place to add validation (balanced entries, non-zero amounts, valid account types).

VAT as a first-class concern. Let the package's Vat models own the rate and computed amounts rather than calculating tax in your own code — otherwise your stored totals and the package's reports will drift. When a rate changes, create a new rate record instead of mutating an existing one, so historical entries keep their original rate.

Report generation as an explicit, cacheable step. Trial Balance, aging via AccountSchedule, and similar reports are read-side operations. Run them in a queued job or a scheduled command and persist the output if they're expensive, rather than calling them inside a request that also writes data.

Aging buckets around Carbon 3. Carbon 3's diffInDays() returns a signed float. Any bucket logic you write on top of AccountSchedule should normalise with (int) abs(...) or pass the absolute flag, otherwise an account due in the future can land in the "overdue 90+" bucket.

Testing against the package. Pin orchestra/testbench to the version matching your Laravel target (^9, ^10, ^11), and seed Faker in your own setUp/bootstrap if you assert on generated monetary values — a process-wide PRNG means amounts shift depending on test order. Better still, avoid asserting on factory-generated amounts at all; assert on amounts you set explicitly.

Gotchas and Tips

  • Zero-amount factories. v6 stopped LineItem and Vat factories generating zero amount/quantity/rate. If you copied factories into your app, do the same — zero-value lines produce zero-balance accounts that reports legitimately omit, and assertions on "account exists in report" then fail intermittently.
  • Reports omit zero balances by design. Don't treat a missing account in Trial Balance output as a bug until you've confirmed the net balance isn't zero.
  • SQLite migration ordering. Dropping a column that has a foreign key needs the FK dropped first on modern SQLite. If you're on an old published migration set, write your own corrective migration rather than editing an already-run file.
  • Carbon 3 signature change. Anything calling diffInDays() and comparing to an int needs review after the upgrade — floats and signs both changed. diffInDays($other, true) for absolute whole days.
  • Laravel 10 / PHP 8.1 drop is hard. This is a major bump, not a soft deprecation. Check transitive dev dependencies too — older collision, phpunit and laravel-ignition pins will block the upgrade in CI even if your app code is fine.
  • PHPUnit 10+ XML schema. If you mirror the package's phpunit.xml, the <source> element replaces <coverage> filters and several attributes were removed. Silent misconfiguration here means coverage or test-suite filters quietly stop applying.
  • Extension points. Prefer subclassing the package's service/report classes and binding them in a service provider over copying files; the migration and factory fixes in this release show those internals do change between majors.
  • Upgrade order. Bump PHP and Laravel, refresh dev dependencies, republish/verify migrations, then run your ledger integration tests before touching report assertions — the migration and aging changes fail in different layers, so isolating them shortens debugging considerably.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource