Add the profitability report and the internal hourly cost
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]>
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Modules\Reports\Presentation\Http\Controllers;
|
||||
|
||||
use App\Modules\Reports\Domain\Exceptions\InvalidReportPeriod;
|
||||
use App\Modules\Reports\Presentation\Csv\HoursCsv;
|
||||
use App\Modules\Reports\Presentation\Csv\ProfitabilityCsv;
|
||||
use App\Modules\Reports\Presentation\Csv\ReimbursementsCsv;
|
||||
use App\Modules\Reports\Presentation\Csv\ReportCsv;
|
||||
use App\Modules\Reports\Presentation\Csv\SalesCsv;
|
||||
@@ -21,7 +22,7 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
class DownloadReport
|
||||
{
|
||||
/** The reports that have a CSV, by their URL key. */
|
||||
public const array REPORTS = ['hours', 'unbilled', 'sales', 'reimbursements'];
|
||||
public const array REPORTS = ['hours', 'unbilled', 'profitability', 'sales', 'reimbursements'];
|
||||
|
||||
public function __invoke(string $report, Request $request): StreamedResponse
|
||||
{
|
||||
@@ -75,6 +76,7 @@ class DownloadReport
|
||||
return match ($report) {
|
||||
'hours' => app(HoursCsv::class),
|
||||
'unbilled' => app(UnbilledCsv::class),
|
||||
'profitability' => app(ProfitabilityCsv::class),
|
||||
'sales' => app(SalesCsv::class),
|
||||
'reimbursements' => app(ReimbursementsCsv::class),
|
||||
default => abort(404),
|
||||
|
||||
Reference in New Issue
Block a user