Commit Graph
293 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 885e51a79b feat: add deposit receipt upload and admin approval/rejection workflow with SMS 2026-11-08 13:26:28 +03:30
safavimohadeseh78 7dd5304638 feat: shayegan inbound charges workflow and copper kilogram unit enforcement 2026-11-05 17:15:38 +03:30
safavimohadeseh78andCursor e0216d35a6 fix(shayegan): return the document list in the shared table shape
The admin table expects rows and query from TableEngine instead of a custom page payload.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-02 13:24:01 +03:30
safavimohadeseh78 8ccdea99c8 . 2026-11-02 11:21:36 +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 755243bfa2 Administrator Access 2026-10-20 10:52:02 +03:30
safavimohadeseh78 a5f3b3b4b3 . 2026-10-20 10:26:45 +03:30
safavimohadeseh78 4d0f0f8c8d fix(auth): require verified identity for wallet and gift card 2026-10-20 09:10:01 +03:30
safavimohadeseh78 f1c68d955d . 2026-10-06 13:40:00 +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
safavimohadeseh78 698fbed805 change gift-card 2026-09-21 11:09:40 +03:30
safavimohadeseh78 ba2ac5aefe change the giftcard logic 2026-09-20 15:48:53 +03:30
safavimohadeseh78 aecbd5b3bf changes of giftcard 2026-09-12 10:12:43 +03:30
safavimohadeseh78 f3202ee89e feat(giftcard): redeem metal unit=2 into main wallet gold 2026-09-09 20:58:24 +03:30
safavimohadeseh78 0fa2b4d1f5 feat(giftcard): add customer giftcard/mine endpoint; fix admin/app password digit normalization 2026-09-09 16:57:20 +03:30
mohmdsdgandCursor c7ca410b31 fix(wallet): allow discharging leftover fractional count-product gold
Admin charge can now wipe the exact remaining balance when a count product has a leftover decimal amount.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-06 13:40:52 +03:30
mohmdsdgandCursor 4ef2de8583 fix(products): force direct_price=1 when saving a manual price
Keeps weight-based live enrich from replacing an explicit stored mid price.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-06 11:38:46 +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 e4e9c74872 fix(product): separate list and TV visibility toggles
Product active toggle now drives show_in_list; TV has its own endpoint and no longer requires active.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-05 10:16:35 +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 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 e9674d6571 fix some bugs 2026-09-02 11:38:57 +03:30
mohmdsdgandCursor b54f9f0527 fix(customer): save only profile fields on admin PUT
The list edit dumped the whole table row into update(); whitelist form and accounting fields, and skip hashing an empty password.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 11:18:59 +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 cae41e72b8 fix(search): match Arabic ye/kaf with Persian letters in admin search
Customer names stored with ي/ك were missed when typing ی/ک; fold both sides of LIKE.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 21:38:09 +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
mohmdsdgandCursor 102a8e1473 fix(zarin): send mazaneh on rial wallet docs so deposits are not rejected
Zarin pooli returns HTTP 400 when fi is empty; a quote within 25% of market is required, which still posts as خرید فی.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 15:45:11 +03:30
mohmdsdgandCursor f6118689e1 fix(zarin): post rial deposits without gold conversion and restore shop-side trade korf
Wallet docs were sending mazaneh as fi so Zarin turned cash deposits into خرید فی rows; customer buy/sell used the inverted korf mapping.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 18:34:40 +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
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
mohmdsdgandCursor 63195718a2 fix(settings): drop program-settings last-good cache and prefer montzar
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>
2026-08-29 22:39:08 +03:30
mohmdsdgandCursor c1e2bb5e9b fix zarin duplicate hesab and convert mesghal unit price to gram before cash/weight.
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>
2026-08-29 13:50:12 +03:30
mohmdsdg 6b5b490e2b added accounting failing handles 2026-08-27 16:16:20 +03:30
mohmdsdg acf229006e fix transaction bug 2026-08-27 14:01:34 +03:30
mohmdsdgandCursor 74cc50149f fix(const): return latest app_banners row and keep value_json in sync
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>
2026-08-26 18:01:22 +03:30
mohmdsdgandCursor 885ed33e6e feat(accounting): document colleague trades on configured accounts
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>
2026-08-26 16:59:27 +03:30
mohmdsdgandCursor 793c8cd9ed fix(settings): expose SuperAdmin feature flags to customer get_settings
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>
2026-08-25 14:19:22 +03:30