Eloquent IFRS is a package by Edward Mungai that provides “double-entry accounting with a focus on International Financial Reporting Standards (IFRS) compliant reporting.”
According to the documentation’s introduction, this package can help you generate compliant reports:
The Eloquent IFRS package gives any Laravel application or Lumen API the ability to generate a comprehensive set of financial reports by providing an embedded double-entry bookkeeping system.
The Accounting objects are created with a consistent and fluent interface, allowing seamless integration with the Business objects of the parent application.
Here’s a high-level example from the readme, which demonstrates some of the models:
1use IFRS\Models\Account;2use IFRS\models\LineItem;34$bankAccount = new Account([5 'name' => "Sales Account",6 'account_type' => Account::BANK,7])->save();89// Intermediate save does not record the transaction in the Ledger10$cashSale = new CashSale([11 'account_id' => $bankAccount->id,12 'date' => Carbon::now(),13 'narration' => "Example Cash Sale",14])->save();1516// This posts the Transaction to the Ledger17$cashSaleLineItem = new LineItem([18 'vat_id' => $outputVat->id,19 'account_id' => $revenueAccount->id,20 'vat_account_id' => $salesVatAccount->id,21 'description' => "Example Cash Sale Line Item",22 'quantity' => 1,23 'amount' => 100,24])->save();2526$cashSale->addLineItem($cashSaleLineItem);27$cashSale->post();
Here’s an example of an income report (profit and loss):
1use IFRS\Reports\IncomeStatement;23$incomeStatement = new IncomeStatement(4 "2020-01-01", // Report start date5 "2020-12-31", // Report end date6)->getSections();// Fetch balances from the ledger and store them internally78/**9* this function is only for demonstration and10* debugging use and should never be called in production11*/12dd($incomeStatement->toString());1314Example Company15Income Statement16For the Period: Jan 01 2020 to Dec 31 20201718Operating Revenues19 Operating Revenue 200 (100 cash sales + 100 credit sales)2021Operating Expenses22 Operating Expense 100 (cash purchase)23 ---------------24Operations Gross Profit 1002526Non Operating Revenues27 Non Operating Revenue 028 ---------------29Total Revenue 1003031Non Operating Expenses32 Direct Expense 033 Overhead Expense 034 Other Expense 035 ---------------36Total Expenses 037 ---------------38Net Profit 10039 ===============
All of the above examples come from the project readme, and is only a sample of what the package provides. The details of the package (and IFRS reporting) are quite intricate, and you should consult the full documentation.
I find this package unique because it’s created by a “finance guy turned developer.” It’s fantastic to see professionals in other industries turn to Laravel to develop ideas.
You can learn more about this package, get full installation instructions, and view the source code on GitHub at ekmungai/eloquent-ifrs.