diff --git a/src/app/Http/Controllers/API/V4/WalletsController.php b/src/app/Http/Controllers/API/V4/WalletsController.php --- a/src/app/Http/Controllers/API/V4/WalletsController.php +++ b/src/app/Http/Controllers/API/V4/WalletsController.php @@ -248,7 +248,14 @@ $result = $result->map(function ($item) use ($isAdmin) { $amount = $item->amount; - if (in_array($item->type, [Transaction::WALLET_PENALTY, Transaction::WALLET_DEBIT])) { + $negatives = [ + Transaction::WALLET_CHARGEBACK, + Transaction::WALLET_DEBIT, + Transaction::WALLET_PENALTY, + Transaction::WALLET_REFUND, + ]; + + if (in_array($item->type, $negatives)) { $amount *= -1; }