Search by

damoscky / accounting-finance

Damoscky

A Laravel accounting and finance API module: sales, purchases, banking, journals, budgets, payroll and financial reporting.

dev-develop 2026-12-01 07:59 UTC

This package is auto-updated.

Last update: 2026-12-01 08:14:35 UTC


README

Latest Version on Packagist Total Downloads License

A drop-in accounting and finance module for Laravel applications. It ships a full set of REST API endpoints, Eloquent models, and database migrations covering the core of a finance back office — chart of accounts, journals, invoicing, payments, banking, budgets, payroll journals and financial reporting.

Features

  • Accounting — chart of accounts, account categories/types, journal entries and account entries
  • Sales — customers, sales orders, sales invoices, receipts, credit notes and returns
  • Purchases — vendors, purchase orders/invoices, payment & remittance advice, debit notes and returns
  • Banking — banks, transactions, transfers and account reconciliation
  • Configuration — companies, currencies, taxes, sections, and per-document settings
  • Budgeting, Payroll journals, Profit Centers
  • Reporting & exports — financial position, P&L, trial balance, ledgers and more (PDF via dompdf, spreadsheets via exports)
  • Optional integration with sibling SBSC ERP packages (Procurement, Inventory, CRM, Order Management, HRMS, Manufacturing, E‑commerce) — detected at runtime, never required.

Requirements

Installation

From Packagist (once published)

composer require damoscky/accounting-finance

From the Git repository (before publishing, or for private use)

Add the VCS repository to your application's composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "git@github.com:Damoscky/laravel-accounting-finance-package.git"
        }
    ]
}

Then require it:

composer require damoscky/accounting-finance:dev-main

The service provider Damoscky\AccountingFinance\FinanceServiceProvider is registered automatically via Laravel package auto-discovery — no manual registration needed.

Setup

  1. Run the migrations. The package auto-loads its migrations, so a standard migrate picks them up:

    php artisan migrate
  2. Configure JWT auth. This package authenticates with tymon/jwt-auth. Publish and set up JWT in the host application if you have not already:

    php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"
    php artisan jwt:secret
  3. Register the route middleware aliases. The finance routes use three middleware aliases. Add them to your application's HTTP kernel (app/Http/Kernel.php, $middlewareAliases / $routeMiddleware):

    'check.permissions' => \Damoscky\AccountingFinance\Http\Middleware\CheckPermissions::class,
    'financemanager'    => \Damoscky\AccountingFinance\Http\Middleware\FinanceManagerMiddleware::class,
    'financeofficer'    => \Damoscky\AccountingFinance\Http\Middleware\FinanceOfficerMiddleware::class,
  4. (Optional) Seed roles, permissions and demo data:

    php artisan db:seed --class="Damoscky\\AccountingFinance\\Database\\Seeders\\DatabaseSeeder"

Usage

The package registers its routes automatically under the api middleware group with the prefix /api/v1/finance. For example:

GET  /api/v1/finance/clear-cache
...  /api/v1/finance/...   (sales, purchases, banking, accounting, reports, etc.)

Endpoints are protected by JWT auth and the role middleware above. Pass a valid bearer token:

Authorization: Bearer <your-jwt-token>

Models, exports and helpers are available under the Damoscky\AccountingFinance\ namespace, e.g.:

use Damoscky\AccountingFinance\Models\Sales\FinSalesInvoice;
use Damoscky\AccountingFinance\Models\Accounting\FinJournalEntry;

$invoice = FinSalesInvoice::with('products')->find($id);

Blade views ship under the Finance:: view namespace.

License

The MIT License (MIT). See LICENSE for details.