TorbatYar/backend/services/accounting
Mortezakoohjani 7953e47f8b Ship accounting UX: Rial integers, auto doc numbers, reverse-and-edit, real reports, customers nav.
Wire DocumentNumberSequence allocator, ledger-based subsidiary/detail reports, and posted-voucher reopen flow without mock ops forms.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-26 15:52:06 +03:30
..
alembic Complete Accounting sidebar modules with ops CRUD, BFF proxy, and treasury APIs. 2026-07-24 16:10:06 +03:30
app Ship accounting UX: Rial integers, auto doc numbers, reverse-and-edit, real reports, customers nav. 2026-07-26 15:52:06 +03:30
scripts Ship enterprise Accounting FE/API with CRUD parity and production wiring. 2026-07-24 15:26:43 +03:30
alembic.ini Ship enterprise Accounting FE/API with CRUD parity and production wiring. 2026-07-24 15:26:43 +03:30
Dockerfile.dev Ship enterprise Accounting FE/API with CRUD parity and production wiring. 2026-07-24 15:26:43 +03:30
pytest.ini Ship enterprise Accounting FE/API with CRUD parity and production wiring. 2026-07-24 15:26:43 +03:30
README.md Ship enterprise Accounting FE/API with CRUD parity and production wiring. 2026-07-24 15:26:43 +03:30
requirements.txt Ship enterprise Accounting FE/API with CRUD parity and production wiring. 2026-07-24 15:26:43 +03:30

Accounting Service

Status: Active — Phases 5.1 through 5.11 implemented (v0.5.11.0).

Responsibilities

  • حسابداری ۴ سطحی، موتور ثبت مرکزی (ADR-010)
  • دفتر کل، خزانه، AR/AP، یکپارچه‌سازی فروش/خرید/موجودی
  • دارایی ثابت، حقوق و دستمزد
  • گزارش‌گیری مالی، انطباق و حاکمیت

API Groups

Prefix Phase
/api/v1/accounts 5.1
/api/v1/fiscal 5.1, 5.3
/api/v1/posting 5.2
/api/v1/ledger 5.3
/api/v1/treasury 5.4
/api/v1/ar-ap 5.5
/api/v1/sales-accounting 5.6
/api/v1/purchase-inventory 5.7
/api/v1/assets 5.8
/api/v1/payroll 5.9
/api/v1/reporting 5.10
/api/v1/compliance 5.11

Key Engines

Engine Phase Rule
PostingEngine 5.2 Sole creator of JournalEntry
BalanceEngine 5.3 Ledger balances
InventoryValuationEngine 5.7 Valuation separated from posting
DepreciationEngine 5.8 Asset depreciation
PayrollEngine 5.9 Salary calculation
FinancialReportEngine 5.10 Reports from posted data only
AuditFramework 5.11 Immutable audit trail

Run

cd backend/services/accounting
pytest -q   # 21 tests
uvicorn app.main:app --port 8002 --reload