Download the PHP package azaharizaman/nexus-sales without Composer

On this page you can find all versions of the php package azaharizaman/nexus-sales. 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 nexus-sales

Nexus\Sales

Framework-agnostic sales management package for quotation-to-order commercial contract lifecycle.

Overview

Nexus\Sales manages the complete sales process from quotation to order fulfillment, including:

Key Features

1. Quotation-to-Order Workflow

Sales Order Workflow:

2. Pricing Strategies

3. Integrated Services

The package includes the following production-ready services:

Service Purpose Integration
QuoteToOrderConverter Converts accepted quotes to sales orders Nexus\Sequencing
SalesOrderManager Full order lifecycle management All packages
ReceivableCreditLimitChecker Real-time credit limit validation Nexus\Receivable
SalesReturnManager Return order (RMA) processing Nexus\Receivable (Phase 2)
InventoryStockReservation Real-time stock reservation Nexus\Inventory
ReceivableInvoiceManager Invoice generation from orders Nexus\Receivable

4. Future-Proof Architecture

V1 includes schema fields for Phase 2 features:

All V1 stub implementations provide clear upgrade paths.

Installation

Dependencies

Architecture

This package follows the Nexus Atomic Package Pattern:

Implementation is provided by apps/Atomy (Laravel orchestrator).

Quick Start Guide

Step 1: Create a Quotation

Step 2: Convert Quote to Order

Step 3: Confirm Order

The confirmation process performs three critical operations:

  1. Credit Limit Check - Validates customer has sufficient credit
  2. Stock Reservation - Reserves inventory for the order
  3. Exchange Rate Lock - Locks foreign currency rate (if applicable)

Step 4: Generate Invoice

Service Reference

QuoteToOrderConverter

Converts accepted quotations to sales orders, copying all line items, pricing, and customer information.

Location: src/Services/QuoteToOrderConverter.php

Constructor Dependencies:

Methods:

Method Description
convertToOrder(string $quotationId, array $orderData = []): SalesOrderInterface Converts accepted quote to order
canConvertToOrder(string $quotationId): bool Validates if quote can be converted

SalesOrderManager

Manages the complete sales order lifecycle including creation, confirmation, shipping, invoicing, and cancellation.

Location: src/Services/SalesOrderManager.php

Constructor Dependencies:

Methods:

Method Description
createOrder(string $tenantId, string $customerId, array $lines, array $data): SalesOrderInterface Creates a new draft order
confirmOrder(string $orderId, string $confirmedBy): void Confirms order, checks credit, reserves stock
cancelOrder(string $orderId, ?string $reason = null): void Cancels order and releases stock
markAsShipped(string $orderId, bool $isPartialShipment = false): void Marks order as shipped
generateInvoice(string $orderId): string Generates invoice from order
findOrder(string $orderId): SalesOrderInterface Finds order by ID
findOrdersByCustomer(string $tenantId, string $customerId): array Finds orders by customer

ReceivableCreditLimitChecker

Integrates with Nexus\Receivable for real-time credit limit validation.

Location: src/Services/ReceivableCreditLimitChecker.php

Constructor Dependencies:

Methods:

Method Description
checkCreditLimit(string $tenantId, string $customerId, float $orderTotal, string $currencyCode): bool Validates customer credit limit

Throws: CreditLimitExceededException when limit exceeded

SalesReturnManager

Handles return order (RMA) processing including validation and quantity checks.

Location: src/Services/SalesReturnManager.php

Constructor Dependencies:

Methods:

Method Description
createReturnOrder(string $salesOrderId, array $returnLineItems, string $returnReason): string Creates return order

InventoryStockReservation

Integrates with Nexus\Inventory for real-time stock reservation.

Location: src/Services/InventoryStockReservation.php

Constructor Dependencies:

Methods:

Method Description
reserveStockForOrder(string $salesOrderId): array Reserves stock for all order lines
releaseStockReservation(string $salesOrderId): void Releases all reservations
getOrderReservations(string $salesOrderId): array Gets active reservations
checkStockAvailability(string $salesOrderId): StockAvailabilityResult Checks availability without reserving

Throws: InsufficientStockException when stock unavailable

ReceivableInvoiceManager

Integrates with Nexus\Receivable for invoice generation.

Location: src/Services/ReceivableInvoiceManager.php

Constructor Dependencies:

Methods:

Method Description
generateInvoiceFromOrder(string $salesOrderId): string Generates invoice from sales order

Pricing Engine

Matrix Pricing (Quantity Tiers)

The pricing engine supports quantity-based tiered pricing via dedicated price_tiers table:

Performance: SQL-based tier matching enables efficient queries:

Tax Calculation

V1 provides SimpleTaxCalculator with configurable flat tax rate.

Phase 2: Replace with tax jurisdiction engine for SST, VAT, GST compliance.

Exchange Rate Locking

For foreign currency orders, the exchange rate is locked at confirmation time:

Integration Points

Stock Reservation (Nexus\Inventory)

Production-ready via InventoryStockReservation:

Invoice Generation (Nexus\Receivable)

Production-ready via ReceivableInvoiceManager:

Credit Limit Checking (Nexus\Receivable)

Production-ready via ReceivableCreditLimitChecker:

Discount Rules

Time-sensitive promotional pricing:

Payment Terms

Standard payment terms with automatic due date calculation:

Exception Handling

All domain exceptions extend SalesException:

Audit Trail

All state changes are logged via Nexus\AuditLogger:

Example audit log entry:

Testing

Future Enhancements (Phase 2)

  1. Recurring Subscriptions

    • Use is_recurring and recurrence_rule fields
    • Automatic renewal order generation
    • Subscription lifecycle management
  2. Sales Commission

    • Track salesperson via salesperson_id
    • Calculate commission via commission_percentage
    • Commission payout integration
  3. Multi-Warehouse Fulfillment

    • Route orders via preferred_warehouse_id
    • Split shipments across warehouses
    • Warehouse selection optimization
  4. Advanced Tax Engine

    • Tax jurisdiction determination
    • Multi-level tax (federal + state)
    • Tax exemption certificates
    • Reverse charge mechanism
  5. Advanced Sales Returns
    • Credit note integration with Nexus\Receivable
    • Restocking fee calculation
    • Return quality inspection workflow

📖 Documentation

Package Documentation

Additional Resources

License

MIT License - see LICENSE file for details.

Support

For issues and questions, please use the GitHub issue tracker.


All versions of nexus-sales with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
psr/log Version ^3.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 azaharizaman/nexus-sales contains the following files

Loading the files please wait ...