fix some bugs 5

This commit is contained in:
2026-07-21 22:23:09 +03:30
parent 55ce5e83b0
commit 3f8c47b1fc
6 changed files with 215 additions and 36 deletions
@@ -476,8 +476,12 @@ class WalletController extends Controller
$records = Transaction::with([
'customer',
'wallet.product:id,title,metal_id',
'product:id,title,metal_id,group_type,unit,amount,trade_by_quantity,direct_price',
'wallet.product' => static function ($q) {
$q->withTrashed()->select(['id', 'title', 'metal_id', 'group_type', 'unit', 'amount', 'trade_by_quantity', 'direct_price']);
},
'product' => static function ($q) {
$q->withTrashed()->select(['id', 'title', 'metal_id', 'group_type', 'unit', 'amount', 'trade_by_quantity', 'direct_price']);
},
])->whereNull('fund_id');
TableEngine::create($records, $request->all())
->initSearch(['order_id', 'customer.name'])