Report stock usage and value, add material cost to profitability, document phase 5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Inventory\Application\DTOs;
|
||||
|
||||
/**
|
||||
* An item's balance (in thousandths) and book value (in cents) at the end
|
||||
* of a day: the sums of its movements up to the day, each at its own cost.
|
||||
*/
|
||||
final readonly class StockValueEntry
|
||||
{
|
||||
public function __construct(
|
||||
public int $itemId,
|
||||
public string $itemName,
|
||||
public string $groupName,
|
||||
public string $unit,
|
||||
public int $balanceMilli,
|
||||
public int $valueCents,
|
||||
public ?int $reorderLevelMilli,
|
||||
public bool $isActive,
|
||||
) {}
|
||||
|
||||
public function needsReorder(): bool
|
||||
{
|
||||
return $this->reorderLevelMilli !== null && $this->balanceMilli <= $this->reorderLevelMilli;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user