PHP code example of mes-stocktake / engine

1. Go to this page and download the library: Download mes-stocktake/engine 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/ */

    

mes-stocktake / engine example snippets


use Mes\Stocktake\Engine;

$lots = Engine::matchRoundBars(
    ['material' => '42 Cr Mo', 'diameter' => 'Φ50', 'length' => '6m', 'heatNo' => ''],
    $yardLots
);

$goods = Engine::searchFinishedGoods(
    ['spec' => '80 x 120 x 15', 'model' => 'GS-200'],
    $finishedItems,
    ['modelMode' => 'prefix']
);

$expected = Engine::projectStocktake([
    'opening' => 120,
    'inbound' => 30,
    'outbound' => 22,
    'lossCoefficient' => 0.015,
    'counted' => 125.5,
]);

$wipRows = Engine::splitWip(80, [
    ['processCode' => 'CUT', 'reportedHours' => 3.5],
    ['processCode' => 'TURN', 'reportedHours' => 8.0],
]);