Skip to content

Commit 639cac1

Browse files
committed
[fix] don't fetch canceled billing in dashboard
1 parent f707ba5 commit 639cac1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

backend/app/Infrastructures/Queries/Domain/Billing/EloquentBillingQueryService.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function getSortBillingDateBillingsByUserIdsBillingDateGreaterThanTargetD
4343
->select('domain_billings.*')
4444
->whereIn('domains.user_id', $userIds)
4545
->where('domain_billings.is_fixed', false)
46+
->whereNull('domain_billings.canceled_at')
4647
->where('domain_billings.billing_date', '>=', $targetDatetime)
4748
->orderBy('domain_billings.billing_date')
4849
->take($take)
@@ -70,6 +71,7 @@ public function getOfFixedTotalAmountBetweenBillingDateByUserIdsStartDateEndDate
7071
->where('domain_billings.is_fixed', true)
7172
->groupBy('month')
7273
->whereBetween('domain_billings.billing_date', [$startDate->toDateString(), $endDate->toDateString()])
74+
->whereNull('domain_billings.canceled_at')
7375
->get()
7476
->keyBy('month')
7577
->toArray();

0 commit comments

Comments
 (0)