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>
Profile and bank-card save paths now succeed with clear pending-admin copy instead of a validation error when automatic Jibit checks are disabled.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add inbound mande sync on customer import plus per-customer and bulk wallet-sync endpoints so previously linked accounts can catch up.
Co-authored-by: Cursor <cursoragent@cursor.com>
Port tables, APIs, and overdue cron from goldali, default the flag off, and keep customer routes behind auth.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Remove email/in-app paths and enforce sms action on create/update so
price alerts match the product requirement for SMS-only delivery.
Co-authored-by: Cursor <cursoragent@cursor.com>
- New `show_in_list` column to control product visibility in customer list
- New `tv_price_formula_enabled` + `tv_price_formula` columns for separate TV pricing
- FormulaPriceService: isTvEnabled() and calculateTvForProduct()
- listTvProducts applies TV formula overrides before returning
- filterProductData handles both new field sets
Co-authored-by: Cursor <cursoragent@cursor.com>
Alerts now bind to a product_id and share one evaluator; displayed gold within a rounding step discharges the full wallet.
Co-authored-by: Cursor <cursoragent@cursor.com>
Fetch public program-settings with 3-origin retry and no Laravel cache so
local DB settings stay in sync with the sold version.
Co-authored-by: Cursor <cursoragent@cursor.com>
Keep signed buy/sell extras so discounts work on quotes and orders, and ignore the nested user clone in this repo.
Co-authored-by: Cursor <cursoragent@cursor.com>
Drop unbounded TransactionsAdmin/customer dumps from dashboardMaster
and aggregate GT_products_report without loading all transactions.
Co-authored-by: Cursor <cursoragent@cursor.com>
Drop unbounded TransactionsAdmin/customer dumps from dashboardMaster
and aggregate GT_products_report without loading all transactions.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add /super/settings endpoints and API middleware that returns generic 503 while keeping unlock routes whitelisted.
Co-authored-by: Cursor <cursoragent@cursor.com>