818 lines
30 KiB
Python
818 lines
30 KiB
Python
from django.conf.urls import handler403,handler400,handler404,handler500
|
|
from django.urls import path
|
|
from django_tables2.export.export import TableExport
|
|
|
|
from . import views
|
|
|
|
|
|
urlpatterns = [
|
|
# main URLs
|
|
path("", views.HomeView.as_view(), name="home"),
|
|
path("welcome/", views.WelcomeView.as_view(), name="welcome"),
|
|
# Accounts URLs
|
|
# path("login/", allauth_views.LoginView.as_view(template_name="account/login.html"), name="account_login"),
|
|
# path(
|
|
# "logout/",
|
|
# allauth_views.LogoutView.as_view(template_name="account/logout.html"),
|
|
# name="account_logout",
|
|
# ),
|
|
# path('signup/', allauth_views.SignupView.as_view(template_name='account/signup.html'), name='account_signup'),
|
|
path("signup/", views.dealer_signup, name="account_signup"),
|
|
# path("otp", views.OTPView.as_view(), name="otp"),
|
|
# path(
|
|
# "password/change/", allauth_views.PasswordChangeView.as_view(template_name="account/password_change.html"), name="account_change_password",
|
|
# ),
|
|
# path(
|
|
# "password/reset/",
|
|
# allauth_views.PasswordResetView.as_view(
|
|
# template_name="account/password_reset.html"
|
|
# ),
|
|
# name="account_reset_password",
|
|
# ),
|
|
# path(
|
|
# "accounts/password/reset/done/",
|
|
# allauth_views.PasswordResetDoneView.as_view(
|
|
# template_name="account/password_reset_done.html"
|
|
# ),
|
|
# name="account_password_reset_done",
|
|
# ),
|
|
# path(
|
|
# "accounts/login/code/",
|
|
# allauth_views.RequestLoginCodeView.as_view(
|
|
# template_name="account/request_login_code.html"
|
|
# ),
|
|
# ),
|
|
# Tasks
|
|
|
|
path('tasks/', views.task_list, name='task_list'),
|
|
path('legal/', views.terms_and_privacy, name='terms_and_privacy'),
|
|
# path('tasks/<int:task_id>/detail/', views.task_detail, name='task_detail'),
|
|
# Dashboards
|
|
# path("user/<int:pk>/settings/", views.UserSettingsView.as_view(), name="user_settings"),
|
|
path("pricing/", views.pricing_page, name="pricing_page"),
|
|
path("submit_plan/", views.submit_plan, name="submit_plan"),
|
|
path('payment-callback/', views.payment_callback, name='payment_callback'),
|
|
#
|
|
path(
|
|
"dealers/activity/",
|
|
views.UserActivityLogListView.as_view(),
|
|
name="dealer_activity",
|
|
),
|
|
path("dealers/<slug:slug>/settings/", views.DealerSettingsView, name="dealer_settings"),
|
|
path("dealers/assign-car-makes/", views.assign_car_makes, name="assign_car_makes"),
|
|
path("dashboards/manager/", views.ManagerDashboard.as_view(), name="manager_dashboard"),
|
|
path("dashboards/sales/", views.SalesDashboard.as_view(), name="sales_dashboard"),
|
|
path("test/", views.TestView.as_view(), name="test"),
|
|
path('cars/inventory/table/', views.CarListViewTable.as_view(), name="car_table"),
|
|
path("export/format/", TableExport, name="export"),
|
|
# Dealer URLs
|
|
path("dealers/<slug:slug>/", views.DealerDetailView.as_view(), name="dealer_detail"),
|
|
path(
|
|
"dealers/<slug:slug>/update/",
|
|
views.DealerUpdateView.as_view(),
|
|
name="dealer_update",
|
|
),
|
|
# path('dealers/<int:pk>/delete/', views.DealerDeleteView.as_view(), name='dealer_delete'),
|
|
# CRM URLs
|
|
path(
|
|
"customers/create/", views.CustomerCreateView.as_view(), name="customer_create"
|
|
),
|
|
path("customers/", views.CustomerListView.as_view(), name="customer_list"),
|
|
path(
|
|
"customers/<slug:slug>/",
|
|
views.CustomerDetailView.as_view(),
|
|
name="customer_detail",
|
|
),
|
|
path(
|
|
"customers/<slug:slug>/add-note/",
|
|
views.add_note_to_customer,
|
|
name="add_note_to_customer",
|
|
),
|
|
path(
|
|
"customers/<slug:slug>/update/",
|
|
views.CustomerUpdateView.as_view(),
|
|
name="customer_update",
|
|
),
|
|
path("customers/<slug:slug>/delete/", views.delete_customer, name="customer_delete"),
|
|
path(
|
|
"customers/<slug:slug>/opportunities/create/",
|
|
views.OpportunityCreateView.as_view(),
|
|
name="create_opportunity",
|
|
),
|
|
path("crm/leads/create/", views.lead_create, name="lead_create"),
|
|
path(
|
|
"crm/leads/<slug:slug>/view/", views.LeadDetailView.as_view(), name="lead_detail"
|
|
),
|
|
path('update-lead-actions/', views.update_lead_actions, name='update_lead_actions'),
|
|
path('crm/leads/lead_tracking/', views.lead_tracking, name='lead_tracking'),
|
|
path('crm/leads/lead_view/', views.lead_view, name='lead_view'),
|
|
|
|
path("crm/leads/", views.LeadListView.as_view(), name="lead_list"),
|
|
path(
|
|
"crm/leads/<slug:slug>/update/", views.LeadUpdateView.as_view(), name="lead_update"
|
|
),
|
|
path("crm/leads/<slug:slug>/delete/", views.LeadDeleteView, name="lead_delete"),
|
|
path("crm/leads/<slug:slug>/lead-convert/", views.lead_convert, name="lead_convert"),
|
|
path("crm/leads/<int:pk>/delete-note/", views.delete_note, name="delete_note_to_lead"),
|
|
path(
|
|
"crm/<int:pk>/update-note/",
|
|
views.update_note,
|
|
name="update_note",
|
|
),
|
|
path(
|
|
"crm/<str:content_type>/<slug:slug>/add-note/",
|
|
views.add_note,
|
|
name="add_note",
|
|
),
|
|
path(
|
|
"crm/<int:pk>/update-task/",
|
|
views.update_task,
|
|
name="update_task",
|
|
),
|
|
path(
|
|
"crm/<str:content_type>/<slug:slug>/add-task/",
|
|
views.add_task,
|
|
name="add_task",
|
|
),
|
|
path(
|
|
"crm/<str:content_type>/<slug:slug>/add-activity/",
|
|
views.add_activity,
|
|
name="add_activity",
|
|
),
|
|
path(
|
|
"crm/leads/<slug:slug>/send_lead_email/",
|
|
views.send_lead_email,
|
|
name="send_lead_email",
|
|
),
|
|
path(
|
|
"crm/leads/<slug:slug>/send_lead_email/<int:email_pk>",
|
|
views.send_lead_email,
|
|
name="send_lead_email_with_template",
|
|
),
|
|
path(
|
|
"crm/leads/<slug:slug>/schedule/",
|
|
views.schedule_lead,
|
|
name="schedule_lead",
|
|
),
|
|
path(
|
|
"crm/leads/schedule/<int:pk>/cancel/",
|
|
views.schedule_cancel,
|
|
name="schedule_cancel",
|
|
),
|
|
path(
|
|
"crm/leads/<slug:slug>/transfer/",
|
|
views.lead_transfer,
|
|
name="lead_transfer",
|
|
),
|
|
path(
|
|
"crm/opportunities/<slug:slug>/add_note/",
|
|
views.add_note_to_opportunity,
|
|
name="add_note_to_opportunity",
|
|
),
|
|
path(
|
|
"crm/opportunities/create/",
|
|
views.OpportunityCreateView.as_view(),
|
|
name="opportunity_create",
|
|
),
|
|
path(
|
|
"crm/opportunities/<slug:slug>/create/",
|
|
views.OpportunityCreateView.as_view(),
|
|
name="lead_opportunity_create",
|
|
),
|
|
path(
|
|
"crm/opportunities/<slug:slug>/create/",
|
|
views.OpportunityCreateView.as_view(),
|
|
name="opportunity_create",
|
|
),
|
|
path(
|
|
"crm/opportunities/<slug:slug>/",
|
|
views.OpportunityDetailView.as_view(),
|
|
name="opportunity_detail",
|
|
),
|
|
path(
|
|
"crm/opportunities/<slug:slug>/edit/",
|
|
views.OpportunityUpdateView.as_view(),
|
|
name="update_opportunity",
|
|
),
|
|
path(
|
|
"crm/opportunities/",
|
|
views.OpportunityListView.as_view(),
|
|
name="opportunity_list",
|
|
),
|
|
path(
|
|
"crm/opportunities/<int:pk>/delete/",
|
|
views.delete_opportunity,
|
|
name="delete_opportunity",
|
|
),
|
|
path(
|
|
"crm/opportunities/<slug:slug>/opportunity_update_status/",
|
|
views.opportunity_update_status,
|
|
name="opportunity_update_status",
|
|
),
|
|
# path('crm/opportunities/<int:pk>/logs/', views.OpportunityLogsView.as_view(), name='opportunity_logs'),
|
|
# #######################
|
|
path('stream/', views.sse_stream, name='sse_stream'),
|
|
path('fetch/', views.fetch_notifications, name='fetch_notifications'),
|
|
|
|
# Mark single notification as read
|
|
path('<int:notification_id>/mark-read/', views.mark_notification_as_read, name='mark_notification_as_read'),
|
|
|
|
# Mark all notifications as read
|
|
path('mark-all-read/', views.mark_all_notifications_as_read, name='mark_all_notifications_as_read'),
|
|
|
|
# Notification history
|
|
path('history/', views.notifications_history, name='notifications_history'),
|
|
# #######################
|
|
path(
|
|
"crm/notifications/",
|
|
views.NotificationListView.as_view(),
|
|
name="notifications_history",
|
|
),
|
|
path(
|
|
"crm/fetch_notifications/",
|
|
views.fetch_notifications,
|
|
name="fetch_notifications",
|
|
),
|
|
path(
|
|
"crm/notifications/<int:pk>/mark_as_read/",
|
|
views.mark_notification_as_read,
|
|
name="mark_notification_as_read",
|
|
),
|
|
path('crm/calender/', views.EmployeeCalendarView.as_view(), name='calendar_list'),
|
|
# Vendor URLs
|
|
path("vendors/create/", views.VendorCreateView.as_view(), name="vendor_create"),
|
|
path("vendors", views.VendorListView.as_view(), name="vendor_list"),
|
|
path("vendors/<slug:slug>/", views.vendorDetailView, name="vendor_detail"),
|
|
path(
|
|
"vendors/<slug:slug>/update/",
|
|
views.VendorUpdateView.as_view(),
|
|
name="vendor_update",
|
|
),
|
|
path(
|
|
"vendors/<slug:slug>/delete/",
|
|
views.delete_vendor,
|
|
name="vendor_delete",
|
|
),
|
|
# Car URLs
|
|
path("cars/add/", views.CarCreateView.as_view(), name="car_add"),
|
|
path("cars/inventory/", views.CarInventory.as_view(), name="car_inventory_all"),
|
|
path(
|
|
"cars/inventory/<slug:make_id>/<slug:model_id>/<slug:trim_id>/",
|
|
views.CarInventory.as_view(),
|
|
name="car_inventory",
|
|
),
|
|
path("cars/inventory/stats", views.inventory_stats_view, name="inventory_stats"),
|
|
path("cars/inventory/list", views.CarListView.as_view(), name="car_list"),
|
|
path("cars/<slug:slug>/", views.CarDetailView.as_view(), name="car_detail"),
|
|
path("cars/<slug:slug>/history/", views.car_history, name="car_history"),
|
|
path("cars/<slug:slug>/update/", views.CarUpdateView.as_view(), name="car_update"),
|
|
path("cars/<slug:slug>/delete/", views.CarDeleteView.as_view(), name="car_delete"),
|
|
path(
|
|
"cars/<slug:slug>/finance/create/",
|
|
views.CarFinanceCreateView.as_view(),
|
|
name="car_finance_create",
|
|
),
|
|
path(
|
|
"cars/finance/<int:pk>/update/",
|
|
views.CarFinanceUpdateView.as_view(),
|
|
name="car_finance_update",
|
|
),
|
|
path("ajax/", views.AjaxHandlerView.as_view(), name="ajax_handler"),
|
|
path(
|
|
"cars/<slug:slug>/add-color/", views.CarColorCreate.as_view(), name="add_color"
|
|
),
|
|
path(
|
|
"cars/<slug:slug>/location/add/",
|
|
views.CarLocationCreateView.as_view(),
|
|
name="add_car_location",
|
|
),
|
|
path(
|
|
"cars/<slug:car_pk>/location/<int:pk>/update",
|
|
views.CarLocationUpdateView.as_view(),
|
|
name="update_car_location",
|
|
),
|
|
path(
|
|
"cars/<slug:slug>/location/update/",
|
|
views.CarTransferCreateView.as_view(),
|
|
name="transfer",
|
|
),
|
|
path(
|
|
"cars/<slug:slug>/location/detail/",
|
|
views.CarTransferDetailView.as_view(),
|
|
name="transfer_detail",
|
|
),
|
|
path(
|
|
"cars/<slug:slug>/location/<int:transfer_pk>/transfer_approve/",
|
|
views.car_transfer_approve,
|
|
name="transfer_confirm",
|
|
),
|
|
path(
|
|
"cars/<slug:slug>/location/<int:transfer_pk>/transfer_accept_reject/",
|
|
views.car_transfer_accept_reject,
|
|
name="transfer_accept_reject",
|
|
),
|
|
path(
|
|
"cars/<slug:slug>/location/<int:transfer_pk>/preview/",
|
|
views.CarTransferPreviewView,
|
|
name="transfer_preview",
|
|
),
|
|
path("cars/inventory/search/",
|
|
views.SearchCodeView.as_view(),
|
|
name="car_search"),
|
|
# path('cars/<int:car_pk>/colors/<int:pk>/update/',views.CarColorUpdateView.as_view(),name='color_update'),
|
|
path("cars/reserve/<slug:slug>/",
|
|
views.reserve_car_view,
|
|
name="reserve_car"),
|
|
path(
|
|
"reservations/<int:reservation_id>/",
|
|
views.manage_reservation,
|
|
name="reservations",
|
|
),
|
|
path(
|
|
"cars/<slug:slug>/add-custom-card/",
|
|
views.CustomCardCreateView.as_view(),
|
|
name="add_custom_card",
|
|
),
|
|
path('cars/<slug:slug>/add-registration/',
|
|
views.CarRegistrationCreateView.as_view(),
|
|
name='add_registration'),
|
|
|
|
#sales list
|
|
path(
|
|
'sales/list/',
|
|
views.sales_list_view,
|
|
name='sales_list',
|
|
),
|
|
# Sales URLs quotation_create
|
|
# path(
|
|
# "sales/quotations/create/",
|
|
# views.QuotationCreateView.as_view(),
|
|
# name="quotation_create",
|
|
# ),
|
|
# path(
|
|
# "sales/quotations/<int:pk>/",
|
|
# views.QuotationDetailView.as_view(),
|
|
# name="quotation_detail",
|
|
# ),
|
|
# path("sales/quotations/", views.QuotationListView.as_view(), name="quotation_list"),
|
|
# path(
|
|
# "sales/quotations/<int:pk>/confirm/",
|
|
# views.confirm_quotation,
|
|
# name="confirm_quotation",
|
|
# ),
|
|
# path(
|
|
# "sales/orders/detail/<int:order_id>/",
|
|
# views.SalesOrderDetailView.as_view(),
|
|
# name="order_detail",
|
|
# ),
|
|
# path(
|
|
# "quotation/<int:quotation_id>/pdf/",
|
|
# views.download_quotation_pdf,
|
|
# name="quotation_pdf",
|
|
# ),
|
|
# path("generate_invoice/<int:pk>/", views.generate_invoice, name="generate_invoice"),
|
|
# path(
|
|
# "sales/quotations/<int:pk>/mark_quotation/",
|
|
# views.mark_quotation,
|
|
# name="mark_quotation",
|
|
# ),
|
|
# path(
|
|
# "sales/quotations/<int:pk>/post_quotation/",views.post_quotation,
|
|
# name="post_quotation"
|
|
# ),
|
|
# path(
|
|
# "sales/quotations/<int:pk>/invoice_detail/",
|
|
# views.invoice_detail,
|
|
# name="invoice_detail",
|
|
# ),
|
|
# path("subscriptions", views.SubscriptionPlans.as_view(), name="subscriptions"),
|
|
# Payment URLs
|
|
# path('sales/quotations/<int:pk>/payment/', views.PaymentCreateView.as_view(), name='payment_create'),
|
|
# path(
|
|
# "sales/quotations/<int:pk>/payment/",
|
|
# views.payment_create,
|
|
# name="payment_create",
|
|
# ),
|
|
|
|
# Users URLs
|
|
path("user/", views.UserListView.as_view(), name="user_list"),
|
|
path("user/create/", views.UserCreateView.as_view(), name="user_create"),
|
|
path("user/<slug:slug>/", views.UserDetailView.as_view(), name="user_detail"),
|
|
path("user/<slug:slug>/groups/", views.UserGroupView, name="user_groups"),
|
|
path("user/<slug:slug>/update/", views.UserUpdateView.as_view(), name="user_update"),
|
|
path("user/<slug:slug>/confirm/", views.UserDeleteview, name="user_delete"),
|
|
# Group URLs
|
|
path("group/create/", views.GroupCreateView.as_view(), name="group_create"),
|
|
path("group/<int:pk>/update/", views.GroupUpdateView.as_view(), name="group_update"),
|
|
path("group/<int:pk>/", views.GroupDetailView.as_view(), name="group_detail"),
|
|
path("group/", views.GroupListView.as_view(), name="group_list"),
|
|
path("group/<int:pk>/confirm/", views.GroupDeleteview, name="group_delete"),
|
|
path("group/<int:pk>/permission/", views.GroupPermissionView, name="group_permission"),
|
|
# Organization URLs
|
|
path(
|
|
"organizations/create/",
|
|
views.OrganizationCreateView.as_view(),
|
|
name="organization_create",
|
|
),
|
|
path(
|
|
"organizations/", views.OrganizationListView.as_view(), name="organization_list"
|
|
),
|
|
path(
|
|
"organizations/<slug:slug>/",
|
|
views.OrganizationDetailView.as_view(),
|
|
name="organization_detail",
|
|
),
|
|
path(
|
|
"organizations/<slug:slug>/update/",
|
|
views.OrganizationUpdateView.as_view(),
|
|
name="organization_update",
|
|
),
|
|
path(
|
|
"organizations/<slug:slug>/delete/",
|
|
views.OrganizationDeleteView,
|
|
name="organization_delete",
|
|
),
|
|
# Representative URLs
|
|
path(
|
|
"representatives/",
|
|
views.RepresentativeListView.as_view(),
|
|
name="representative_list",
|
|
),
|
|
path(
|
|
"representatives/<int:pk>/",
|
|
views.RepresentativeDetailView.as_view(),
|
|
name="representative_detail",
|
|
),
|
|
path(
|
|
"representatives/create/",
|
|
views.RepresentativeCreateView.as_view(),
|
|
name="representative_create",
|
|
),
|
|
path(
|
|
"representatives/<int:pk>/update/",
|
|
views.RepresentativeUpdateView.as_view(),
|
|
name="representative_update",
|
|
),
|
|
path(
|
|
"representatives/<int:pk>/delete/",
|
|
views.RepresentativeDeleteView.as_view(),
|
|
name="representative_delete",
|
|
),
|
|
# Ledger URLS
|
|
# Ledger
|
|
path(
|
|
"ledgers/", views.LedgerModelListView.as_view(), name="ledger_list"
|
|
),
|
|
path(
|
|
"ledgers/create/", views.LedgerModelCreateView.as_view(), name="ledger_create"
|
|
),
|
|
path(
|
|
"ledgers/<slug:entity_slug>/detail/<uuid:pk>/", views.LedgerModelDetailView.as_view(), name="ledger_detail"
|
|
),
|
|
path(
|
|
"ledgers/<slug:entity_slug>/lock_all_journals/<uuid:pk>/", views.ledger_lock_all_journals, name="lock_all_journals"
|
|
),
|
|
path(
|
|
"ledgers/<slug:entity_slug>/unlock_all_journals/<uuid:pk>/", views.ledger_unlock_all_journals, name="unlock_all_journals"
|
|
),
|
|
path(
|
|
"ledgers/<slug:entity_slug>/post_all_journals/<uuid:pk>/", views.ledger_post_all_journals, name="post_all_journals"
|
|
),
|
|
path(
|
|
"ledgers/<slug:entity_slug>/unpost_all_journals/<uuid:pk>/", views.ledger_unpost_all_journals, name="unpost_all_journals"
|
|
),
|
|
# path(
|
|
# "ledgers/create/", views.LedgerModelCreateView.as_view(), name="ledger_create"
|
|
# ),
|
|
path(
|
|
"journalentries/<uuid:pk>/list/", views.JournalEntryListView.as_view(), name="journalentry_list"
|
|
),
|
|
path(
|
|
"journalentries/<uuid:pk>/create/", views.JournalEntryCreateView.as_view(), name="journalentry_create"
|
|
),
|
|
path(
|
|
"journalentries/<uuid:pk>/delete/", views.JournalEntryDeleteView, name="journalentry_delete"
|
|
),
|
|
path(
|
|
"journalentries/<uuid:pk>/transactions/",
|
|
views.JournalEntryTransactionsView,
|
|
name="journalentry_transactions",
|
|
),
|
|
path('journalentries/<slug:entity_slug>/<uuid:ledger_pk>/detail/<uuid:je_pk>/txs/',
|
|
views.JournalEntryModelTXSDetailView.as_view(),
|
|
name='journalentry_txs'),
|
|
# ledger actions
|
|
|
|
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/post/',
|
|
views.LedgerModelModelActionView.as_view(action_name='post'),
|
|
name='ledger-action-post'),
|
|
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/post-journal-entries/',
|
|
views.LedgerModelModelActionView.as_view(action_name='post_journal_entries'),
|
|
name='ledger-action-post-journal-entries'),
|
|
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/unpost/',
|
|
views.LedgerModelModelActionView.as_view(action_name='unpost'),
|
|
name='ledger-action-unpost'),
|
|
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/lock/',
|
|
views.LedgerModelModelActionView.as_view(action_name='lock'),
|
|
name='ledger-action-lock'),
|
|
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/lock-journal-entries/',
|
|
views.LedgerModelModelActionView.as_view(action_name='lock_journal_entries'),
|
|
name='ledger-action-lock-journal-entries'),
|
|
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/unlock/',
|
|
views.LedgerModelModelActionView.as_view(action_name='unlock'),
|
|
name='ledger-action-unlock'),
|
|
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/hide/',
|
|
views.LedgerModelModelActionView.as_view(action_name='hide'),
|
|
name='ledger-action-hide'),
|
|
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/unhide/',
|
|
views.LedgerModelModelActionView.as_view(action_name='unhide'),
|
|
name='ledger-action-unhide'),
|
|
path('ledgers/<slug:entity_slug>/delete/<uuid:ledger_pk>/',
|
|
views.LedgerModelDeleteView.as_view(),
|
|
name='ledger-delete'),
|
|
# Bank Account
|
|
path(
|
|
"bank_accounts/", views.BankAccountListView.as_view(), name="bank_account_list"
|
|
),
|
|
path(
|
|
"bank_accounts/<uuid:pk>/",
|
|
views.BankAccountDetailView.as_view(),
|
|
name="bank_account_detail",
|
|
),
|
|
path(
|
|
"bank_accounts/create/",
|
|
views.BankAccountCreateView.as_view(),
|
|
name="bank_account_create",
|
|
),
|
|
path(
|
|
"bank_accounts/<uuid:pk>/update/",
|
|
views.BankAccountUpdateView.as_view(),
|
|
name="bank_account_update",
|
|
),
|
|
path(
|
|
"bank_accounts/<uuid:pk>/delete/",
|
|
views.bank_account_delete,
|
|
name="bank_account_delete",
|
|
),
|
|
# Account
|
|
path("coa_accounts/", views.AccountListView.as_view(), name="account_list"),
|
|
path(
|
|
"coa_accounts/<uuid:pk>/",
|
|
views.AccountDetailView.as_view(),
|
|
name="account_detail",
|
|
),
|
|
path(
|
|
"coa_accounts/create/", views.AccountCreateView.as_view(), name="account_create"
|
|
),
|
|
path(
|
|
"coa_accounts/<uuid:pk>/update/",
|
|
views.AccountUpdateView.as_view(),
|
|
name="account_update",
|
|
),
|
|
path("coa_accounts/<uuid:pk>/delete/", views.account_delete, name="account_delete"),
|
|
# Estimate
|
|
path("sales/estimates/", views.EstimateListView.as_view(), name="estimate_list"),
|
|
path(
|
|
"sales/estimates/<uuid:pk>/",
|
|
views.EstimateDetailView.as_view(),
|
|
name="estimate_detail",
|
|
),
|
|
path("sales/estimates/create/", views.create_estimate, name="estimate_create"),
|
|
path("sales/estimates/create/<slug:slug>/", views.create_estimate, name="estimate_create_from_opportunity"),
|
|
path(
|
|
"sales/estimates/<uuid:pk>/estimate_mark_as/",
|
|
views.estimate_mark_as,
|
|
name="estimate_mark_as",
|
|
),
|
|
path(
|
|
"sales/estimates/<uuid:pk>/preview/",
|
|
views.EstimatePreviewView.as_view(),
|
|
name="estimate_preview",
|
|
),
|
|
path(
|
|
"sales/estimates/<uuid:pk>/payment_request/",
|
|
views.PaymentRequest.as_view(),
|
|
name="payment_request",
|
|
),
|
|
path(
|
|
"sales/estimates/<uuid:pk>/send_email", views.send_email_view, name="send_email"
|
|
),
|
|
path('sales/estimates/<uuid:pk>/sale_order/', views.create_sale_order, name='create_sale_order'),
|
|
path('sales/estimates/<uuid:pk>/sale_order/<int:order_pk>/details/', views.SaleOrderDetail.as_view(), name='sale_order_details'),
|
|
path('sales/estimates/<uuid:pk>/sale_order/preview/', views.preview_sale_order, name='preview_sale_order'),
|
|
|
|
# Invoice
|
|
path("sales/invoices/", views.InvoiceListView.as_view(), name="invoice_list"),
|
|
path(
|
|
"sales/invoices/<uuid:pk>/create/", views.invoice_create, name="invoice_create"
|
|
),
|
|
path(
|
|
"sales/invoices/<uuid:pk>/",
|
|
views.InvoiceDetailView.as_view(),
|
|
name="invoice_detail",
|
|
),
|
|
path(
|
|
"sales/invoices/<uuid:pk>/preview/",
|
|
views.InvoicePreviewView.as_view(),
|
|
name="invoice_preview",
|
|
),
|
|
path(
|
|
"sales/invoices/<uuid:pk>/invoice_mark_as/",
|
|
views.invoice_mark_as,
|
|
name="invoice_mark_as",
|
|
),
|
|
path(
|
|
"sales/invoices/<uuid:pk>/draft_invoice_update/",
|
|
views.DraftInvoiceModelUpdateFormView.as_view(),
|
|
name="draft_invoice_update",
|
|
),
|
|
path(
|
|
"sales/invoices/<uuid:pk>/approved_invoice_update/",
|
|
views.ApprovedInvoiceModelUpdateFormView.as_view(),
|
|
name="approved_invoice_update",
|
|
),
|
|
path(
|
|
"sales/invoices/<uuid:pk>/paid_invoice_update/",
|
|
views.PaidInvoiceModelUpdateFormView.as_view(),
|
|
name="paid_invoice_update",
|
|
),
|
|
# path('sales/estimates/<uuid:pk>/preview/', views.EstimatePreviewView.as_view(), name='estimate_preview'),
|
|
# path('send_email/<uuid:pk>', views.send_email, name='send_email'),
|
|
# Payment
|
|
path("sales/payments/", views.PaymentListView, name="payment_list"),
|
|
path(
|
|
"sales/payments/<uuid:pk>/create/",
|
|
views.PaymentCreateView,
|
|
name="payment_create",
|
|
),
|
|
# path("sales/payments/create/", views.PaymentCreateView, name="payment_create"),
|
|
path(
|
|
"sales/payments/<uuid:pk>/payment_details/",
|
|
views.PaymentDetailView,
|
|
name="payment_details",
|
|
),
|
|
path(
|
|
"sales/payments/<uuid:pk>/payment_mark_as_paid/",
|
|
views.payment_mark_as_paid,
|
|
name="payment_mark_as_paid",
|
|
),
|
|
# path('sales/payments/<uuid:pk>/update/', views.JournalEntryUpdateView.as_view(), name='payment_update'),
|
|
# path('sales/payments/<uuid:pk>/delete/', views.JournalEntryDeleteView.as_view(), name='payment_delete'),
|
|
# path('sales/payments/<uuid:pk>/preview/', views.JournalEntryPreviewView.as_view(), name='payment_preview'),
|
|
# # Journal
|
|
# path('sales/journal/<uuid:pk>/create/', views.JournalEntryCreateView.as_view(), name='journal_create'),
|
|
# Items
|
|
path(
|
|
"items/services/", views.ItemServiceListView.as_view(), name="item_service_list"
|
|
),
|
|
path(
|
|
"items/services/create/",
|
|
views.ItemServiceCreateView.as_view(),
|
|
name="item_service_create",
|
|
),
|
|
path(
|
|
"items/services/<int:pk>/update/",
|
|
views.ItemServiceUpdateView.as_view(),
|
|
name="item_service_update",
|
|
),
|
|
# Expanese
|
|
path(
|
|
"items/expeneses/",
|
|
views.ItemExpenseListView.as_view(),
|
|
name="item_expense_list",
|
|
),
|
|
path(
|
|
"items/expeneses/create/",
|
|
views.ItemExpenseCreateView.as_view(),
|
|
name="item_expense_create",
|
|
),
|
|
path(
|
|
"items/expeneses/<uuid:pk>/update/",
|
|
views.ItemExpenseUpdateView.as_view(),
|
|
name="item_expense_update",
|
|
),
|
|
# Bills
|
|
path("items/bills/", views.BillListView.as_view(), name="bill_list"),
|
|
path("items/bills/create/", views.bill_create, name="bill_create"),
|
|
path(
|
|
"items/bills/<uuid:pk>/bill_detail/",
|
|
views.BillDetailView.as_view(),
|
|
name="bill_detail",
|
|
),
|
|
path("items/bills/<uuid:pk>/delete/", views.BillDeleteView, name="bill_delete"),
|
|
path(
|
|
"items/bills/<uuid:pk>/in_review/",
|
|
views.InReviewBillView.as_view(),
|
|
name="in_review_bill",
|
|
),
|
|
path(
|
|
"items/bills/<uuid:pk>/in_approve/",
|
|
views.ApprovedBillModelView.as_view(),
|
|
name="in_approve_bill",
|
|
),
|
|
path(
|
|
"items/bills/<uuid:pk>/mark_as_approved/",
|
|
views.bill_mark_as_approved,
|
|
name="bill_mark_as_approved",
|
|
),
|
|
path(
|
|
"items/bills/<uuid:pk>/mark_as_paid/",
|
|
views.bill_mark_as_paid,
|
|
name="bill_mark_as_paid",
|
|
),
|
|
|
|
|
|
# orders
|
|
path("orders/", views.OrderListView.as_view(), name="order_list_view"),
|
|
|
|
# BALANCE SHEET Reports...
|
|
# Entities...
|
|
path('entity/<slug:entity_slug>/balance-sheet/',
|
|
views.BaseBalanceSheetRedirectView.as_view(),
|
|
name='entity-bs'),
|
|
path('entity/<slug:entity_slug>/balance-sheet/year/<int:year>/',
|
|
views.FiscalYearBalanceSheetViewBase.as_view(),
|
|
name='entity-bs-year'),
|
|
path('entity/<slug:entity_slug>/balance-sheet/quarter/<int:year>/<int:quarter>/',
|
|
views.QuarterlyBalanceSheetView.as_view(),
|
|
name='entity-bs-quarter'),
|
|
path('entity/<slug:entity_slug>/balance-sheet/month/<int:year>/<int:month>/',
|
|
views.MonthlyBalanceSheetView.as_view(),
|
|
name='entity-bs-month'),
|
|
path('entity/<slug:entity_slug>/balance-sheet/date/<int:year>/<int:month>/<int:day>/',
|
|
views.DateBalanceSheetView.as_view(),
|
|
name='entity-bs-date'),
|
|
# INCOME STATEMENT Reports ----
|
|
# Entity .....
|
|
path('entity/<slug:entity_slug>/income-statement/',
|
|
views.BaseIncomeStatementRedirectViewBase.as_view(),
|
|
name='entity-ic'),
|
|
path('entity/<slug:entity_slug>/income-statement/year/<int:year>/',
|
|
views.FiscalYearIncomeStatementViewBase.as_view(),
|
|
name='entity-ic-year'),
|
|
path('entity/<slug:entity_slug>/income-statement/quarter/<int:year>/<int:quarter>/',
|
|
views.QuarterlyIncomeStatementView.as_view(),
|
|
name='entity-ic-quarter'),
|
|
path('entity/<slug:entity_slug>/income-statement/month/<int:year>/<int:month>/',
|
|
views.MonthlyIncomeStatementView.as_view(),
|
|
name='entity-ic-month'),
|
|
path('entity/<slug:entity_slug>/income-statement/date/<int:year>/<int:month>/<int:day>/',
|
|
views.MonthlyIncomeStatementView.as_view(),
|
|
name='entity-ic-date'),
|
|
# CASH FLOW STATEMENTS...
|
|
# Entities...
|
|
path('entity/<slug:entity_slug>/cash-flow-statement/',
|
|
views.BaseCashFlowStatementRedirectViewBase.as_view(),
|
|
name='entity-cf'),
|
|
path('entity/<slug:entity_slug>/cash-flow-statement/year/<int:year>/',
|
|
views.FiscalYearCashFlowStatementViewBase.as_view(),
|
|
name='entity-cf-year'),
|
|
path('entity/<slug:entity_slug>/cash-flow-statement/quarter/<int:year>/<int:quarter>/',
|
|
views.QuarterlyCashFlowStatementView.as_view(),
|
|
name='entity-cf-quarter'),
|
|
path('entity/<slug:entity_slug>/cash-flow-statement/month/<int:year>/<int:month>/',
|
|
views.MonthlyCashFlowStatementView.as_view(),
|
|
name='entity-cf-month'),
|
|
path('entity/<slug:entity_slug>/cash-flow-statement/date/<int:year>/<int:month>/<int:day>/',
|
|
views.DateCashFlowStatementView.as_view(),
|
|
name='entity-cf-date'),
|
|
#Dashboard
|
|
# DASHBOARD Views...
|
|
path('<slug:entity_slug>/dashboard/',
|
|
views.EntityModelDetailHandlerViewBase.as_view(),
|
|
name='entity-dashboard'),
|
|
path('<slug:entity_slug>/dashboard/year/<int:year>/',
|
|
views.FiscalYearEntityModelDashboardView.as_view(),
|
|
name='entity-dashboard-year'),
|
|
path('<slug:entity_slug>/dashboard/quarter/<int:year>/<int:quarter>/',
|
|
views.QuarterlyEntityDashboardView.as_view(),
|
|
name='entity-dashboard-quarter'),
|
|
path('<slug:entity_slug>/dashboard/month/<int:year>/<int:month>/',
|
|
views.MonthlyEntityDashboardView.as_view(),
|
|
name='entity-dashboard-month'),
|
|
path('<slug:entity_slug>/dashboard/date/<int:year>/<int:month>/<int:day>/',
|
|
views.DateEntityDashboardView.as_view(),
|
|
name='entity-dashboard-date'),
|
|
#dashboard api
|
|
path('entity/<slug:entity_slug>/data/net-payables/',
|
|
views.PayableNetAPIView.as_view(),
|
|
name='entity-json-net-payables'),
|
|
path('entity/<slug:entity_slug>/data/net-receivables/',
|
|
views.ReceivableNetAPIView.as_view(),
|
|
name='entity-json-net-receivables'),
|
|
path('entity/<slug:entity_slug>/data/pnl/',
|
|
views.PnLAPIView.as_view(),
|
|
name='entity-json-pnl'),
|
|
# Admin Management...
|
|
path('management/', views.management_view, name='management'),
|
|
path('management/user_management/', views.user_management, name='user_management'),
|
|
path('management/<str:content_type>/<slug:slug>/activate_account/', views.activate_account, name='activate_account'),
|
|
path('management/<str:content_type>/<slug:slug>/permenant_delete_account/', views.permenant_delete_account, name='permenant_delete_account'),
|
|
]
|
|
|
|
|
|
handler404 = "inventory.views.custom_page_not_found_view"
|
|
handler500 = "inventory.views.custom_error_view"
|
|
handler403 = "inventory.views.custom_permission_denied_view"
|
|
handler400 = "inventory.views.custom_bad_request_view"
|