fix price
This commit is contained in:
@@ -5,7 +5,6 @@ namespace App\Http\Controllers\Site;
|
||||
use App\Http\Controllers\Admin\PriceController;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Cnt;
|
||||
use App\Models\Setting;
|
||||
use App\Models\ConfigStatic;
|
||||
use App\Services\MontzarService;
|
||||
use App\Services\ZaarboxPriceService;
|
||||
@@ -248,13 +247,9 @@ class ReportController extends Controller
|
||||
| Settings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
$settings = Setting::whereIn('key', [
|
||||
'main_product_price',
|
||||
])->get();
|
||||
|
||||
$settingsMap = $settings->pluck('value', 'key');
|
||||
$show_last_price = $config->getBool('show_last_price', false);
|
||||
$main_product_price = $settingsMap->get('main_product_price');
|
||||
// main_product_price کلید سوپرادمین است — از ConfigService خوانده شود، نه جدول لوکال
|
||||
$main_product_price = $config->getBool('main_product_price', false);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -352,7 +347,7 @@ class ReportController extends Controller
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
$pr_product = null;
|
||||
if ($priceProvider === 'main_product' || $toBool($main_product_price)) {
|
||||
if ($priceProvider === 'main_product' || $main_product_price) {
|
||||
$pr_product = $config->mainProduct();
|
||||
}
|
||||
if ($pr_product && !$closed) {
|
||||
|
||||
Reference in New Issue
Block a user