55 lines
2.8 KiB
Python
55 lines
2.8 KiB
Python
from django.urls import path
|
|
from . import views
|
|
|
|
urlpatterns = [
|
|
path('', views.index, name='index'),
|
|
path('inventory/', views.inventory, name='inventory'),
|
|
path('pos/', views.pos, name='pos'),
|
|
path('customers/', views.customers, name='customers'),
|
|
path('suppliers/', views.suppliers, name='suppliers'),
|
|
path('purchases/', views.purchases, name='purchases'),
|
|
path('reports/', views.reports, name='reports'),
|
|
path('settings/', views.settings_view, name='settings'),
|
|
|
|
# Invoices (Sales)
|
|
path('invoices/', views.invoice_list, name='invoices'), # Changed to 'invoices' for consistency with sidebar
|
|
path('invoices/create/', views.invoice_create, name='invoice_create'),
|
|
path('invoices/<int:pk>/', views.invoice_detail, name='invoice_detail'),
|
|
path('invoices/payment/<int:pk>/', views.add_sale_payment, name='add_sale_payment'),
|
|
path('invoices/delete/<int:pk>/', views.delete_sale, name='delete_sale'),
|
|
|
|
# Purchases (Invoices)
|
|
path('purchases/create/', views.purchase_create, name='purchase_create'),
|
|
path('purchases/<int:pk>/', views.purchase_detail, name='purchase_detail'),
|
|
path('purchases/payment/<int:pk>/', views.add_purchase_payment, name='add_purchase_payment'),
|
|
path('purchases/delete/<int:pk>/', views.delete_purchase, name='delete_purchase'),
|
|
|
|
# API / Actions
|
|
path('api/create-sale/', views.create_sale_api, name='create_sale_api'),
|
|
path('api/create-purchase/', views.create_purchase_api, name='create_purchase_api'),
|
|
|
|
# Customers
|
|
path('customers/add/', views.add_customer, name='add_customer'),
|
|
path('customers/edit/<int:pk>/', views.edit_customer, name='edit_customer'),
|
|
path('customers/delete/<int:pk>/', views.delete_customer, name='delete_customer'),
|
|
|
|
# Suppliers
|
|
path('suppliers/add/', views.add_supplier, name='add_supplier'),
|
|
path('suppliers/edit/<int:pk>/', views.edit_supplier, name='edit_supplier'),
|
|
path('suppliers/delete/<int:pk>/', views.delete_supplier, name='delete_supplier'),
|
|
|
|
# Inventory
|
|
path('inventory/add/', views.add_product, name='add_product'),
|
|
path('inventory/edit/<int:pk>/', views.edit_product, name='edit_product'),
|
|
path('inventory/delete/<int:pk>/', views.delete_product, name='delete_product'),
|
|
|
|
# Categories
|
|
path('inventory/category/add/', views.add_category, name='add_category'),
|
|
path('inventory/category/edit/<int:pk>/', views.edit_category, name='edit_category'),
|
|
path('inventory/category/delete/<int:pk>/', views.delete_category, name='delete_category'),
|
|
|
|
# Units
|
|
path('inventory/unit/add/', views.add_unit, name='add_unit'),
|
|
path('inventory/unit/edit/<int:pk>/', views.edit_unit, name='edit_unit'),
|
|
path('inventory/unit/delete/<int:pk>/', views.delete_unit, name='delete_unit'),
|
|
] |