fix wallet ui

This commit is contained in:
2026-06-26 22:19:51 +03:30
parent 1247a5ca07
commit 14d417d9ec
3 changed files with 20 additions and 3 deletions
@@ -490,7 +490,7 @@ class WalletController extends Controller
TableEngine::create($sumQuery, $request->all())
->initSearch(['customer.name']);
$sumRows = (clone $sumQuery)->with('product:id,metal_id')->get();
$sumRows = (clone $sumQuery)->with('product:id,metal_id,unit,amount,group_type,trade_by_quantity,direct_price,title')->get();
$metalBalances = $balanceService->buildWalletMetalSums($sumRows, $catalogMetalIds);
$totalGold = array_sum(array_column($metalBalances, 'gold'));
$totalGoldToCash = array_sum(array_column($metalBalances, 'goldToCash'));
@@ -504,7 +504,7 @@ class WalletController extends Controller
'metalBalances' => $metalBalances,
];
$records = Wallet::with(['customer', 'product:id,metal_id']);
$records = Wallet::with(['customer', 'product:id,metal_id,unit,amount,group_type,trade_by_quantity,direct_price,title']);
TableEngine::create($records, $request->all())
->initSearch(['customer.name'])
->select(['*'])