PHP code example of azaharizaman / nexus-supply-chain-operations
1. Go to this page and download the library: Download azaharizaman/nexus-supply-chain-operations library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
azaharizaman / nexus-supply-chain-operations example snippets
$poId = $dropshipCoordinator->createDropshipPo($salesOrder, $lines, $vendorId);
$coordinator->distributeLandedCost($grnId, $amount, 'value');
// Traditional threshold-based
$reqId = $coordinator->createAutoRequisition($tenantId, $warehouseId, $requesterId, $replenishmentMap);
// ML-based forecast evaluation
$evaluation = $coordinator->evaluateProductWithForecast($tenantId, $productId, $warehouseId);
$atpResult = $coordinator->calculateAtpDate($productId, $quantity, $warehouseId, $preferredVendorId);
// Returns: promised date, confidence score, lead time breakdown
// Example: Laravel ServiceProvider in adapters/
$this->app->singleton(DropshipCoordinator::class);
$this->app->singleton(LandedCostCoordinator::class);
$this->app->singleton(ReplenishmentCoordinator::class);
$this->app->singleton(DynamicLeadTimeCoordinator::class);
// Event wiring
Event::listen(SalesOrderConfirmedEvent::class, DropshipListener::class);
Event::listen(GoodsReceiptCreatedEvent::class, DropshipFulfillmentListener::class);