Replace enum

This commit is contained in:
James Cole
2025-01-03 09:09:15 +01:00
parent d009ce31ca
commit 36351a5dd9
36 changed files with 68 additions and 67 deletions

View File

@@ -84,7 +84,7 @@ class BoxController extends Controller
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class);
$collector->setRange($start, $end)
->setTypes([TransactionType::DEPOSIT])
->setTypes([TransactionTypeEnum::DEPOSIT->value])
;
$set = $collector->getExtractedJournals();

View File

@@ -242,7 +242,7 @@ class ReconcileController extends Controller
foreach ($array as $journal) {
$inverse = false;
if (TransactionType::DEPOSIT === $journal['transaction_type_type']) {
if (TransactionTypeEnum::DEPOSIT->value === $journal['transaction_type_type']) {
$inverse = true;
}
// transfer to this account? then positive amount:
@@ -251,7 +251,7 @@ class ReconcileController extends Controller
}
// opening balance into account? then positive amount:
if (TransactionType::OPENING_BALANCE === $journal['transaction_type_type']
if (TransactionTypeEnum::OPENING_BALANCE->value === $journal['transaction_type_type']
&& $account->id === $journal['destination_account_id']) {
$inverse = true;
}