2026-08-24 15:54:08 +03:30
|
|
|
from django.urls import path
|
|
|
|
|
|
|
|
|
|
from .api.views import (
|
2026-09-04 13:05:54 +03:30
|
|
|
AccountDetailView,
|
|
|
|
|
AccountListView,
|
|
|
|
|
BusinessDashboardView,
|
2026-08-24 15:54:08 +03:30
|
|
|
CustomerDetailView,
|
|
|
|
|
CustomerListCreateView,
|
2026-09-04 13:05:54 +03:30
|
|
|
CustomerStatementView,
|
|
|
|
|
InventorySummaryView,
|
|
|
|
|
InvoiceCancelView,
|
|
|
|
|
InvoiceDetailView,
|
|
|
|
|
InvoiceListCreateView,
|
|
|
|
|
InvoiceStatusView,
|
2026-08-24 15:54:08 +03:30
|
|
|
LedgerEntryDetailView,
|
|
|
|
|
LedgerEntryListCreateView,
|
2026-09-15 23:18:05 +03:30
|
|
|
LedgerBookArchiveView,
|
|
|
|
|
LedgerBookDetailView,
|
2026-09-04 13:05:54 +03:30
|
|
|
LedgerBookListView,
|
|
|
|
|
LedgerBookSummaryView,
|
|
|
|
|
LedgerExportView,
|
|
|
|
|
LedgerInstallmentDetailView,
|
|
|
|
|
LedgerInstallmentListCreateView,
|
|
|
|
|
OpenLedgerBookView,
|
2026-08-24 15:54:08 +03:30
|
|
|
ProductAdjustStockView,
|
|
|
|
|
ProductDetailView,
|
|
|
|
|
ProductListCreateView,
|
|
|
|
|
ProductMovementsView,
|
2026-09-04 13:05:54 +03:30
|
|
|
SubsidiaryLedgerView,
|
|
|
|
|
TransactionListView,
|
|
|
|
|
TrialBalanceView,
|
2026-08-24 15:54:08 +03:30
|
|
|
)
|
|
|
|
|
|
|
|
|
|
app_name = "bizapps"
|
|
|
|
|
urlpatterns = [
|
2026-09-04 13:05:54 +03:30
|
|
|
path("dashboard/", BusinessDashboardView.as_view(), name="dashboard"),
|
|
|
|
|
|
2026-08-24 15:54:08 +03:30
|
|
|
path("customers/", CustomerListCreateView.as_view(), name="customer-list"),
|
2026-09-04 13:05:54 +03:30
|
|
|
# قبل از <str:pk> نیاید، وگرنه "statement" بهعنوان pk تفسیر میشود.
|
|
|
|
|
path("customers/<str:pk>/statement/", CustomerStatementView.as_view(), name="customer-statement"),
|
2026-08-24 15:54:08 +03:30
|
|
|
path("customers/<str:pk>/", CustomerDetailView.as_view(), name="customer-detail"),
|
2026-09-04 13:05:54 +03:30
|
|
|
|
|
|
|
|
# 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"),
|
2026-09-15 23:18:05 +03:30
|
|
|
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"),
|
2026-09-04 13:05:54 +03:30
|
|
|
path("ledger/export/", LedgerExportView.as_view(), name="ledger-export"),
|
2026-08-24 15:54:08 +03:30
|
|
|
path("ledger/", LedgerEntryListCreateView.as_view(), name="ledger-list"),
|
2026-09-04 13:05:54 +03:30
|
|
|
path(
|
|
|
|
|
"ledger/<str:entry_id>/installments/",
|
|
|
|
|
LedgerInstallmentListCreateView.as_view(),
|
|
|
|
|
name="ledger-installment-list",
|
|
|
|
|
),
|
2026-08-24 15:54:08 +03:30
|
|
|
path("ledger/<str:pk>/", LedgerEntryDetailView.as_view(), name="ledger-detail"),
|
2026-09-04 13:05:54 +03:30
|
|
|
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"),
|
2026-08-24 15:54:08 +03:30
|
|
|
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"),
|
2026-09-04 13:05:54 +03:30
|
|
|
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"),
|
2026-08-24 15:54:08 +03:30
|
|
|
]
|