feat(purchase): restore in-review transfer lifecycle
This commit is contained in:
@@ -51,6 +51,7 @@ class UserPurchaseLimitService
|
||||
->whereIn('status', [
|
||||
Purchase::STATUS_CREATED,
|
||||
Purchase::STATUS_PENDING_PAYMENT,
|
||||
Purchase::STATUS_IN_REVIEW,
|
||||
Purchase::STATUS_PAID,
|
||||
])
|
||||
->when(
|
||||
@@ -68,6 +69,7 @@ class UserPurchaseLimitService
|
||||
->whereIn('status', [
|
||||
Purchase::STATUS_CREATED,
|
||||
Purchase::STATUS_PENDING_PAYMENT,
|
||||
Purchase::STATUS_IN_REVIEW,
|
||||
])
|
||||
->whereDoesntHave('items')
|
||||
->when(
|
||||
@@ -133,6 +135,7 @@ class UserPurchaseLimitService
|
||||
->whereIn('status', [
|
||||
Purchase::STATUS_CREATED,
|
||||
Purchase::STATUS_PENDING_PAYMENT,
|
||||
Purchase::STATUS_IN_REVIEW,
|
||||
Purchase::STATUS_PAID,
|
||||
]))
|
||||
->groupBy('source_catalog_item_id')
|
||||
@@ -143,7 +146,11 @@ class UserPurchaseLimitService
|
||||
->whereIn('catalog_item_id', $ids)
|
||||
->whereHas('cart.purchases', fn ($query) => $query
|
||||
->where('user_id', $userId)
|
||||
->whereIn('status', [Purchase::STATUS_CREATED, Purchase::STATUS_PENDING_PAYMENT])
|
||||
->whereIn('status', [
|
||||
Purchase::STATUS_CREATED,
|
||||
Purchase::STATUS_PENDING_PAYMENT,
|
||||
Purchase::STATUS_IN_REVIEW,
|
||||
])
|
||||
->whereDoesntHave('items'))
|
||||
->groupBy('catalog_item_id')
|
||||
->pluck('quantity', 'catalog_item_id');
|
||||
|
||||
Reference in New Issue
Block a user