fix bug
This commit is contained in:
@@ -432,7 +432,7 @@ UPDATE `settings` SET `title_fa` = 'کارمزد رایگان (تعداد)', `ty
|
||||
UPDATE `settings` SET `title_fa` = 'کارمزد درصدی (legacy)', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'fee';
|
||||
UPDATE `settings` SET `title_fa` = 'کارمزد درصدی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'fee_service_charge_percentage';
|
||||
UPDATE `settings` SET `title_fa` = 'کارمزد درصدی (alias)', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'service_charge_percentage';
|
||||
UPDATE `settings` SET `title_fa` = 'کارمزد ریالی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'fee_cash';
|
||||
UPDATE `settings` SET `title_fa` = 'کارمزد ریالی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'fee_cash';
|
||||
UPDATE `settings` SET `title_fa` = 'اختلاف با قیمت واقعی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'fee_single';
|
||||
UPDATE `settings` SET `title_fa` = 'سود خرید', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'buy_fee';
|
||||
UPDATE `settings` SET `title_fa` = 'سود فروش', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'sell_fee';
|
||||
|
||||
@@ -387,7 +387,7 @@ SELECT 'sell_fee', '', 'سود فروش نمایش', 1, 1, NULL, 'number'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sell_fee' LIMIT 1);
|
||||
|
||||
INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`)
|
||||
SELECT 'fee_cash', '500000', 'کارمزد ریالی سفارش (legacy)', 1, 1, NULL, 'number'
|
||||
SELECT 'fee_cash', '500000', 'کارمزد ریالی سفارش (legacy)', 0, 1, NULL, 'number'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_cash' LIMIT 1);
|
||||
|
||||
INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`)
|
||||
@@ -816,6 +816,9 @@ WHERE `key` = 'send_to_tahesab' AND TRIM(COALESCE(`value`, '')) = '';
|
||||
-- is_store فقط از دیتابیس/دیپلوی — در پنل قابل ویرایش نیست
|
||||
UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'is_store';
|
||||
|
||||
-- fee_cash legacy — فقط از دیپلوی/SQL
|
||||
UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'fee_cash';
|
||||
|
||||
-- لوگو / PWA / favicon — فقط از دیپلوی؛ در پنل نمایش داده نمیشوند
|
||||
UPDATE `settings` SET `can_edit` = 0, `is_active` = 0
|
||||
WHERE `key` IN ('logo_login', 'logo_register', 'title_pwa', 'title_fav');
|
||||
|
||||
@@ -83,7 +83,7 @@ UPDATE `settings` SET `title_fa` = 'چت', `type` = 'switch',
|
||||
UPDATE `settings` SET `title_fa` = 'آدرس API', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'server_url';
|
||||
UPDATE `settings` SET `title_fa` = 'کلید اپ', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'key';
|
||||
UPDATE `settings` SET `title_fa` = 'توکن بات تلگرام', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'telegram_bot_token';
|
||||
UPDATE `settings` SET `title_fa` = 'کارمزد ریالی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'fee_cash';
|
||||
UPDATE `settings` SET `title_fa` = 'کارمزد ریالی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'fee_cash';
|
||||
UPDATE `settings` SET `title_fa` = 'اختلاف با قیمت واقعی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'fee_single';
|
||||
UPDATE `settings` SET `title_fa` = 'ارسال اسناد به تهحساب', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'send_to_tahesab';
|
||||
UPDATE `settings` SET `title_fa` = 'تعداد سفارش اول بدون کارمزد', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'fee_free';
|
||||
|
||||
@@ -277,7 +277,7 @@ WHERE `key` = 'buy_fee';
|
||||
UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'سود فروش نمایش'), `can_edit` = 1
|
||||
WHERE `key` = 'sell_fee';
|
||||
|
||||
UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'کارمزد ریالی سفارش (legacy)'), `can_edit` = 1
|
||||
UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'کارمزد ریالی سفارش (legacy)'), `can_edit` = 0
|
||||
WHERE `key` = 'fee_cash';
|
||||
|
||||
UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'درصد کارمزد سفارش'), `can_edit` = 1
|
||||
|
||||
Reference in New Issue
Block a user