fix profit value after each order 2

This commit is contained in:
2026-07-18 17:37:41 +03:30
parent b66cd5e8f9
commit 285a159762
8 changed files with 512 additions and 25 deletions
@@ -17,6 +17,7 @@ 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',
]);
TableEngine::create($records, $request->all())
@@ -43,6 +44,7 @@ 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',
])->where('type',2);
TableEngine::create($records, $request->all())