|
@@ -1,147 +1,131 @@
|
1
|
1
|
<table class="w-full table-auto divide-y divide-gray-200 dark:divide-white/5">
|
2
|
|
- <x-company.tables.header :headers="$report->getHeaders()" :alignmentClass="[$report, 'getAlignmentClass']"/>
|
|
2
|
+ <x-company.tables.header :headers="$report->getHeaders()" :alignment-class="[$report, 'getAlignmentClass']"/>
|
3
|
3
|
@foreach($report->getCategories() as $accountCategory)
|
4
|
4
|
<tbody class="divide-y divide-gray-200 whitespace-nowrap dark:divide-white/5">
|
5
|
|
- <tr class="bg-gray-50 dark:bg-white/5">
|
6
|
|
- @foreach($accountCategory->header as $accountCategoryHeaderIndex => $accountCategoryHeaderCell)
|
7
|
|
- <x-filament-tables::cell class="{{ $report->getAlignmentClass($accountCategoryHeaderIndex) }}">
|
8
|
|
- <div class="px-3 py-2 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
|
9
|
|
- {{ $accountCategoryHeaderCell }}
|
10
|
|
- </div>
|
11
|
|
- </x-filament-tables::cell>
|
12
|
|
- @endforeach
|
13
|
|
- </tr>
|
|
5
|
+ <x-company.tables.category-header :category-headers="$accountCategory->header"
|
|
6
|
+ :alignment-class="[$report, 'getAlignmentClass']"/>
|
14
|
7
|
@foreach($accountCategory->data as $categoryAccount)
|
15
|
8
|
<tr>
|
16
|
9
|
@foreach($categoryAccount as $accountIndex => $categoryAccountCell)
|
17
|
|
- <x-filament-tables::cell class="{{ $report->getAlignmentClass($accountIndex) }}"
|
18
|
|
- style="padding-left: 1.5rem;">
|
19
|
|
- <div class="px-3 py-4 text-sm leading-6 text-gray-950 dark:text-white">
|
20
|
|
- @if(is_array($categoryAccountCell) && isset($categoryAccountCell['name']))
|
21
|
|
- @if($categoryAccountCell['name'] === 'Retained Earnings' && isset($categoryAccountCell['start_date']) && isset($categoryAccountCell['end_date']))
|
22
|
|
- <x-filament::link
|
23
|
|
- color="primary"
|
24
|
|
- target="_blank"
|
25
|
|
- icon="heroicon-o-arrow-top-right-on-square"
|
26
|
|
- :icon-position="\Filament\Support\Enums\IconPosition::After"
|
27
|
|
- :icon-size="\Filament\Support\Enums\IconSize::Small"
|
28
|
|
- href="{{ \App\Filament\Company\Pages\Reports\IncomeStatement::getUrl([
|
|
10
|
+ <x-company.tables.cell :alignment-class="$report->getAlignmentClass($accountIndex)"
|
|
11
|
+ indent="true">
|
|
12
|
+ @if(is_array($categoryAccountCell) && isset($categoryAccountCell['name']))
|
|
13
|
+ @if($categoryAccountCell['name'] === 'Retained Earnings' && isset($categoryAccountCell['start_date']) && isset($categoryAccountCell['end_date']))
|
|
14
|
+ <x-filament::link
|
|
15
|
+ color="primary"
|
|
16
|
+ target="_blank"
|
|
17
|
+ icon="heroicon-o-arrow-top-right-on-square"
|
|
18
|
+ :icon-position="\Filament\Support\Enums\IconPosition::After"
|
|
19
|
+ :icon-size="\Filament\Support\Enums\IconSize::Small"
|
|
20
|
+ href="{{ \App\Filament\Company\Pages\Reports\IncomeStatement::getUrl([
|
29
|
21
|
'startDate' => $categoryAccountCell['start_date'],
|
30
|
22
|
'endDate' => $categoryAccountCell['end_date']
|
31
|
23
|
]) }}"
|
32
|
|
- >
|
33
|
|
- {{ $categoryAccountCell['name'] }}
|
34
|
|
- </x-filament::link>
|
35
|
|
- @elseif(isset($categoryAccountCell['id']) && isset($categoryAccountCell['start_date']) && isset($categoryAccountCell['end_date']))
|
36
|
|
- <x-filament::link
|
37
|
|
- color="primary"
|
38
|
|
- target="_blank"
|
39
|
|
- icon="heroicon-o-arrow-top-right-on-square"
|
40
|
|
- :icon-position="\Filament\Support\Enums\IconPosition::After"
|
41
|
|
- :icon-size="\Filament\Support\Enums\IconSize::Small"
|
42
|
|
- href="{{ \App\Filament\Company\Pages\Reports\AccountTransactions::getUrl([
|
|
24
|
+ >
|
|
25
|
+ {{ $categoryAccountCell['name'] }}
|
|
26
|
+ </x-filament::link>
|
|
27
|
+ @elseif(isset($categoryAccountCell['id']) && isset($categoryAccountCell['start_date']) && isset($categoryAccountCell['end_date']))
|
|
28
|
+ <x-filament::link
|
|
29
|
+ color="primary"
|
|
30
|
+ target="_blank"
|
|
31
|
+ icon="heroicon-o-arrow-top-right-on-square"
|
|
32
|
+ :icon-position="\Filament\Support\Enums\IconPosition::After"
|
|
33
|
+ :icon-size="\Filament\Support\Enums\IconSize::Small"
|
|
34
|
+ href="{{ \App\Filament\Company\Pages\Reports\AccountTransactions::getUrl([
|
43
|
35
|
'startDate' => $categoryAccountCell['start_date'],
|
44
|
36
|
'endDate' => $categoryAccountCell['end_date'],
|
45
|
37
|
'selectedAccount' => $categoryAccountCell['id']
|
46
|
38
|
]) }}"
|
47
|
|
- >
|
48
|
|
- {{ $categoryAccountCell['name'] }}
|
49
|
|
- </x-filament::link>
|
50
|
|
- @else
|
|
39
|
+ >
|
51
|
40
|
{{ $categoryAccountCell['name'] }}
|
52
|
|
- @endif
|
|
41
|
+ </x-filament::link>
|
53
|
42
|
@else
|
54
|
|
- {{ $categoryAccountCell }}
|
|
43
|
+ {{ $categoryAccountCell['name'] }}
|
55
|
44
|
@endif
|
56
|
|
- </div>
|
57
|
|
- </x-filament-tables::cell>
|
|
45
|
+ @else
|
|
46
|
+ {{ $categoryAccountCell }}
|
|
47
|
+ @endif
|
|
48
|
+ </x-company.tables.cell>
|
58
|
49
|
@endforeach
|
59
|
50
|
</tr>
|
60
|
51
|
@endforeach
|
61
|
52
|
@foreach($accountCategory->types as $accountType)
|
62
|
53
|
<tr class="bg-gray-50 dark:bg-white/5">
|
63
|
54
|
@foreach($accountType->header as $accountTypeHeaderIndex => $accountTypeHeaderCell)
|
64
|
|
- <x-filament-tables::cell class="{{ $report->getAlignmentClass($accountTypeHeaderIndex) }}"
|
65
|
|
- style="padding-left: 1.5rem;">
|
66
|
|
- <div class="px-3 py-2 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
|
67
|
|
- {{ $accountTypeHeaderCell }}
|
68
|
|
- </div>
|
69
|
|
- </x-filament-tables::cell>
|
|
55
|
+ <x-company.tables.cell :alignment-class="$report->getAlignmentClass($accountTypeHeaderIndex)"
|
|
56
|
+ indent="true" bold="true">
|
|
57
|
+ {{ $accountTypeHeaderCell }}
|
|
58
|
+ </x-company.tables.cell>
|
70
|
59
|
@endforeach
|
71
|
60
|
</tr>
|
72
|
61
|
@foreach($accountType->data as $typeAccount)
|
73
|
62
|
<tr>
|
74
|
63
|
@foreach($typeAccount as $accountIndex => $typeAccountCell)
|
75
|
|
- <x-filament-tables::cell class="{{ $report->getAlignmentClass($accountIndex) }}"
|
76
|
|
- style="padding-left: 1.5rem;">
|
77
|
|
- <div class="px-3 py-4 text-sm leading-6 text-gray-950 dark:text-white">
|
78
|
|
- @if(is_array($typeAccountCell) && isset($typeAccountCell['name']))
|
79
|
|
- @if($typeAccountCell['name'] === 'Retained Earnings' && isset($typeAccountCell['start_date']) && isset($typeAccountCell['end_date']))
|
80
|
|
- <x-filament::link
|
81
|
|
- color="primary"
|
82
|
|
- target="_blank"
|
83
|
|
- icon="heroicon-o-arrow-top-right-on-square"
|
84
|
|
- :icon-position="\Filament\Support\Enums\IconPosition::After"
|
85
|
|
- :icon-size="\Filament\Support\Enums\IconSize::Small"
|
86
|
|
- href="{{ \App\Filament\Company\Pages\Reports\IncomeStatement::getUrl([
|
|
64
|
+ <x-company.tables.cell :alignment-class="$report->getAlignmentClass($accountIndex)"
|
|
65
|
+ indent="true">
|
|
66
|
+ @if(is_array($typeAccountCell) && isset($typeAccountCell['name']))
|
|
67
|
+ @if($typeAccountCell['name'] === 'Retained Earnings' && isset($typeAccountCell['start_date']) && isset($typeAccountCell['end_date']))
|
|
68
|
+ <x-filament::link
|
|
69
|
+ color="primary"
|
|
70
|
+ target="_blank"
|
|
71
|
+ icon="heroicon-o-arrow-top-right-on-square"
|
|
72
|
+ :icon-position="\Filament\Support\Enums\IconPosition::After"
|
|
73
|
+ :icon-size="\Filament\Support\Enums\IconSize::Small"
|
|
74
|
+ href="{{ \App\Filament\Company\Pages\Reports\IncomeStatement::getUrl([
|
87
|
75
|
'startDate' => $typeAccountCell['start_date'],
|
88
|
76
|
'endDate' => $typeAccountCell['end_date']
|
89
|
77
|
]) }}"
|
90
|
|
- >
|
91
|
|
- {{ $typeAccountCell['name'] }}
|
92
|
|
- </x-filament::link>
|
93
|
|
- @elseif(isset($typeAccountCell['id']) && isset($typeAccountCell['start_date']) && isset($typeAccountCell['end_date']))
|
94
|
|
- <x-filament::link
|
95
|
|
- color="primary"
|
96
|
|
- target="_blank"
|
97
|
|
- icon="heroicon-o-arrow-top-right-on-square"
|
98
|
|
- :icon-position="\Filament\Support\Enums\IconPosition::After"
|
99
|
|
- :icon-size="\Filament\Support\Enums\IconSize::Small"
|
100
|
|
- href="{{ \App\Filament\Company\Pages\Reports\AccountTransactions::getUrl([
|
|
78
|
+ >
|
|
79
|
+ {{ $typeAccountCell['name'] }}
|
|
80
|
+ </x-filament::link>
|
|
81
|
+ @elseif(isset($typeAccountCell['id']) && isset($typeAccountCell['start_date']) && isset($typeAccountCell['end_date']))
|
|
82
|
+ <x-filament::link
|
|
83
|
+ color="primary"
|
|
84
|
+ target="_blank"
|
|
85
|
+ icon="heroicon-o-arrow-top-right-on-square"
|
|
86
|
+ :icon-position="\Filament\Support\Enums\IconPosition::After"
|
|
87
|
+ :icon-size="\Filament\Support\Enums\IconSize::Small"
|
|
88
|
+ href="{{ \App\Filament\Company\Pages\Reports\AccountTransactions::getUrl([
|
101
|
89
|
'startDate' => $typeAccountCell['start_date'],
|
102
|
90
|
'endDate' => $typeAccountCell['end_date'],
|
103
|
91
|
'selectedAccount' => $typeAccountCell['id']
|
104
|
92
|
]) }}"
|
105
|
|
- >
|
106
|
|
- {{ $typeAccountCell['name'] }}
|
107
|
|
- </x-filament::link>
|
108
|
|
- @else
|
|
93
|
+ >
|
109
|
94
|
{{ $typeAccountCell['name'] }}
|
110
|
|
- @endif
|
|
95
|
+ </x-filament::link>
|
111
|
96
|
@else
|
112
|
|
- {{ $typeAccountCell }}
|
|
97
|
+ {{ $typeAccountCell['name'] }}
|
113
|
98
|
@endif
|
114
|
|
- </div>
|
115
|
|
- </x-filament-tables::cell>
|
|
99
|
+ @else
|
|
100
|
+ {{ $typeAccountCell }}
|
|
101
|
+ @endif
|
|
102
|
+ </x-company.tables.cell>
|
116
|
103
|
@endforeach
|
117
|
104
|
</tr>
|
118
|
105
|
@endforeach
|
119
|
106
|
<tr>
|
120
|
107
|
@foreach($accountType->summary as $accountTypeSummaryIndex => $accountTypeSummaryCell)
|
121
|
|
- <x-filament-tables::cell class="{{ $report->getAlignmentClass($accountTypeSummaryIndex) }}"
|
122
|
|
- style="padding-left: 1.5rem;">
|
123
|
|
- <div class="px-3 py-3 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
|
124
|
|
- {{ $accountTypeSummaryCell }}
|
125
|
|
- </div>
|
126
|
|
- </x-filament-tables::cell>
|
|
108
|
+ <x-company.tables.cell :alignment-class="$report->getAlignmentClass($accountTypeSummaryIndex)"
|
|
109
|
+ indent="true" bold="true">
|
|
110
|
+ {{ $accountTypeSummaryCell }}
|
|
111
|
+ </x-company.tables.cell>
|
127
|
112
|
@endforeach
|
128
|
113
|
</tr>
|
129
|
114
|
@endforeach
|
130
|
115
|
<tr>
|
131
|
116
|
@foreach($accountCategory->summary as $accountCategorySummaryIndex => $accountCategorySummaryCell)
|
132
|
|
- <x-filament-tables::cell class="{{ $report->getAlignmentClass($accountCategorySummaryIndex) }}">
|
133
|
|
- <div class="px-3 py-3 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
|
134
|
|
- {{ $accountCategorySummaryCell }}
|
135
|
|
- </div>
|
136
|
|
- </x-filament-tables::cell>
|
|
117
|
+ <x-company.tables.cell :alignment-class="$report->getAlignmentClass($accountCategorySummaryIndex)"
|
|
118
|
+ bold="true">
|
|
119
|
+ {{ $accountCategorySummaryCell }}
|
|
120
|
+ </x-company.tables.cell>
|
137
|
121
|
@endforeach
|
138
|
122
|
</tr>
|
139
|
123
|
<tr>
|
140
|
|
- <x-filament-tables::cell colspan="{{ count($report->getHeaders()) }}">
|
141
|
|
- <div class="px-3 py-3 leading-6 invisible">Hidden Text</div>
|
142
|
|
- </x-filament-tables::cell>
|
|
124
|
+ <td colspan="{{ count($report->getHeaders()) }}">
|
|
125
|
+ <div class="min-h-12"></div>
|
|
126
|
+ </td>
|
143
|
127
|
</tr>
|
144
|
128
|
</tbody>
|
145
|
129
|
@endforeach
|
146
|
|
- <x-company.tables.footer :totals="$report->getOverallTotals()" :alignmentClass="[$report, 'getAlignmentClass']"/>
|
|
130
|
+ <x-company.tables.footer :totals="$report->getOverallTotals()" :alignment-class="[$report, 'getAlignmentClass']"/>
|
147
|
131
|
</table>
|