File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -135,13 +135,13 @@ export class WalletService {
135135 w.type AS payment_type,
136136 CASE
137137 WHEN w.type = 'PAYMENT' THEN SUM(p.total_amount)
138+ WHEN w.type = 'POINTS' THEN SUM(p.total_amount)
138139 ELSE 0
139140 END AS total_owed
140141 FROM
141142 winnings w
142143 LEFT JOIN payment p ON w.winning_id = p.winnings_id
143- AND w.type = 'PAYMENT'
144- AND p.payment_status IN ('OWED', 'ON_HOLD')
144+ AND p.payment_status IN ('OWED', 'ON_HOLD', 'CREDITED')
145145 AND p.installment_number = 1
146146 INNER JOIN latest_payment_version lpv ON p.winnings_id = lpv.winnings_id
147147 AND p.version = lpv.max_version
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export enum PaymentStatus {
1111 CANCELLED = 'CANCELLED' ,
1212 FAILED = 'FAILED' ,
1313 RETURNED = 'RETURNED' ,
14+ CREDITED = 'CREDITED' ,
1415}
1516
1617export class PaymentDetailDto {
You can’t perform that action at this time.
0 commit comments