added charge for all products

This commit is contained in:
2026-07-11 17:59:50 +03:30
parent 47a2f8e6bf
commit 0d78bcb750
3 changed files with 15 additions and 9 deletions
+6 -5
View File
@@ -24,12 +24,13 @@ class AssetSummaryService
) {
}
public function buildForCustomer(int $customerId, int $ownerType): array
public function buildForCustomer(int $customerId, int $ownerType, bool $includeInactiveProducts = false): array
{
$catalog = Product::query()
->where('active', 1)
->with('file')
->get();
$catalogQuery = Product::query()->with('file');
if (!$includeInactiveProducts) {
$catalogQuery->where('active', 1);
}
$catalog = $catalogQuery->get();
$userWallets = Wallet::query()
->with(['product.file'])