Record used material on tasks and suggest workflow steps' default materials
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace App\Modules\Inventory\Application\DTOs;
|
||||
|
||||
use App\Modules\Inventory\Domain\Enums\StockMovementKind;
|
||||
use App\Modules\Inventory\Domain\Enums\StockUnit;
|
||||
|
||||
/**
|
||||
* A stock movement in an item's history: signed quantity and the balance
|
||||
@@ -35,6 +36,8 @@ final readonly class StockMovementSummary
|
||||
public ?string $documentNumber,
|
||||
public ?int $reversesMovementId,
|
||||
public ?int $reversedByMovementId,
|
||||
public string $itemName = '',
|
||||
public ?StockUnit $unit = null,
|
||||
) {}
|
||||
|
||||
public function canBeReversed(): bool
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Inventory\Application\DTOs;
|
||||
|
||||
/**
|
||||
* A job's task as stock sees it: whether material may be recorded on it
|
||||
* (its service unit uses stock, spec 19) and whether its job is locked.
|
||||
*/
|
||||
final readonly class StockTaskContext
|
||||
{
|
||||
public function __construct(
|
||||
public int $taskId,
|
||||
public int $jobId,
|
||||
public string $label,
|
||||
public bool $usesStock,
|
||||
public bool $isLocked,
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Inventory\Application\DTOs;
|
||||
|
||||
use App\Modules\Inventory\Domain\Enums\StockUnit;
|
||||
|
||||
/**
|
||||
* A default material suggested on a task, waiting to be confirmed.
|
||||
*/
|
||||
final readonly class TaskMaterialSuggestion
|
||||
{
|
||||
public function __construct(
|
||||
public int $id,
|
||||
public int $taskId,
|
||||
public int $stockItemId,
|
||||
public string $itemName,
|
||||
public StockUnit $unit,
|
||||
public int $quantityMilli,
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user