fix some setting show

This commit is contained in:
2026-07-01 15:47:24 +03:30
parent 6aaadf5825
commit 235b835100
6 changed files with 87 additions and 256 deletions
@@ -80,12 +80,11 @@ class SingleOrderController extends Controller
$data['all_price'] = $latestPrice;
$data['price'] = $basePrice;
$data['price_id'] = $latestPrice?->id;
$feeCash = Setting::where('key', 'fee_cash')->first();
$feeServiceCharge = Setting::where('key', 'fee_service_charge_percentage')->first();
if (!$feeCash || !$feeServiceCharge) {
if (! $feeServiceCharge) {
throw new UnprocessableEntityHttpException('تنظیمات کارمزد یافت نشد.');
}
$data['difference'] = (float) $feeCash->value;
$data['difference'] = (float) (Setting::where('key', 'fee_single')->value('value') ?? config('fee.single', 0));
$data['service_charge_percentage'] = (float) $feeServiceCharge->value;
$fee_free = Setting::where('key', 'fee_free')->where('is_active', true)->value('value');