fix(settings): fee only from fee_service_charge_percentage; deploy:tenant
Remove service_charge_percentage alias and config/fee.php fallback (empty → 0). Move code-managed Montzar/price runtime keys to can_edit=1 in deploy SQL. Add settings:deploy and deploy:tenant artisan commands for server deploy. Advanced admin settings merge runtime keys from local DB; block manual edits. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -197,17 +197,15 @@ class ConfigService
|
||||
return max(0.0, (float) $this->get('montzar_diff', 0));
|
||||
}
|
||||
|
||||
/** درصد کارمزد سفارش — fee_service_charge_percentage، service_charge_percentage، config/fee.php */
|
||||
/** درصد کارمزد سفارش — فقط fee_service_charge_percentage؛ خالی = ۰ */
|
||||
public function orderServiceChargePercentage(): float
|
||||
{
|
||||
foreach (['fee_service_charge_percentage', 'service_charge_percentage'] as $key) {
|
||||
$raw = $this->getString($key, '');
|
||||
if ($raw !== '') {
|
||||
return $this->normalizeServiceChargeRatio((float) $raw);
|
||||
}
|
||||
$raw = trim($this->getString('fee_service_charge_percentage', ''));
|
||||
if ($raw === '') {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
return $this->normalizeServiceChargeRatio((float) config('fee.service_charge_percentage', 0));
|
||||
return $this->normalizeServiceChargeRatio((float) $raw);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user