No description
Find a file
Ali Asadi 87d2788f95 FEATURE(wallet): backfill command for company-side wallet history
Several services (ipg, settlement, advertising, promotions) used to pass a
user wallet (rial/reward) as their company-side wallet because they had no
dedicated company account. They now each do. This adds a one-shot management
command that repoints the company side of historical Transaction rows onto
the new dedicated wallets and corrects the two affected Account.balance
running totals.

- apps/wallet/management/commands/backfill_company_wallets.py
  dry-run by default; --execute; --service <name>; --app-<svc> <uuid> override.
  Idempotent (filters on the old account), single atomic + select_for_update.
- docs/company_wallet_history_backfill.md — full write-up: model, mapping,
  balance-correction logic, consequences, run checklist, source commits.

Not yet run against staging/prod.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-02 15:32:18 +03:30
apps FEATURE(wallet): backfill command for company-side wallet history 2026-09-02 15:32:18 +03:30
docs FEATURE(wallet): backfill command for company-side wallet history 2026-09-02 15:32:18 +03:30
gooyal_accounts_client FIX(wallet): update account client 2026-04-20 12:16:50 +03:30
locale/fa/LC_MESSAGES fix(wallet): adding translations 2025-10-20 14:05:03 +03:30
log update admin panel calendar 2026-08-01 15:34:01 +03:30
main FEATURE(wallet): add DateTimeRangeFilter to panel admin 2026-04-27 13:02:37 +03:30
static update admin panel calendar 2026-08-01 15:34:01 +03:30
templates new Dockerfile 2026-02-07 12:30:46 +03:30
utils FIX(wallet): get_user_detailed_info 2026-04-20 12:21:58 +03:30
.gitignore better settings 2026-04-26 12:35:29 +03:30
client.py superapp details 2022-10-10 02:59:25 +03:30
Dockerfile run by docker via base:debian13 2026-05-02 13:16:27 +03:30
Dockerfile.build new Dockerfile 2026-02-07 12:25:05 +03:30
Dockerfile.run Dockerfile 2026-02-12 12:10:28 +03:30
manage.py better settings 2026-04-26 12:35:29 +03:30
readme.rst application apis 2025-03-11 13:24:50 +03:30
requirements.in FEATURE(wallet): add DateTimeRangeFilter to panel admin 2026-04-27 13:02:37 +03:30
requirements.txt FEATURE(wallet): add DateTimeRangeFilter to panel admin 2026-04-27 13:02:37 +03:30
run.sh better settings 2026-04-26 12:35:29 +03:30

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

دو ماهیت داریم:
 * کاربر
 * اپلیکیشن

در هر کدام بالانس در جایی مربوط به خود نگهداری می شود.

این موارد برای هر یک قابل تعریف است:

* مشاهده بالانس دیگران برای اپلیکیشن ؟؟
* مشاهده بالانس برای هر ماهیت
* لیست تراکنش ها برای هر ماهیت
* درخواست صدور فاکتور برای هر ماهیت
* پرداخت فاکتور توسط کاربر(برداشت از حساب در پرداخت امن)
* تایید انتقال پول به گیرنده (در پرداخت امن)
* واریز مستقیم پول توسط هر ماهیت به ماهیت دیگر
* برداشت پول از حساب هر ماهیت توست اپلیکیشن