1. Go to this page and download the library: Download ezesha/end-year-reports library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ezesha / end-year-reports example snippets
namespace App\Reports;
use Ezesha\EndYearReports\DataProviders\FinancialDataProviderInterface;
class LedgerDataProvider implements FinancialDataProviderInterface
{
public function getPackage(int $officeId, string $closureDate): array
{
// Query your ledger for this office / period and return:
return [
'trial_balance' => [ /* accounts, totals */ ],
'income_statement' => [ /* revenues, expenses, ... */ ],
'balance_sheet' => [ /* assets, liabilities, equity */ ],
];
}
}
public string $dataProvider = \App\Reports\LedgerDataProvider::class;