Andrew Wallo 11 months ago
parent
commit
5ba8e26ae5

+ 1
- 1
app/Filament/Company/Pages/Reports/AccountTransactions.php View File

71
                 ->label('Credit')
71
                 ->label('Credit')
72
                 ->alignment(Alignment::Right),
72
                 ->alignment(Alignment::Right),
73
             Column::make('balance')
73
             Column::make('balance')
74
-                ->label('Balance')
74
+                ->label('Running Balance')
75
                 ->alignment(Alignment::Right),
75
                 ->alignment(Alignment::Right),
76
         ];
76
         ];
77
     }
77
     }

+ 2
- 2
app/Filament/Company/Pages/Reports/BalanceSheet.php View File

77
 
77
 
78
     public function exportCSV(): StreamedResponse
78
     public function exportCSV(): StreamedResponse
79
     {
79
     {
80
-        return $this->exportService->exportToCsv($this->company, $this->report, $this->getFilterState('asOfDate'));
80
+        return $this->exportService->exportToCsv($this->company, $this->report, endDate: $this->getFilterState('asOfDate'));
81
     }
81
     }
82
 
82
 
83
     public function exportPDF(): StreamedResponse
83
     public function exportPDF(): StreamedResponse
84
     {
84
     {
85
-        return $this->exportService->exportToPdf($this->company, $this->report, $this->getFilterState('asOfDate'));
85
+        return $this->exportService->exportToPdf($this->company, $this->report, endDate: $this->getFilterState('asOfDate'));
86
     }
86
     }
87
 }
87
 }

+ 6
- 6
composer.lock View File

497
         },
497
         },
498
         {
498
         {
499
             "name": "aws/aws-sdk-php",
499
             "name": "aws/aws-sdk-php",
500
-            "version": "3.324.6",
500
+            "version": "3.324.7",
501
             "source": {
501
             "source": {
502
                 "type": "git",
502
                 "type": "git",
503
                 "url": "https://github.com/aws/aws-sdk-php.git",
503
                 "url": "https://github.com/aws/aws-sdk-php.git",
504
-                "reference": "7412a44da62fd607efbaac4084e69d6621f29de1"
504
+                "reference": "c430d00e5ea6ce23739d6345f073fdd39e8ef0dc"
505
             },
505
             },
506
             "dist": {
506
             "dist": {
507
                 "type": "zip",
507
                 "type": "zip",
508
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7412a44da62fd607efbaac4084e69d6621f29de1",
509
-                "reference": "7412a44da62fd607efbaac4084e69d6621f29de1",
508
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c430d00e5ea6ce23739d6345f073fdd39e8ef0dc",
509
+                "reference": "c430d00e5ea6ce23739d6345f073fdd39e8ef0dc",
510
                 "shasum": ""
510
                 "shasum": ""
511
             },
511
             },
512
             "require": {
512
             "require": {
589
             "support": {
589
             "support": {
590
                 "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
590
                 "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
591
                 "issues": "https://github.com/aws/aws-sdk-php/issues",
591
                 "issues": "https://github.com/aws/aws-sdk-php/issues",
592
-                "source": "https://github.com/aws/aws-sdk-php/tree/3.324.6"
592
+                "source": "https://github.com/aws/aws-sdk-php/tree/3.324.7"
593
             },
593
             },
594
-            "time": "2024-10-18T18:06:33+00:00"
594
+            "time": "2024-10-21T18:06:52+00:00"
595
         },
595
         },
596
         {
596
         {
597
             "name": "aws/aws-sdk-php-laravel",
597
             "name": "aws/aws-sdk-php-laravel",

+ 6
- 6
package-lock.json View File

955
             }
955
             }
956
         },
956
         },
957
         "node_modules/browserslist": {
957
         "node_modules/browserslist": {
958
-            "version": "4.24.0",
959
-            "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz",
960
-            "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==",
958
+            "version": "4.24.2",
959
+            "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz",
960
+            "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==",
961
             "dev": true,
961
             "dev": true,
962
             "funding": [
962
             "funding": [
963
                 {
963
                 {
975
             ],
975
             ],
976
             "license": "MIT",
976
             "license": "MIT",
977
             "dependencies": {
977
             "dependencies": {
978
-                "caniuse-lite": "^1.0.30001663",
979
-                "electron-to-chromium": "^1.5.28",
978
+                "caniuse-lite": "^1.0.30001669",
979
+                "electron-to-chromium": "^1.5.41",
980
                 "node-releases": "^2.0.18",
980
                 "node-releases": "^2.0.18",
981
-                "update-browserslist-db": "^1.1.0"
981
+                "update-browserslist-db": "^1.1.1"
982
             },
982
             },
983
             "bin": {
983
             "bin": {
984
                 "browserslist": "cli.js"
984
                 "browserslist": "cli.js"

+ 3
- 3
resources/views/components/company/reports/account-transactions-report-pdf.blade.php View File

49
 
49
 
50
         .company-name {
50
         .company-name {
51
             font-size: 1.125rem;
51
             font-size: 1.125rem;
52
-            font-weight: 600;
52
+            font-weight: bold;
53
         }
53
         }
54
 
54
 
55
         .date-range {
55
         .date-range {
71
 
71
 
72
         .category-header-row > td {
72
         .category-header-row > td {
73
             background-color: #f3f4f6; /* Gray background for category names */
73
             background-color: #f3f4f6; /* Gray background for category names */
74
-            font-weight: 600;
74
+            font-weight: bold;
75
         }
75
         }
76
 
76
 
77
         .table-body tr {
77
         .table-body tr {
84
 
84
 
85
         .category-summary-row > td,
85
         .category-summary-row > td,
86
         .table-footer-row > td {
86
         .table-footer-row > td {
87
-            font-weight: 600;
87
+            font-weight: bold;
88
             background-color: #ffffff; /* White background for footer */
88
             background-color: #ffffff; /* White background for footer */
89
         }
89
         }
90
     </style>
90
     </style>

+ 48
- 3
resources/views/components/company/reports/report-pdf.blade.php View File

49
 
49
 
50
         .company-name {
50
         .company-name {
51
             font-size: 1.125rem;
51
             font-size: 1.125rem;
52
-            font-weight: 600;
52
+            font-weight: bold;
53
         }
53
         }
54
 
54
 
55
         .date-range {
55
         .date-range {
69
             border-bottom: 1px solid #d1d5db; /* Gray border for all rows */
69
             border-bottom: 1px solid #d1d5db; /* Gray border for all rows */
70
         }
70
         }
71
 
71
 
72
-        .category-header-row > td {
72
+        .category-header-row > td,
73
+        .type-header-row > td {
73
             background-color: #f3f4f6; /* Gray background for category names */
74
             background-color: #f3f4f6; /* Gray background for category names */
74
-            font-weight: 600;
75
+            font-weight: bold;
76
+        }
77
+
78
+        .type-header-row > td,
79
+        .type-data-row > td,
80
+        .type-summary-row > td {
81
+            padding-left: 1.5rem; /* Indentation for type rows */
75
         }
82
         }
76
 
83
 
77
         .table-body tr {
84
         .table-body tr {
83
         }
90
         }
84
 
91
 
85
         .category-summary-row > td,
92
         .category-summary-row > td,
93
+        .type-summary-row > td,
86
         .table-footer-row > td {
94
         .table-footer-row > td {
87
             font-weight: bold;
95
             font-weight: bold;
88
             background-color: #ffffff; /* White background for footer */
96
             background-color: #ffffff; /* White background for footer */
131
                 @endforeach
139
                 @endforeach
132
             </tr>
140
             </tr>
133
         @endforeach
141
         @endforeach
142
+
143
+        <!-- Category Types -->
144
+        @foreach($category->types ?? [] as $type)
145
+            <!-- Type Header -->
146
+            <tr class="type-header-row">
147
+                @foreach($type->header as $index => $header)
148
+                    <td class="{{ $report->getAlignmentClass($index) }}">
149
+                        {{ $header }}
150
+                    </td>
151
+                @endforeach
152
+            </tr>
153
+
154
+            <!-- Type Data -->
155
+            @foreach($type->data as $typeRow)
156
+                <tr class="type-data-row">
157
+                    @foreach($typeRow as $index => $cell)
158
+                        <td class="{{ $report->getAlignmentClass($index) }} {{ $index === 'account_name' ? 'whitespace-normal' : 'whitespace-nowrap' }}">
159
+                            @if(is_array($cell) && isset($cell['name']))
160
+                                {{ $cell['name'] }}
161
+                            @else
162
+                                {{ $cell }}
163
+                            @endif
164
+                        </td>
165
+                    @endforeach
166
+                </tr>
167
+            @endforeach
168
+
169
+            <!-- Type Summary -->
170
+            <tr class="type-summary-row">
171
+                @foreach($type->summary as $index => $cell)
172
+                    <td class="{{ $report->getAlignmentClass($index) }}">
173
+                        {{ $cell }}
174
+                    </td>
175
+                @endforeach
176
+            </tr>
177
+        @endforeach
178
+
134
         <tr class="category-summary-row">
179
         <tr class="category-summary-row">
135
             @foreach($category->summary as $index => $cell)
180
             @foreach($category->summary as $index => $cell)
136
                 <td class="{{ $report->getAlignmentClass($index) }}">
181
                 <td class="{{ $report->getAlignmentClass($index) }}">

Loading…
Cancel
Save