fix some bugs 5
This commit is contained in:
@@ -17,8 +17,12 @@ class OrderController extends Controller
|
||||
|
||||
$records = Order::with([
|
||||
'customer',
|
||||
'product:id,title,unit,metal_id,group_type,amount,trade_by_quantity,direct_price',
|
||||
'transactions.product:id,title,unit,metal_id,group_type,amount,trade_by_quantity,direct_price',
|
||||
'product' => static function ($q) {
|
||||
$q->withTrashed()->select(['id', 'title', 'unit', 'metal_id', 'group_type', 'amount', 'trade_by_quantity', 'direct_price']);
|
||||
},
|
||||
'transactions.product' => static function ($q) {
|
||||
$q->withTrashed()->select(['id', 'title', 'unit', 'metal_id', 'group_type', 'amount', 'trade_by_quantity', 'direct_price']);
|
||||
},
|
||||
]);
|
||||
TableEngine::create($records, $request->all())
|
||||
->initSearch(['customer.name'])
|
||||
@@ -44,8 +48,12 @@ class OrderController extends Controller
|
||||
|
||||
$records = Order::with([
|
||||
'customer',
|
||||
'product:id,title,unit,metal_id,group_type,amount,trade_by_quantity,direct_price',
|
||||
'transactions.product:id,title,unit,metal_id,group_type,amount,trade_by_quantity,direct_price',
|
||||
'product' => static function ($q) {
|
||||
$q->withTrashed()->select(['id', 'title', 'unit', 'metal_id', 'group_type', 'amount', 'trade_by_quantity', 'direct_price']);
|
||||
},
|
||||
'transactions.product' => static function ($q) {
|
||||
$q->withTrashed()->select(['id', 'title', 'unit', 'metal_id', 'group_type', 'amount', 'trade_by_quantity', 'direct_price']);
|
||||
},
|
||||
])->where('type',2);
|
||||
TableEngine::create($records, $request->all())
|
||||
->initSearch(['customer.name'])
|
||||
|
||||
Reference in New Issue
Block a user