PHPackages                             jeffersongoncalves/laravel-erp-core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. jeffersongoncalves/laravel-erp-core

Active[Admin Panels](/categories/admin)

jeffersongoncalves/laravel-erp-core
===================================

10PHP

Pushed todayCompare

[ Source](https://github.com/jeffersongoncalves/laravel-erp-core)[ Packagist](https://packagist.org/packages/jeffersongoncalves/laravel-erp-core)[ RSS](/packages/jeffersongoncalves-laravel-erp-core/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersionsUsed By (0)

Laravel ERP Core
================

[](#laravel-erp-core)

ERP core — companies, currencies, units, and the submittable-document foundation for the Laravel ERP ecosystem.

This package is the foundation of an ERPNext-native rebuild. It ships the master-data Eloquent models, migrations, enums, and the reusable "submittable document" concerns (`IsSubmittable`, `HasNamingSeries`, `HasCompany`) that every other `erp-*` package builds upon.

Features
--------

[](#features)

- **Master Data Models** — Companies, currencies, currency exchange rates, units of measure, UOM conversions, fiscal years, departments, designations, brands, terms &amp; conditions, addresses, and contacts
- **Submittable Documents** — ERPNext-style `Draft → Submitted → Cancelled` lifecycle via the `IsSubmittable` concern, with immutability guarantees and ledger-posting hooks
- **Naming Series** — Pattern-based document identifiers (`SINV-.YYYY.-`) with safe, per-series incrementing counters
- **Polymorphic Addresses &amp; Contacts** — Attach addresses and contacts to any model
- **Customizable Models** — Override any model via config while maintaining contract compliance (ModelResolver pattern)
- **Table Prefix** — Configurable table prefix to avoid naming collisions (default: `erp_`)
- **Contracts &amp; Events** — `PostsToLedger`, `SubmittableDocument`, `DocumentSubmitted`, `DocumentCancelled`
- **Translations** — English and Brazilian Portuguese

Compatibility
-------------

[](#compatibility)

PackagePHPLaravel`^1.0``^8.2``^11.0 | ^12.0 | ^13.0`Installation
------------

[](#installation)

```
composer require jeffersongoncalves/laravel-erp-core
```

Publish and run the migrations:

```
php artisan vendor:publish --tag="erp-core-migrations"
php artisan migrate
```

Publish the config (optional):

```
php artisan vendor:publish --tag="erp-core-config"
```

Submittable Documents
---------------------

[](#submittable-documents)

Add the `IsSubmittable` concern to any model with a `docstatus` column cast to `DocStatus`:

```
use Illuminate\Database\Eloquent\Model;
use JeffersonGoncalves\Erp\Core\Concerns\IsSubmittable;
use JeffersonGoncalves\Erp\Core\Contracts\SubmittableDocument;
use JeffersonGoncalves\Erp\Core\Enums\DocStatus;

class SalesInvoice extends Model implements SubmittableDocument
{
    use IsSubmittable;

    protected $casts = ['docstatus' => DocStatus::class];
}

$invoice->submit();   // Draft → Submitted, dispatches DocumentSubmitted
$invoice->cancel();   // Submitted → Cancelled, dispatches DocumentCancelled
```

A submitted document is immutable: any update (other than the controlled transition to cancelled) or delete throws a `DomainException`. If the model also implements `PostsToLedger`, `postLedgerEntries()` is called on submit and `reverseLedgerEntries()` on cancel.

Naming Series
-------------

[](#naming-series)

```
use JeffersonGoncalves\Erp\Core\Concerns\HasNamingSeries;

class SalesInvoice extends Model
{
    use HasNamingSeries;

    protected function namingSeriesPattern(): ?string
    {
        return 'SINV-.YYYY.-';
    }
}

// On create with an empty `name`: SINV-2026-00001, SINV-2026-00002, ...
```

Database Tables
---------------

[](#database-tables)

All tables use the configured prefix (default: `erp_`):

TableDescription`erp_companies`Companies (with group hierarchy)`erp_currencies`Currencies`erp_currency_exchanges`Currency exchange rates`erp_uoms`Units of measure`erp_uom_conversions`UOM conversion factors`erp_fiscal_years`Fiscal years`erp_departments`Departments (with hierarchy)`erp_designations`Designations`erp_brands`Brands`erp_terms_and_conditions`Terms &amp; conditions templates`erp_addresses`Polymorphic addresses`erp_contacts`Polymorphic contacts`erp_naming_series`Naming-series countersTesting
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance65

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity8

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/411493?v=4)[Jefferson Gonçalves](/maintainers/jeffersongoncalves)[@jeffersongoncalves](https://github.com/jeffersongoncalves)

---

Top Contributors

[![jeffersongoncalves](https://avatars.githubusercontent.com/u/411493?v=4)](https://github.com/jeffersongoncalves "jeffersongoncalves (1 commits)")

### Embed Badge

![Health badge](/badges/jeffersongoncalves-laravel-erp-core/health.svg)

```
[![Health](https://phpackages.com/badges/jeffersongoncalves-laravel-erp-core/health.svg)](https://phpackages.com/packages/jeffersongoncalves-laravel-erp-core)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
