|
@@ -11,6 +11,7 @@ use App\DTO\CashFlowOverviewDTO;
|
11
|
11
|
use App\DTO\ReportDTO;
|
12
|
12
|
use App\Enums\Accounting\AccountCategory;
|
13
|
13
|
use App\Enums\Accounting\AccountType;
|
|
14
|
+use App\Enums\Accounting\TransactionType;
|
14
|
15
|
use App\Models\Accounting\Account;
|
15
|
16
|
use App\Models\Accounting\Transaction;
|
16
|
17
|
use App\Support\Column;
|
|
@@ -261,7 +262,11 @@ class ReportService
|
261
|
262
|
if ($transaction->transactionable_type === null || $transaction->is_payment) {
|
262
|
263
|
return [
|
263
|
264
|
'type' => 'transaction',
|
264
|
|
- 'action' => $transaction->type->isJournal() ? 'updateJournalTransaction' : 'updateTransaction',
|
|
265
|
+ 'action' => match ($transaction->type) {
|
|
266
|
+ TransactionType::Journal => 'updateJournalTransaction',
|
|
267
|
+ TransactionType::Transfer => 'updateTransfer',
|
|
268
|
+ default => 'updateTransaction',
|
|
269
|
+ },
|
265
|
270
|
'id' => $transaction->id,
|
266
|
271
|
];
|
267
|
272
|
}
|