Add the unbilled hours report
Hours on customers' billable jobs that no billing material has taken, by job and work type up to a day, valued at the hourly rates for jobs billed by the hour, with a chart by service unit and CSV. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Reports\Presentation\Livewire\Concerns;
|
||||
|
||||
use App\Modules\Reports\Presentation\ReportFormat;
|
||||
|
||||
/**
|
||||
* The number, money and date formats of the report pages.
|
||||
*/
|
||||
trait FormatsReports
|
||||
{
|
||||
public function money(int $cents): string
|
||||
{
|
||||
return ReportFormat::money($cents);
|
||||
}
|
||||
|
||||
public function hours(int $quarters): string
|
||||
{
|
||||
return ReportFormat::hours($quarters);
|
||||
}
|
||||
|
||||
public function dateLabel(string $day): string
|
||||
{
|
||||
return ReportFormat::date($day);
|
||||
}
|
||||
|
||||
public function percent(float $ratio): string
|
||||
{
|
||||
return ReportFormat::percent($ratio);
|
||||
}
|
||||
}
|
||||
@@ -11,11 +11,13 @@ use Livewire\Attributes\Url;
|
||||
|
||||
/**
|
||||
* The period every report page covers, kept in the URL (alku, loppu), its
|
||||
* quick choices and the shared number formats. Without a valid period in
|
||||
* quick choices and the shared formats. Without a valid period in
|
||||
* the URL a page starts with the current month.
|
||||
*/
|
||||
trait ReportPage
|
||||
{
|
||||
use FormatsReports;
|
||||
|
||||
#[Url(as: 'alku', except: '')]
|
||||
public string $from = '';
|
||||
|
||||
@@ -82,21 +84,6 @@ trait ReportPage
|
||||
return $period === null ? '' : ReportFormat::period($period);
|
||||
}
|
||||
|
||||
public function money(int $cents): string
|
||||
{
|
||||
return ReportFormat::money($cents);
|
||||
}
|
||||
|
||||
public function hours(int $quarters): string
|
||||
{
|
||||
return ReportFormat::hours($quarters);
|
||||
}
|
||||
|
||||
public function dateLabel(string $day): string
|
||||
{
|
||||
return ReportFormat::date($day);
|
||||
}
|
||||
|
||||
/**
|
||||
* The CSV of the report with the filters shown.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user