Stale Redis overlay and SMS-origin-first fetch kept feature flags like customer_special_pricing false after SuperAdmin turned them on. Always fetch live and try adm.montzar.ir first.
Co-authored-by: Cursor <cursoragent@cursor.com>
Find orphan buy transactions or accept --gold/--transaction so wallet gold can still be stripped and cash recharged.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reuse an existing Zarin hesab instead of a second addhesab, and stop rial-locked orders from treating mesghal as per-gram.
Co-authored-by: Cursor <cursoragent@cursor.com>
Admin banner uploads were lost on refresh when an older const row or empty value column was served instead of the saved JSON.
Co-authored-by: Cursor <cursoragent@cursor.com>
Post Montzar-covered buy/sell to Zarin/Tahesab/Pargar using montzar_account_* settings, and harden public storage URL/MIME handling for uploads.
Co-authored-by: Cursor <cursoragent@cursor.com>
Store SSE payloads were Eloquent models, so listIdentity skipped them and file_id changes never republished; encode to plain arrays before hash/publish.
Co-authored-by: Cursor <cursoragent@cursor.com>
Image uploads were ignored by the live list hash, so the stream kept republishing a stale product payload and the theme reverted to the old photo.
Co-authored-by: Cursor <cursoragent@cursor.com>
Menu gates like enable_product_funds were missing from the public API, so the user app could not hide disabled features.
Co-authored-by: Cursor <cursoragent@cursor.com>
Stale prices rows were rejecting a valid ~220M partner quote against an old ~168M reference and locking the app on database_last.
Co-authored-by: Cursor <cursoragent@cursor.com>
Stored DB prices were treated as live quotes, and SuperAdmin overlay overwrote tenant keys like trading hours. Keep overlay to the 14 access flags and hide fallback prices when the panel says so.
Co-authored-by: Cursor <cursoragent@cursor.com>
Recompute home price display on save, broadcast settings over SSE, and keep last-price status in sync without a user refresh.
Co-authored-by: Cursor <cursoragent@cursor.com>
Schedule runs that hit cooldown or max-send limits now write a skipped row to automation_sends so admins can see why no SMS was sent.
Co-authored-by: Cursor <cursoragent@cursor.com>
Install per-module schedule:run cron from artisan, store sms/in_app send minutes, and match scheduled triggers at exact HH:mm Tehran time.
Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve display name from name_fa/name/name_en, skip duplicate lines, and support %نام_اپ placeholder in templates.
Co-authored-by: Cursor <cursoragent@cursor.com>
The name placeholder regex was matching the prefix of %نام_کوچک first, leaving _کوچک in the rendered message.
Co-authored-by: Cursor <cursoragent@cursor.com>
Enable immediate automation test runs without waiting for the scheduled hour, expose send history for debugging, and return all SuperAdmin overlay keys on refresh instead of only enable_automation.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use trading_hours_by_day for close_price gates, prefer public SuperAdmin fetch, and add refresh endpoint/command so stale last-good cache no longer keeps switches like enable_automation off.
Co-authored-by: Cursor <cursoragent@cursor.com>
Ignore limangold/payping seed URLs from backup or superadmin when filling;
keep any real local value untouched unless force-overwrite.
Co-authored-by: Cursor <cursoragent@cursor.com>
Customer /api/get_settings dropped price_provider because SuperAdmin
catalog did not return it. Merge SA values when present; otherwise keep
the tenant copy so the app still receives the key.
Co-authored-by: Cursor <cursoragent@cursor.com>
Blank template values must not wipe local can_edit=0 settings like
price_provider until SuperAdmin actually saves a value for that tenant.
Co-authored-by: Cursor <cursoragent@cursor.com>
Force can_edit=1 for Montzar/price runtime keys via settings:deploy
and settings:sync-runtime-can-edit, so tenant DB stays correct even
when an older deploy SQL is still on the server.
Co-authored-by: Cursor <cursoragent@cursor.com>
editable_only now includes RUNTIME_KEYS; normalize can_edit in responses.
UpdateConfig and montzar login persist can_edit=1. SQL override moved before COMMIT.
Co-authored-by: Cursor <cursoragent@cursor.com>