Profitability by job and service unit from a period's hours, expenses and the created billing materials of its months. Hours are costed at one internal hourly cost, set on the price list maintenance page; a job of several service units is shared evenly between them. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
27 lines
664 B
PHP
27 lines
664 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Reports\Application\DTOs;
|
|
|
|
use App\Modules\Reports\Domain\ValueObjects\Profit;
|
|
|
|
/**
|
|
* Profitability by job (by job number) and by service unit (catalog
|
|
* order), the total, and the internal hourly cost used (null when not set,
|
|
* and then there are no hour costs or margins).
|
|
*/
|
|
final readonly class ProfitabilityReport
|
|
{
|
|
/**
|
|
* @param list<JobProfit> $jobs
|
|
* @param list<ServiceUnitProfit> $serviceUnits
|
|
*/
|
|
public function __construct(
|
|
public array $jobs,
|
|
public array $serviceUnits,
|
|
public Profit $total,
|
|
public ?int $hourlyCostCents,
|
|
) {}
|
|
}
|