fix some bugs 3

This commit is contained in:
2026-07-18 15:30:59 +03:30
parent f7edf4e2d3
commit 45f2d8bf70
5 changed files with 41 additions and 28 deletions
@@ -38,7 +38,10 @@ class OrderController extends Controller
$lastPrice = (float) (Price::latest('created_at')->value('price') ?? 0);
$goldAmount = app(WalletBalanceService::class)->effectiveMainWalletGold((int) $customerId);
$goldAmount = app(WalletBalanceService::class)->effectiveMainWalletGold(
(int) $customerId,
(int) ($customer->type ?? 2)
);
$orders = Order::query()
->where('customer_id', $customerId)
@@ -59,7 +59,7 @@ class ProductController extends SuperController
}
if ($representativeId !== null) {
$mainWalletGold = $balanceService->effectiveMainWalletGold((int) $user->id);
$mainWalletGold = $balanceService->effectiveMainWalletGold((int) $user->id, (int) $user->type);
}
$products = $products->filter(function ($product) use ($mainWalletProductIds, $representativeId) {