Files
Toiminnanohjaus/app/Modules/Machines/Application/Contracts/MaintenanceMaterials.php
T
petriandClaude Sonnet 5.5 ef400054b0 Return stock of cancelled maintenance, throttle the PIN page's password
Cancelling a maintenance record now reverses the stock it used, through
Inventory's new ReverseMaintenanceStockUse behind the MaintenanceMaterials
port, in the same transaction as the cancellation.

The PIN page allows 5 wrong current passwords a minute per user, as the
login form does, so a signed-in session cannot be used to guess the
password.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-29 10:10:18 +02:00

22 lines
595 B
PHP

<?php
declare(strict_types=1);
namespace App\Modules\Machines\Application\Contracts;
/**
* Records the stock used at a maintenance through the Inventory module.
*/
interface MaintenanceMaterials
{
/**
* @return bool False when the stock could not be recorded (e.g. the item is out of use).
*/
public function use(int $stockItemId, int $quantityMilli, int $machineId, int $maintenanceRecordId, int $userId): bool;
/**
* Returns the stock a cancelled maintenance record used.
*/
public function returnUseOf(int $maintenanceRecordId, int $userId): void;
}