Files
Toiminnanohjaus/app/Modules/Sales/Application/Contracts/OrderMaterials.php
T
2026-11-26 17:11:54 +02:00

21 lines
620 B
PHP

<?php
declare(strict_types=1);
namespace App\Modules\Sales\Application\Contracts;
/**
* Records the stock used in making quick sale orders, through the
* Inventory module. Recording never stops production: a failure returns
* false.
*/
interface OrderMaterials
{
public function use(int $stockItemId, int $quantityMilli, int $orderLineId, ?int $machineId, int $userId): bool;
/**
* Records stock spoiled in production (e.g. a reprint) as a write-off.
*/
public function writeOff(int $stockItemId, int $quantityMilli, int $orderLineId, ?int $machineId, int $userId, string $reason): bool;
}