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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-inventory

laravel-inventory

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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

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.

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

License

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


All versions of laravel-inventory with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package centrex/laravel-inventory contains the following files

Loading the files please wait ...