Download the PHP package centrex/laravel-inventory without Composer
On this page you can find all versions of the php package centrex/laravel-inventory. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download centrex/laravel-inventory
More information about centrex/laravel-inventory
Files in centrex/laravel-inventory
Package laravel-inventory
Short Description Manage inventory accross warehouses
License MIT
Homepage https://github.com/centrex/laravel-inventory
Informations about the package laravel-inventory
laravel-inventory
Full multi-warehouse inventory management for Laravel. Supports weighted average costing (WAC), multi-currency purchasing and selling, inter-warehouse transfers with per-kg shipping costs, seven configurable sell price tiers per product per warehouse, and optional ERP integration with laravel-accounting for automatic journal entries.
Developer architecture notes live in docs/developer-architecture.md.
Contents
- Installation
- Configuration
- Core Concepts
- Exchange Rates
- Warehouses & Products
- Price Tiers & Pricing
- Coupons
- Customers & Suppliers
- Purchase Orders & GRNs
- Sale Orders
- Returns
- Inter-Warehouse Transfers
- Stock Adjustments
- Stock Queries & Reports
- Sales Forecast
- Authorization Gates
- Web UI
- REST API
- Exceptions
- Environment Variables
- Testing
- Changelog
- License
Installation
Publish the config and run migrations:
Seed the default price tiers (base, wholesale, retail, dropshipping, fcom):
Configuration
Core Concepts
| Concept | Description |
|---|---|
| Base currency | BDT. Every financial amount is stored in BDT. Foreign-currency amounts are stored alongside with their exchange rate locked at the document level. |
| WAC | Weighted average cost per product per warehouse. Recalculated on every receipt and transfer receipt using a SELECT FOR UPDATE lock to prevent race conditions. |
| Price tiers | Five tiers: base, wholesale, retail, dropshipping, fcom. Prices can be set globally or overridden per warehouse. Warehouse-specific price wins. |
| Transfers | Moving stock between warehouses adds a per-kg shipping cost (allocated pro-rata across items by weight) to the landed cost at the destination, which feeds into the destination's WAC. |
| Stock movements | Append-only audit log. Every quantity change writes an immutable row. Voids write compensating rows — nothing is deleted or updated. |
Exchange Rates
Set exchange rates before creating any multi-currency documents.
Warehouses & Products
Price Tiers & Pricing
Set prices
Resolve & read prices
Coupons
Coupons apply at the sale-order level and are stored as order snapshots so historic orders do not change if the coupon is later edited.
- Coupon amounts are stored in the inventory base currency.
fixedcoupons are converted into the order currency at checkout time.percentcoupons use the order subtotal before tax and before manual order-level discount.- Manual
discount_localand coupon discounts can both be used on the same order.
Create coupons
Coupons can be managed from the Inventory master-data UI under Coupons, or created directly:
Apply coupons to sale orders
The sale-order form and POS terminal also accept coupon codes.
Purchase Orders & GRNs
Create a purchase order
Each PO targets a single warehouse and a single supplier currency. The exchange rate is locked at creation time.
Receive stock (GRN)
Sale Orders
Create and fulfill a sale order
Per-line price tier override
Inter-Warehouse Transfers
Stock moved between warehouses carries a shipping cost per kg. This shipping cost is spread across items pro-rata by weight and added to the landed unit cost at the destination, which then feeds into the destination's WAC.
Multi-product transfer
Stock Adjustments
Use adjustments for cycle counts, write-offs, damage, theft, or expiry.
Stock Queries & Reports
Stock levels
Valuation report
Movement history
Customers & Suppliers
Customer management
Credit limit enforcement
When a sale order is created and the customer would exceed their credit limit, the order is flagged and requires explicit override approval:
Supplier management
Returns
Sale returns (customer returns)
Purchase returns (return to supplier)
Sales Forecast
The forecast analyses historical sales patterns and projects future demand, procurement needs, and cash flow.
Authorization Gates
All gates fall back to the inventory-admin super-gate. Configure via INVENTORY_ADMIN_ROLES or override in AppServiceProvider:
| Gate | Description |
|---|---|
inventory.master-data.view |
View warehouses, products, categories, brands, coupons |
inventory.master-data.manage |
Create, edit, delete master data records |
inventory.exchange-rates.view |
View exchange rates |
inventory.exchange-rates.manage |
Set exchange rates |
inventory.pricing.view |
View product prices |
inventory.pricing.manage |
Set and update product prices |
inventory.reports.view |
View stock valuation, movement history, forecast |
inventory.purchase-orders.view |
View purchase orders |
inventory.purchase-orders.create |
Create purchase orders |
inventory.purchase-orders.submit |
Submit PO for confirmation |
inventory.purchase-orders.confirm |
Confirm a submitted PO |
inventory.stock-receipts.create |
Create GRNs |
inventory.stock-receipts.post |
Post GRNs to inventory |
inventory.stock-receipts.void |
Void a posted GRN |
inventory.sale-orders.view |
View sale orders |
inventory.sale-orders.create |
Create sale orders |
inventory.sale-orders.confirm |
Confirm a sale order |
inventory.sale-orders.reserve |
Reserve stock for a sale order |
inventory.sale-orders.fulfill |
Fulfill a sale order |
inventory.sale-orders.cancel |
Cancel a sale order |
inventory.sale-orders.approve-credit |
Override customer credit limit |
inventory.channels.checkout |
POS terminal / e-commerce checkout |
inventory.transfers.view |
View transfers |
inventory.transfers.create |
Create transfers |
inventory.transfers.dispatch |
Dispatch a transfer |
inventory.transfers.receive |
Receive a transfer |
inventory.adjustments.view |
View adjustments |
inventory.adjustments.create |
Create adjustments |
inventory.adjustments.post |
Post adjustments to inventory |
Web UI
The package ships a full Livewire UI enabled by default. Set INVENTORY_WEB_ENABLED=false to disable. All routes are under the web_prefix (default inventory), protected by web_middleware (default ['web', 'auth']).
| URL | Description |
|---|---|
/inventory/dashboard |
Overview: stock values per warehouse, low-stock alerts |
/inventory/master-data/warehouses |
Warehouse management |
/inventory/master-data/products |
Product catalog |
/inventory/master-data/product-categories |
Category tree |
/inventory/master-data/product-brands |
Brand list |
/inventory/master-data/customers |
Customer management |
/inventory/master-data/suppliers |
Supplier management |
/inventory/master-data/coupons |
Coupon management |
/inventory/purchase-orders |
Purchase order list |
/inventory/purchase-orders/create |
New purchase order / requisition |
/inventory/purchase-orders/{id} |
PO detail: items, GRN history, status actions |
/inventory/sale-orders |
Sale order list |
/inventory/sale-orders/create |
New sale order / quotation |
/inventory/sale-orders/{id} |
SO detail: items, fulfillment, credit status |
/inventory/returns/sale |
Sale return list |
/inventory/returns/purchase |
Purchase return list |
/inventory/transfers |
Transfer list |
/inventory/transfers/create |
New transfer |
/inventory/transfers/{id} |
Transfer detail: boxes, items, receive actions |
/inventory/adjustments/create |
New stock adjustment |
/inventory/reports |
Valuation, movement history, forecast |
/inventory/pos |
Point-of-sale terminal |
REST API
Set INVENTORY_API_ENABLED=false to disable. Base prefix: api/inventory. Default middleware: ['api', 'auth:sanctum'].
Exchange rates & pricing
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/inventory/exchange-rates/set |
Set exchange rate |
| GET | /api/inventory/exchange-rates/convert-to-bdt |
Convert amount to base currency |
| POST | /api/inventory/pricing |
Set product price for a tier |
| GET | /api/inventory/pricing/resolve |
Resolve effective price |
| GET | /api/inventory/pricing/sheet |
Full price sheet for all tiers |
Master data (CRUD)
All entities support: GET /api/inventory/{entity} (list), POST (create), GET /{id} (show), PUT /{id} (update), DELETE /{id} (delete).
Entities: warehouses, product-categories, product-brands, products, suppliers, customers, coupons, product-prices, warehouse-products.
Purchase orders
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/inventory/purchase-orders |
Create PO |
| POST | /api/inventory/purchase-orders/{id}/submit |
Submit PO |
| POST | /api/inventory/purchase-orders/{id}/confirm |
Confirm PO |
| POST | /api/inventory/purchase-orders/{id}/receive |
Receive items (partial or full) |
| POST | /api/inventory/purchase-orders/{id}/cancel |
Cancel PO |
| POST | /api/inventory/stock-receipts |
Create GRN |
| POST | /api/inventory/stock-receipts/{id}/post |
Post GRN |
| POST | /api/inventory/stock-receipts/{id}/void |
Void GRN |
Sale orders
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/inventory/sale-orders |
Create SO |
| POST | /api/inventory/sale-orders/{id}/confirm |
Confirm SO |
| POST | /api/inventory/sale-orders/{id}/reserve |
Reserve stock |
| POST | /api/inventory/sale-orders/{id}/fulfill |
Fulfill SO |
| POST | /api/inventory/sale-orders/{id}/cancel |
Cancel SO |
Transfers & adjustments
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/inventory/transfers |
Create transfer |
| POST | /api/inventory/transfers/{id}/dispatch |
Dispatch transfer |
| POST | /api/inventory/transfers/{id}/receive |
Receive transfer |
| POST | /api/inventory/adjustments |
Create adjustment |
| POST | /api/inventory/adjustments/{id}/post |
Post adjustment |
Reports
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/inventory/reports/stock-valuation |
Valuation report (optional ?warehouse_id=) |
| GET | /api/inventory/reports/movements |
Movement history (?product_id=&warehouse_id=&from=&to=) |
| GET | /api/inventory/reports/forecast |
Sales forecast (?lookback_days=&forecast_days=) |
Exceptions
| Exception | Thrown when |
|---|---|
PriceNotFoundException |
No active price found for product + tier + warehouse (when price_not_found_throws = true) |
InsufficientStockException |
Sale or transfer dispatch would result in negative available stock |
InvalidTransitionException |
A status transition is not allowed (e.g. posting an already-posted GRN) |
Environment Variables
Testing
Changelog
Please see CHANGELOG for recent changes.
Contributing
Please see CONTRIBUTING for details.
Credits
- rochi88
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-inventory with dependencies
centrex/laravel-btyd Version ^0.2
centrex/laravel-open-exchange-rates Version ^1.3
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/routing Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/view Version ^11.0|^12.0|^13.0
centrex/tallui Version *
livewire/livewire Version ^4.2
owen-it/laravel-auditing Version ^14.0
spatie/laravel-medialibrary Version ^11.0