Files
mobiniqow 831e656fa3 Fix OTP/SMS, ledger accounting, order tracking, and add reviews app
- Add MessageTemplate.runtime_field_labels so mobile's per-field
  execution-time labels are actually persisted (were silently dropped)
- Fix AdvanceOrderStageView reading the wrong extra-input key, and be
  honest about SMS send failures instead of always claiming success
- Add admin gift-gem SMS notification via Kavenegar
- Post real double-entry Transactions for plain (non-invoice) ledger
  entries so trial balance, the معین screen, and CSV/XLSX exports
  actually include everyday income/expense entries; backfill existing
  historical entries via data migration
- Rewrite CSV ledger export to produce an actual دفتر معین structure
  (per-account running balance) instead of a flat row dump
- Add invoice percent/promotional discounts, tax presets, ledger
  discount-percent handling, product SKU/category/expiry fields, and
  manual ledger-book archiving (replacing auto-archive on new book)
- Add reviews app (models, API, admin) for the comments/reviews feature
- Update tests for the above; fix two stale assertions left over from
  earlier work in this branch (معین sheet name, book auto-close)
2026-09-15 23:18:05 +03:30

80 lines
3.5 KiB
Python

from django.urls import path
from .api.views import (
AccountDetailView,
AccountListView,
BusinessDashboardView,
CustomerDetailView,
CustomerListCreateView,
CustomerStatementView,
InventorySummaryView,
InvoiceCancelView,
InvoiceDetailView,
InvoiceListCreateView,
InvoiceStatusView,
LedgerEntryDetailView,
LedgerEntryListCreateView,
LedgerBookArchiveView,
LedgerBookDetailView,
LedgerBookListView,
LedgerBookSummaryView,
LedgerExportView,
LedgerInstallmentDetailView,
LedgerInstallmentListCreateView,
OpenLedgerBookView,
ProductAdjustStockView,
ProductDetailView,
ProductListCreateView,
ProductMovementsView,
SubsidiaryLedgerView,
TransactionListView,
TrialBalanceView,
)
app_name = "bizapps"
urlpatterns = [
path("dashboard/", BusinessDashboardView.as_view(), name="dashboard"),
path("customers/", CustomerListCreateView.as_view(), name="customer-list"),
# قبل از <str:pk> نیاید، وگرنه "statement" به‌عنوان pk تفسیر می‌شود.
path("customers/<str:pk>/statement/", CustomerStatementView.as_view(), name="customer-statement"),
path("customers/<str:pk>/", CustomerDetailView.as_view(), name="customer-detail"),
# export قبل از <str:pk> ثبت شده تا مسیرها با هم تداخل نکنند.
path("ledger/books/", LedgerBookListView.as_view(), name="ledger-book-list"),
path("ledger/books/open/", OpenLedgerBookView.as_view(), name="ledger-book-open"),
path("ledger/books/<str:pk>/summary/", LedgerBookSummaryView.as_view(), name="ledger-book-summary"),
path("ledger/books/<str:pk>/archive/", LedgerBookArchiveView.as_view(), name="ledger-book-archive"),
path("ledger/books/<str:pk>/", LedgerBookDetailView.as_view(), name="ledger-book-detail"),
path("ledger/export/", LedgerExportView.as_view(), name="ledger-export"),
path("ledger/", LedgerEntryListCreateView.as_view(), name="ledger-list"),
path(
"ledger/<str:entry_id>/installments/",
LedgerInstallmentListCreateView.as_view(),
name="ledger-installment-list",
),
path("ledger/<str:pk>/", LedgerEntryDetailView.as_view(), name="ledger-detail"),
path(
"ledger-installments/<str:pk>/",
LedgerInstallmentDetailView.as_view(),
name="ledger-installment-detail",
),
path("accounts/", AccountListView.as_view(), name="account-list"),
path("accounts/<str:pk>/ledger/", SubsidiaryLedgerView.as_view(), name="account-subsidiary-ledger"),
path("accounts/<str:pk>/", AccountDetailView.as_view(), name="account-detail"),
path("trial-balance/", TrialBalanceView.as_view(), name="trial-balance"),
path("transactions/", TransactionListView.as_view(), name="transaction-list"),
path("products/summary/", InventorySummaryView.as_view(), name="product-summary"),
path("products/", ProductListCreateView.as_view(), name="product-list"),
path("products/<str:pk>/adjust/", ProductAdjustStockView.as_view(), name="product-adjust"),
path("products/<str:pk>/movements/", ProductMovementsView.as_view(), name="product-movements"),
path("products/<str:pk>/", ProductDetailView.as_view(), name="product-detail"),
path("invoices/", InvoiceListCreateView.as_view(), name="invoice-list"),
path("invoices/<str:pk>/status/", InvoiceStatusView.as_view(), name="invoice-status"),
path("invoices/<str:pk>/cancel/", InvoiceCancelView.as_view(), name="invoice-cancel"),
path("invoices/<str:pk>/", InvoiceDetailView.as_view(), name="invoice-detail"),
]