fix(price): read last quote and daily extremes from the active provider
A stray montzar tick landed in the prices table, which stores no source, so the database_last fallback served a ~168M quote on a shop whose Zaarbox board was at ~217M. Last price and today's high/low now come from price_sync_logs filtered by price_provider, the database fallback no longer counts as today's price, and daily extremes reset when the provider changes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2334,7 +2334,7 @@ UPDATE `settings` SET `can_edit` = 1 WHERE `key` IN (
|
||||
|
||||
-- تنظیمات پیشرفته (can_edit=0) — فقط در پنل پیشرفته؛ ادمین دیپلوی ویرایش میکند
|
||||
UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN (
|
||||
'up_price', 'down_price', 'price_extreme_date',
|
||||
'up_price', 'down_price', 'price_extreme_date', 'price_extreme_source',
|
||||
'main_product', 'price_provider', 'zaarbox_api_url',
|
||||
'montzar_base_url', 'montzar_diff', 'montzar_closed', 'montzar_order_response',
|
||||
'montzar_token', 'montzar_live_price', 'montzar_last_product_log',
|
||||
@@ -2513,7 +2513,7 @@ UPDATE `settings` SET `can_edit` = 1 WHERE `key` IN (
|
||||
'do_send_liman'
|
||||
);
|
||||
UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN (
|
||||
'up_price', 'down_price', 'price_extreme_date',
|
||||
'up_price', 'down_price', 'price_extreme_date', 'price_extreme_source',
|
||||
'main_product', 'price_provider', 'zaarbox_api_url',
|
||||
'montzar_base_url', 'montzar_diff', 'montzar_closed', 'montzar_order_response',
|
||||
'montzar_token', 'montzar_live_price', 'montzar_last_product_log',
|
||||
|
||||
Reference in New Issue
Block a user