mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 04:32:15 +01:00
Fix incorrect grouping by billable in export report
This commit is contained in:
@@ -37,21 +37,25 @@
|
|||||||
$duration = CarbonInterval::seconds($group2Entry['seconds']);
|
$duration = CarbonInterval::seconds($group2Entry['seconds']);
|
||||||
@endphp
|
@endphp
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
|
||||||
@if ($group === TimeEntryAggregationType::Billable)
|
|
||||||
{{ $group1Entry['key'] ? 'Yes' : 'No' }}
|
|
||||||
@else
|
|
||||||
{{ $group1Entry['description'] ?? $group1Entry['key'] ?? '-' }}
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
@if($exportFormat === ExportFormat::ODS || $exportFormat === ExportFormat::CSV)
|
@if($exportFormat === ExportFormat::ODS || $exportFormat === ExportFormat::CSV)
|
||||||
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
@if ($group === TimeEntryAggregationType::Billable)
|
||||||
@if ($subGroup === TimeEntryAggregationType::Billable)
|
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
||||||
|
{{ $group1Entry['key'] ? 'Yes' : 'No' }}
|
||||||
|
</td>
|
||||||
|
@else
|
||||||
|
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
||||||
|
{{ $group1Entry['description'] ?? $group1Entry['key'] ?? '-' }}
|
||||||
|
</td>
|
||||||
|
@endif
|
||||||
|
@if ($subGroup === TimeEntryAggregationType::Billable)
|
||||||
|
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
||||||
{{ $group2Entry['key'] ? 'Yes' : 'No' }}
|
{{ $group2Entry['key'] ? 'Yes' : 'No' }}
|
||||||
@else
|
</td>
|
||||||
|
@else
|
||||||
|
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
||||||
{{ $group2Entry['description'] ?? $group2Entry['key'] ?? '-' }}
|
{{ $group2Entry['description'] ?? $group2Entry['key'] ?? '-' }}
|
||||||
@endif
|
</td>
|
||||||
</td>
|
@endif
|
||||||
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
||||||
{{ $interval->format($duration) }}
|
{{ $interval->format($duration) }}
|
||||||
</td>
|
</td>
|
||||||
@@ -62,16 +66,24 @@
|
|||||||
{{ round(BigDecimal::ofUnscaledValue($group2Entry['cost'], 2)->toFloat(), 2) }}
|
{{ round(BigDecimal::ofUnscaledValue($group2Entry['cost'], 2)->toFloat(), 2) }}
|
||||||
</td>
|
</td>
|
||||||
@else
|
@else
|
||||||
@if ($subGroup === TimeEntryAggregationType::Billable)
|
@if ($group === TimeEntryAggregationType::Billable)
|
||||||
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
||||||
{{ $group1Entry['key'] ? 'Yes' : 'No' }}
|
{{ $group1Entry['key'] ? 'Yes' : 'No' }}
|
||||||
</td>
|
</td>
|
||||||
|
@else
|
||||||
|
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
||||||
|
{{ $group1Entry['description'] ?? $group1Entry['key'] ?? '-' }}
|
||||||
|
</td>
|
||||||
|
@endif
|
||||||
|
@if ($subGroup === TimeEntryAggregationType::Billable)
|
||||||
|
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
||||||
|
{{ $group2Entry['key'] ? 'Yes' : 'No' }}
|
||||||
|
</td>
|
||||||
@else
|
@else
|
||||||
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_STRING }}">
|
||||||
{{ $group2Entry['description'] ?? $group2Entry['key'] ?? '-' }}
|
{{ $group2Entry['description'] ?? $group2Entry['key'] ?? '-' }}
|
||||||
</td>
|
</td>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_NUMERIC }}"
|
<td style="border: 1px solid black;" data-type="{{ DataType::TYPE_NUMERIC }}"
|
||||||
data-format="[hh]:mm:ss">
|
data-format="[hh]:mm:ss">
|
||||||
{{ $duration->totalDays }}
|
{{ $duration->totalDays }}
|
||||||
|
|||||||
Reference in New Issue
Block a user