diff --git a/app/Http/Controllers/Site/ReportController.php b/app/Http/Controllers/Site/ReportController.php index 0e64d25..31476d8 100644 --- a/app/Http/Controllers/Site/ReportController.php +++ b/app/Http/Controllers/Site/ReportController.php @@ -512,13 +512,11 @@ class ReportController extends Controller | main_product / zaarbox: سفارش از Price::latest() — نمایش buy/sell همان منبع. */ if (in_array($priceProvider, ['main_product', 'zaarbox'], true) && !$closed) { - $storedPrice = $lastPrice ?? Price::latest()->first(); - if ($storedPrice && (float) $storedPrice->price > 0) { - $base = (float) $storedPrice->price; - $sell = $open_sell ? (int) ceil($base - $diff_sell) : 0; - $buy = $open_buy ? (int) ceil($base + $diff_buy) : 0; - $priceLast = (int) ceil($base + $diff_buy); - } + $base = (float) $priceValue; + + $sell = $open_sell ? (int) ceil($base - $diff_sell) : 0; + $buy = $open_buy ? (int) ceil($base + $diff_buy) : 0; + $priceLast = (int) ceil($base + $diff_buy); } if (!$closed && $priceValue > 0) {