Files
shopship/apps/bizapps/urls.py
T
2026-09-04 13:05:54 +03:30

76 lines
3.3 KiB
Python

from django.urls import path
from .api.views import (
AccountDetailView,
AccountListView,
BusinessDashboardView,
CustomerDetailView,
CustomerListCreateView,
CustomerStatementView,
InventorySummaryView,
InvoiceCancelView,
InvoiceDetailView,
InvoiceListCreateView,
InvoiceStatusView,
LedgerEntryDetailView,
LedgerEntryListCreateView,
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/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"),
]