Search by

elgibor-solution / laravel-inventory

esolution

Extensible inventory core with scoped stock, costing, tracking, workflow, and reservations for Laravel.

Package info

github.com/elgiborsolution/laravel-inventory

pkg:composer/elgibor-solution/laravel-inventory

Statistics

Installs: 90

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.0.1 2026-10-07 09:54 UTC

README

elgibor-solution/laravel-inventory provides an extensible Laravel Inventory Core with scoped stock, append-only ledger, costing layers, tracking, document workflow, Stock Cards, and reservations. The package keeps its public namespace at ESolution\Inventory.

Accounting and approval are optional bridges. Inventory Core does not implement a General Ledger and does not own journal tables.

Installation

Requires Laravel 11, 12, or 13 and PHP 8.2 or later for Core and all nine modules. The selected Laravel version and other dependencies may require a newer PHP version.

Core now bundles all nine modules with runtime autoload. Install Core once; activate a module by publishing its configuration, then migrate on the next Artisan invocation. No module Composer require or activation boolean is needed. Existing published module configuration activates that module after upgrading.

php artisan config:clear
php artisan vendor:publish --tag=inventory-wms-config
php artisan migrate
php artisan inventory:modules

Panduan Bahasa Indonesia: instalasi project baru dan project lama, termasuk aktivasi modul, konfigurasi, migrasi data lama, integrasi Accounting/Approval, verifikasi, dan deployment. Lihat kegunaan, fungsi, dan fitur sembilan modul untuk contoh penggunaan dan batas tanggung jawab aplikasi host.

composer require elgibor-solution/laravel-inventory
php artisan vendor:publish --tag=inventory-config
php artisan migrate
php artisan inventory:validate-config

For a local path repository, require the development version after registering the repository in the host project's composer.json:

composer require elgibor-solution/laravel-inventory:@dev

Module code lives in packages/* inside the installed Core package. The Core manifest replaces the old standalone module package names to avoid duplicate classes. See the upgrade guide before switching an existing installation with separately installed modules.

Service usage reference

Panduan input, hasil service, error, dan retry memuat contoh Core dan navigasi ke service kesembilan modul. JSON model adalah proyeksi contoh, bukan kontrak endpoint HTTP bawaan. Untuk extension points lihat service internal.

Configuration

The published config/inventory.php controls organization/storage depth, costing scope, negative-stock policy, idempotency, optional bridges, and after-commit behavior. When upgrading, compare and merge configuration changes manually to preserve project-specific values; do not force-overwrite host config.

Accounting is off by default:

'accounting' => [
    'enabled' => false,
    'connection' => null,
    'tenant_payload_key' => null,
    'service_code_map' => [
        'purchase_receipt' => 'PURCHASE_CREDIT',
        'warehouse_transfer.intra_company' => null,
    ],
],

When enabling it, install elgibor-solution/laravel-accounting in the host project and validate deployment prerequisites:

php artisan inventory:accounting:validate

See Accounting Bridge for mapping, transaction, tenant, and reversal behavior.

Approval Flow is also optional. When e-solution/laravel-approval-flow is installed, validate its identity resolver, status field, service-auth posture, and published workflows:

php artisan inventory:approval:validate

See Approval Bridge for submit, callback, status ownership, rejection, cancellation, and idempotent resume behavior.

For Sales reservation, atomic partial fulfillment, walk-in sale, Purchasing receipt, and availability examples, see Sales and Purchasing Integration.

The optional Retail vertical is bundled under the historical elgibor-solution/laravel-inventory-retail package under packages/retail. See Retail package documentation for stock-bearing variant matrices, Consignment, POS, and E-Commerce integration.

The optional WMS vertical is bundled under the historical elgibor-solution/laravel-inventory-wms package under packages/wms. See WMS package documentation for put-away/picking strategies, tasks, waves, LPNs, replenishment, cross-docking, and the TMS integration pattern.

The optional Manufacturing vertical is bundled under the historical elgibor-solution/laravel-inventory-manufacturing package under packages/manufacturing. See Manufacturing package documentation for immutable versioned BOMs, atomic production orchestration, WIP chaining, variance tracking, and the accounting blocker.

The optional Healthcare vertical is bundled under the historical elgibor-solution/laravel-inventory-healthcare package under packages/healthcare. See Healthcare package documentation for the tracking preset, Core-owned deterministic FEFO, controlled expired receipts, COA enforcement, recall veto, and forward traceability.

The optional Food vertical is bundled under the historical elgibor-solution/laravel-inventory-food package under packages/food. See Food package documentation for immutable versioned Recipes, idempotent MTO triggers, atomic RecipeBatch actual-cost roll-up, the Halal tracking preset, optional Core FEFO, and the accounting blocker.

The optional Asset vertical is bundled under the historical elgibor-solution/laravel-inventory-asset package under packages/asset. See Asset package documentation for serialized checkout, portable active-allocation protection, Reservation-based loans, derived overdue notification, and the documented Core serial-status limitation.

The optional Project vertical is bundled under the historical elgibor-solution/laravel-inventory-project package under packages/project. See Project package documentation for exact Reservation-backed allocations, replenishment, atomic reallocation, partial material draw, and allocation reporting without new stock behavior or presets.

The bundled Library module provides per-copy circulation, reservation-backed ready Holds, renewals, derived overdue, and fine records. Waiting Holds do not reserve stock.

The optional Automotive package under packages/automotive provides serial Compliance tracking, ordinary Core work-order parts issues, and usage reporting. See Automotive documentation for external references and the fail-closed accounting decision.

Posting example

use ESolution\Inventory\DTO\DocumentData;
use ESolution\Inventory\DTO\LineData;
use ESolution\Inventory\Facades\Inventory;

$document = Inventory::post(new DocumentData(
    type: 'purchase_receipt',
    organizationId: $organizationId,
    trxDate: now()->toDateString(),
    externalId: 'GR-001',
    lines: [
        new LineData(
            itemId: $itemId,
            uomId: $uomId,
            warehouseId: $warehouseId,
            qty: 10,
            unitCost: 5000,
        ),
    ],
));

With Accounting Bridge enabled, caller-owned financial lines can be forwarded without Core calculating revenue or tax:

additionalJournalLines: [
    ['mapping_key' => 'purchase_credit_ap_k', 'amount' => 50000],
],

Development checks

For atomic standard FIFO warehouse transfers and exact-cost corrections, see Transfer and reversal. These operations currently support untracked stock with Accounting and Approval bridges disabled.

This is an unreleased development baseline. See the ecosystem installation and release runbook, generated API/schema reference, and known release blockers. Passing implemented tests does not mean open TODO tests or the production release matrix are complete.

composer check
composer audit
composer validate --strict
composer release:preflight

The fresh baseline migrations are intended for new installations. Migration of legacy production data is outside the baseline package.

License

Apache-2.0