承接 jeffersongoncalves/laravel-erp-core 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jeffersongoncalves/laravel-erp-core

Composer 安装命令:

composer require jeffersongoncalves/laravel-erp-core

包简介

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

README 文档

README

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

  • Master Data Models — Companies, currencies, currency exchange rates, units of measure, UOM conversions, fiscal years, departments, designations, brands, terms & 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 & 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 & EventsPostsToLedger, SubmittableDocument, DocumentSubmitted, DocumentCancelled
  • Translations — English and Brazilian Portuguese

Compatibility

Package PHP Laravel
^1.0 ^8.2 ^11.0 | ^12.0 | ^13.0

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

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

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

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

Table Description
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 & conditions templates
erp_addresses Polymorphic addresses
erp_contacts Polymorphic contacts
erp_naming_series Naming-series counters

Testing

composer test

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 12
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固