323 Commits
Author SHA1 Message Date
safavimohadeseh78andCursor 487d899ded feat(admin): gift card codes usage report API
Expose codes-usage-report endpoint with per-code usage counts and filter-aware summary for admin reporting.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-10 11:48:23 +03:30
safavimohadeseh78 808c272e0c fix: resolve copper unit kilogram display and asset valuation calculations 2026-11-07 12:24:19 +03:30
safavimohadeseh78 7dd5304638 feat: shayegan inbound charges workflow and copper kilogram unit enforcement 2026-11-05 17:15:38 +03:30
safavimohadeseh78 9ec71efcbb change accounting-number 2026-11-04 11:56:53 +03:30
safavimohadeseh78andCursor 21da78943c feat(price): broadcast world copper and free-dollar ton and kilo quotes
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-03 19:57:36 +03:30
safavimohadeseh78andCursor 9769f2ffad feat(convert): let customers list and change pending requests
History is limited to the signed-in customer. Update and delete only apply while the request is still pending.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-03 13:04:08 +03:30
safavimohadeseh78andCursor 7b81adc096 fix(price-trigger): store the selected product instead of defaulting to gold
Only a real numeric product id is saved, and an empty alert title no longer falls back to gold.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-02 18:20:13 +03:30
safavimohadeseh78andCursor 97865a98fc fix(shayegan): register customers as floating detail jobs
Customer accounts are not sub-accounts of moin 12101. Send Job/Put with JobNumber moin plus customer id.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-02 13:05:53 +03:30
safavimohadeseh78andCursor 3b689a24f6 fix(shayegan): build the account number as moin plus customer id
Customer 530 with moin 12101 is sent as 12101530 again.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-02 11:49:47 +03:30
safavimohadeseh78andCursor 77a448e4e1 fix(shayegan): send the account number as customer id plus moin
Hesabgar kept generating a number when UpdateKind was 3. Insert with account type 1 and send 53012101.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-02 11:35:33 +03:30
safavimohadeseh78 8ccdea99c8 . 2026-11-02 11:21:36 +03:30
safavimohadeseh78andCursor 1cd6c61e0f fix(shayegan): send the customer detail code on account create
Hesabgar fails when it must invent the account number. Send the subsidiary code plus the customer id as AccountNumber.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-02 10:57:57 +03:30
safavimohadeseh78andCursor c96e5820fe feat(convert): text the customer when a convert request is approved or rejected
The message goes out after the result is saved, and a send failure does not undo the approval or rejection.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-01 13:44:48 +03:30
safavimohadeseh78 3f59af5a6d change copperConvertPage 2026-11-01 12:42:14 +03:30
safavimohadeseh78 9528056036 feat(shayegan): per-product item code and auto customer Account/Put 2026-10-28 16:51:47 +03:30
safavimohadeseh78 25ee47b473 digipay 2026-10-20 10:11:03 -04:00
safavimohadeseh78 f26fd1d86e changes of giftCard page 2026-10-20 12:09:20 +03:30
safavimohadeseh78 a5f3b3b4b3 . 2026-10-20 10:26:45 +03:30
safavimohadeseh78 b91dbccb3d final changes 2026-10-19 12:50:26 +03:30
safavimohadeseh78 5b431c64a6 set log for test shayegan 2026-10-17 10:28:01 +03:30
safavimohadeseh78andCursor a42261c06e feat(accounting): add Shayegan as fixed boursecu provider
Wire outbound Invoice/Document sync after confirmed ops, store sync status with timeout lock, and keep SQL credentials out of frontend responses.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 17:12:43 +03:30
mohmdsdg 5c955a06a3 fixed bug of transaction 2026-09-06 15:29:11 +03:30
mohmdsdgandCursor 00b23ac404 feat(tahesab,colleague): push app balance to Tahesab and always wait callback
Add admin decision to write app wallet onto Tahesab even when zero, always await colleague callback regardless of the wait switch, and SMS admins on colleague reject.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-05 22:30:56 +03:30
mohmdsdgandCursor 8cee34bfba feat: landing settings, instant withdraw deduct, and OTP site URL
Add has_landing plus landing_* deploy keys, deduct balance on withdraw request, keep app_url for SMS login links, and clarify Zarin rial wallet document titles.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-05 17:01:39 +03:30
mohmdsdgandCursor 1c7ea16300 fix(sse): send per-product trade_open from server trading hours
The list stream must tell clients whether each product is open so the device clock cannot reopen a closed shop.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-05 12:58:14 +03:30
mohmdsdgandCursor 166764d6b8 fix(sse): isolate price stream inbox per tenant
Shared Redis global inbox mixed other shops' product lists into this catalog and made the grid jump.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-05 10:58:43 +03:30
mohmdsdgandCursor f3eaf91559 feat(pargar): prune inbound logs via MySQL INSERT trigger
Run one-time overflow cleanup on migrate and keep mande/document success
rows capped at 2000 with an AFTER INSERT trigger, without cron or manual SQL.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 20:24:44 +03:30
mohmdsdgandCursor 3b7db1eb72 feat(tahesab): reset local success flags when remote docs were wiped
Clear tahesab_id on locally successful rows so they re-enter the send queue without touching panel customer codes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 13:43:16 +03:30
mohmdsdgandCursor d65bbce791 fix(settings): resolve superadmin domain from Origin before API host
Split frontends like my.goldarvin.ir were waiting on 404 retries for the API hostname, which made get_settings take ~16s.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 10:55:58 +03:30
mohmdsdgandCursor 7e6cd92df4 feat(pargar): cap inbound mande/document logs after insert
Keep the newest 2000 success rows per inbound type so dumps stop growing from Pargar webhooks, and store compact document payloads instead of full JSON.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 10:19:56 +03:30
mohmdsdgandCursor c802c67e0d feat(tahesab): register remaining panel customers after document sync
After pending docs finish, the same pump writes customers without a code into Tahesab. Inbound import is server-side; the admin only polls status.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 10:09:54 +03:30
mohmdsdgandCursor ff5430eceb fix(tahesab): register unlinked customers before sending documents
File cache cannot use Cache::lock, so docs for customers without a code always failed. Register first, put the customer name on the sanad, and surface the real error.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 09:25:18 +03:30
mohmdsdgandCursor bb52e4c35a fix(tahesab): show missing docs and create local table if absent
Pending list was empty because a missing tahesab table hid unsynced orders and charges. Create the table when needed and keep customer on each row.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 21:51:21 +03:30
mohmdsdgandCursor ad12de87c7 fix(tahesab): do not 500 pending-summary when tahesab table is missing
Gholaktala has no local tahesab table; count queries now return empty pending stats instead of QueryException.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 21:00:22 +03:30
mohmdsdgandCursor c5fd3b45fe feat(tahesab): pump pending documents slowly from admin, not schedule
Send leftover orders and charges one-by-one with a gap so Tahesab is not rate-limited, skip already-synced rows, and expose start/stop plus progress on existing status APIs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 20:48:14 +03:30
mohmdsdg 92d8f2e9b3 fix scadule for getting price 2026-09-02 18:14:32 +03:30
mohmdsdgandCursor 0b1e5c687b feat(order): wait for colleague callback before settling wallet
Keep cover orders pending until colleague sts 2/4/6 via callback or 35s poll. Nightly prices:prune also drops old log tables.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 15:55:03 +03:30
mohmdsdgandCursor 91a2dab440 fix(sms): keep charge deposit defaults and unlock referral bonus
Empty SuperAdmin chargeInfo was wiping sms_charge_* on header refresh.
Seed those keys only when empty, and move referral_bonus_amount to can_edit=1.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 21:38:19 +03:30
mohmdsdgandCursor e27a8ac397 fix(zarin): post rial wallet docs as cash via payment, not pooli buy-fi
Zarin kind=payment creates type 55 cash-only rows; it needs zarin_idbank as the counterpart account.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 16:51:16 +03:30
Mahdi 00610246ce fix(sms): parallel SA failover and clear sticky cache 2026-09-01 12:04:04 +03:30
mohmdsdgandCursor 0adcb5f9d5 Surface specific Jibit identity errors on profile update.
Map Shahkar mismatch, token, unreachable, and duplicate cases to clear Persian messages instead of a generic wait-for-admin toast.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 16:52:59 +03:30
mohmdsdgandCursor 5537cd7086 Retry Montzar orders after refreshing a stale quote.
When the partner rejects with a mazaneh-changed error, pull the live quote and submit once more so the customer buy can succeed without a page refresh.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 16:14:02 +03:30
mohmdsdgandCursor c5fd6608bf fix(tahesab): sync gateway and admin cash deposits as VKHBank charge
Route online wallet deposits to Tahesab/Zarin wallet() instead of leaving
staff to post gold buy docs; keep «شارژ حساب» in accounting notes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 14:58:20 +03:30
mohmdsdgandCursor 142cfd7661 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>
2026-08-31 09:45:37 +03:30
mohmdsdgandCursor f1fb3c1e74 Show Tahesab balance docs on conflict and label adjust txs for customers.
Preview and conflict paths now include recent wallet and Tahesab documents, and applied adjustments use a visible type/title/note so customers can see the sync document.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-30 21:18:24 +03:30
mohmdsdg c27cfabd22 added some feature for accounting 2026-08-30 20:47:26 +03:30
mohmdsdg 283f17561c added some feature for accounting and enhance performance for dashboard 2026-08-30 20:18:48 +03:30
mohmdsdgandCursor e059a4709e Apply Tahesab account balances to wallets with admin overwrite control.
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>
2026-08-30 14:16:36 +03:30
mohmdsdgandCursor 050bd26318 Add gold credit feature gated by SuperAdmin enable_gold_credit.
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>
2026-08-30 00:17:01 +03:30
mohmdsdg a8be3d499b fix superadmin settings cache 2026-08-29 23:47:58 +03:30