fix profit value after each order
This commit is contained in:
@@ -158,9 +158,13 @@ class ProductController extends SuperController
|
||||
public function show($id){
|
||||
$customer = auth('customer')->user();
|
||||
$assetSummaryService = app(AssetSummaryService::class);
|
||||
$query = Product::/*with(['walletMy as wallet'])->*/findOrFail($id);
|
||||
$query = Product::with('file')->findOrFail($id);
|
||||
$wallet = $query->walletMy;
|
||||
|
||||
if ($query->relationLoaded('file') && $query->file) {
|
||||
$query->file->setAttribute('full_src', $query->file->src);
|
||||
}
|
||||
|
||||
// محصول متصل به کیف اصلی: موجودی مؤثر (کیف اصلی + legacy) — نه فقط ردیف product handle
|
||||
if (self::isMainWalletProduct((int) $id)) {
|
||||
$mainWalletGold = $assetSummaryService->productDisplayQuantity(
|
||||
|
||||
Reference in New Issue
Block a user