Laravel EnsoLaravel Enso
Guide
Back End
Front End
GitHub
Guide
Back End
Front End
GitHub
  • Back End

    • Action Logger
    • Addresses
    • Algolia
    • Algolia Webshop
    • API
    • Audits
    • Avatars
    • Cache Chain
    • Calendar
    • Cargo Partner
    • Categories
    • Charts
    • CI/CD
    • Cli
    • CNP Validator
    • Comments
    • Commercial
    • Companies
    • Core
    • Countries
    • Currencies
    • Data Export
    • Data Import
    • Discounts
    • Documents
    • Dynamic Methods
    • EAV
    • Emag
    • Enums
    • Excel
    • Facebook
    • Files
    • Filters
    • Financials
    • Forms
    • Frisbo
    • Google
    • Helpers
    • Holidays
    • How-to
    • Image Transformer
    • Impersonate
    • Interactions
    • Inventory
    • IO
    • Localisation
    • Lockable Models
    • Logs
    • Measurement Units
    • Meili Search
    • Meili Search Webshop
    • Menus
    • Migrator
    • Monitored Emails
    • Notifications
    • Packaging Units
    • PDF
    • People
    • Permissions
    • Product Eav
    • Product Lots
    • Products
    • Questionnaires
    • Rememberable
    • Roles
    • Sale Channels
    • Searchable
    • Select
    • Sentry
    • Services
    • Smart Bill
    • Sms Advert
    • Stripe
    • Tables
    • Tasks
    • Teams
    • Ticketing
    • Track Who
    • Tutorials
    • Typesense
    • Typesense Webshop
    • Unit Conversion
    • Upgrade
    • UPS
    • User Groups
    • Users
    • Versions
    • Virtual Call Center
    • Vouchers
    • Webshop
    • Webshop Commercial

Commercial

LicenseStablePHPIssuesMerge Requests

Description

Commercial is the Enso business-flow package for purchases, sales, returns, inventory-side adjustments, and operational order documents.

The package exposes full API flows for purchases, purchase returns, sales, and sale returns, adds stock-adjustment and stock-audit endpoints on top of the inventory and product stacks, publishes printable order and note templates, sends operational notifications, and schedules recurring stock-value, stock-rotation, supplier-order, and expiring-lot maintenance jobs in production.

It is designed for private Enso deployments that need transactional commercial operations on top of the broader inventory, financials, and product ecosystem.

Installation

This is a proprietary package distributed through the private Enso registry.

Run the package migrations:

php artisan migrate

Optional publishes:

php artisan vendor:publish --tag=commercial-factories
php artisan vendor:publish --tag=commercial-views

The package also expects the matching frontend package in applications that render the commercial UI:

yarn add @enso-ui/commercial

Features

  • Purchase, sale, purchase-return, and sale-return CRUD and lifecycle endpoints.
  • Inventory-side stock adjustments, reservation lookups, stock-audit views, and per-product stock details.
  • Printable purchase orders, goods-received notes, delivery notes, stock-removal documents, and related email flows.
  • Invoice, payment, bundle, voucher, and line-item support inside the commercial order flows.
  • Scheduled stock-value updates, stock-rotation refreshes, default-supplier recalculation, supplier-order generation, and expiring-lot notifications.

Usage

The package is mounted automatically through its service providers and route files once installed.

In production it schedules these maintenance commands:

php artisan enso:commercial:update-stock-values --daily
php artisan enso:commercial:update-stock-rotation --daily
php artisan enso:commercial:generate-supplier-orders
php artisan enso:commercial:expiring-lots-notification
php artisan enso:commercial:update-default-supplier

Automatic supplier-order generation runs only when Settings::autoRestock() is enabled, while expiring-lot notifications are scheduled only when product lots exist.

Commercial also registers observers for sale-status transitions and inventory stock updates, so order-state and stock-side calculations stay synchronized with the rest of the Enso domain.

API

Main route groups

Mounted under api/commercial:

  • partner
  • products
  • services
  • addresses
  • purchases.*
  • purchaseReturns.*
  • sales.*
  • saleReturns.*
  • audit.*
  • stats.orders
  • settings.*

Mounted outside the commercial prefix:

  • inventory.adjust
  • inventory.reservations
  • inventory.updateAdjustmentOrders
  • products.stocks.details

Order lifecycle endpoints

Purchases include transitions such as:

  • confirm
  • ship
  • receive
  • fulfill
  • finalize
  • cancel

Sales include transitions such as:

  • fulfill
  • prepare
  • ship
  • deliver
  • finalize
  • cancel

Purchase returns and sale returns expose the equivalent reverse-flow lifecycle endpoints plus printable document endpoints and email actions.

Artisan commands

  • enso:commercial:update-stock-values {--daily}
  • enso:commercial:update-stock-rotation {--daily}
  • enso:commercial:generate-supplier-orders
  • enso:commercial:expiring-lots-notification
  • enso:commercial:update-default-supplier

Depends On

Required Enso packages:

  • laravel-enso/addresses ↗
  • laravel-enso/comments ↗
  • laravel-enso/core ↗
  • laravel-enso/data-import ↗
  • laravel-enso/discounts ↗
  • laravel-enso/documents ↗
  • laravel-enso/dynamic-methods ↗
  • laravel-enso/enums ↗
  • laravel-enso/financials ↗
  • laravel-enso/forms ↗
  • laravel-enso/helpers ↗
  • laravel-enso/history-tracker ↗
  • laravel-enso/inventory ↗
  • laravel-enso/measurement-units ↗
  • laravel-enso/migrator ↗
  • laravel-enso/pdf ↗
  • laravel-enso/sale-channels ↗
  • laravel-enso/searchable ↗
  • laravel-enso/services ↗
  • laravel-enso/tables ↗
  • laravel-enso/versions ↗
  • laravel-enso/vouchers ↗

Companion frontend package:

  • @enso-ui/commercial ↗
Edit this page on GitHub
Last Updated: 4/20/2026, 7:52:40 PM
Prev
Comments
Next
Companies