Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117413394
D2215.1774829471.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
804 B
Referenced Files
None
Subscribers
None
D2215.1774829471.diff
View Options
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;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 30, 12:11 AM (3 d, 17 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18780198
Default Alt Text
D2215.1774829471.diff (804 B)
Attached To
Mode
D2215: If the refund amount is positive, we need to turn that frown upside down
Attached
Detach File
Event Timeline