update1
This commit is contained in:
commit
8ab1c24173
1
.gitignore
vendored
1
.gitignore
vendored
@ -43,6 +43,7 @@ Makefile
|
|||||||
.idea/**/dynamic.xml
|
.idea/**/dynamic.xml
|
||||||
.idea/**/uiDesigner.xml
|
.idea/**/uiDesigner.xml
|
||||||
.idea/**/dbnavigator.xml
|
.idea/**/dbnavigator.xml
|
||||||
|
**/migrations/
|
||||||
|
|
||||||
# Gradle
|
# Gradle
|
||||||
.idea/**/gradle.xml
|
.idea/**/gradle.xml
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
from inventory.utils import get_user_type
|
||||||
|
|
||||||
|
|
||||||
def currency_context(request):
|
def currency_context(request):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
|
|
||||||
from inventory.services import get_model, decodevin
|
from inventory.services import get_make, get_model, decodevin
|
||||||
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
import requests
|
import requests
|
||||||
@ -24,35 +24,36 @@ class Command(BaseCommand):
|
|||||||
)
|
)
|
||||||
self.stdout.write(self.style.SUCCESS(f"Generated VIN: {vin}"))
|
self.stdout.write(self.style.SUCCESS(f"Generated VIN: {vin}"))
|
||||||
self.stdout.write(self.style.SUCCESS(f"Description: {description}"))
|
self.stdout.write(self.style.SUCCESS(f"Description: {description}"))
|
||||||
self.stdout.write(
|
# self.stdout.write(
|
||||||
self.style.SUCCESS(
|
# self.style.SUCCESS(
|
||||||
"####################################################################################################"
|
# "####################################################################################################"
|
||||||
)
|
# )
|
||||||
)
|
# )
|
||||||
self.stdout.write(
|
# self.stdout.write(
|
||||||
self.style.SUCCESS(
|
# self.style.SUCCESS(
|
||||||
"####################################################################################################"
|
# "####################################################################################################"
|
||||||
)
|
# )
|
||||||
)
|
# )
|
||||||
self.stdout.write(self.style.SUCCESS(f"Decoded VIN: {result}"))
|
# self.stdout.write(self.style.SUCCESS(f"Decoded VIN: {result}"))
|
||||||
make, model, year_model = result.values()
|
# make, model, year_model = result.values()
|
||||||
self.stdout.write(
|
# self.stdout.write(
|
||||||
self.style.SUCCESS(
|
# self.style.SUCCESS(
|
||||||
f"VIN: {vin} - Make {make} - Model {model} - Model Year {year_model}"
|
# f"VIN: {vin} - Make {make} - Model {model} - Model Year {year_model}"
|
||||||
)
|
# )
|
||||||
)
|
# )
|
||||||
m = get_model(model)
|
# make = get_make(make)
|
||||||
self.stdout.write(self.style.SUCCESS(f"Make: {m.id_car_make} - Model: {m}"))
|
# m = get_model(model,make)
|
||||||
self.stdout.write(
|
# self.stdout.write(self.style.SUCCESS(f"Make: {m.id_car_make} - Model: {m}"))
|
||||||
self.style.SUCCESS(
|
# self.stdout.write(
|
||||||
"####################################################################################################"
|
# self.style.SUCCESS(
|
||||||
)
|
# "####################################################################################################"
|
||||||
)
|
# )
|
||||||
self.stdout.write(
|
# )
|
||||||
self.style.SUCCESS(
|
# self.stdout.write(
|
||||||
"####################################################################################################"
|
# self.style.SUCCESS(
|
||||||
)
|
# "####################################################################################################"
|
||||||
)
|
# )
|
||||||
|
# )
|
||||||
|
|
||||||
def generate_vin(self):
|
def generate_vin(self):
|
||||||
# url = "https://www.vindecoder.org/vin-decoder"
|
# url = "https://www.vindecoder.org/vin-decoder"
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from django.http import Http404, HttpResponseForbidden
|
||||||
|
from django.shortcuts import redirect
|
||||||
from inventory import models
|
from inventory import models
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
||||||
@ -59,8 +62,11 @@ class InjectParamsMiddleware:
|
|||||||
|
|
||||||
def __call__(self, request):
|
def __call__(self, request):
|
||||||
try:
|
try:
|
||||||
# request.entity = request.user.dealer.entity
|
if request.user.is_authenticated:
|
||||||
request.dealer = get_user_type(request)
|
request.dealer = get_user_type(request)
|
||||||
|
request.entity = request.dealer.entity
|
||||||
|
else:
|
||||||
|
request.dealer = None
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
response = self.get_response(request)
|
response = self.get_response(request)
|
||||||
@ -107,3 +113,19 @@ class InjectDealerMiddleware:
|
|||||||
# if request.user.is_authenticated and not request.session.get('otp_verified', False):
|
# if request.user.is_authenticated and not request.session.get('otp_verified', False):
|
||||||
# return redirect(reverse('verify_otp'))
|
# return redirect(reverse('verify_otp'))
|
||||||
# return self.get_response(request)
|
# return self.get_response(request)
|
||||||
|
class DealerSlugMiddleware:
|
||||||
|
def __init__(self, get_response):
|
||||||
|
self.get_response = get_response
|
||||||
|
|
||||||
|
def __call__(self, request):
|
||||||
|
response = self.get_response(request)
|
||||||
|
return response
|
||||||
|
|
||||||
|
def process_view(self, request, view_func, view_args, view_kwargs):
|
||||||
|
if request.user.is_authenticated:
|
||||||
|
dealer = get_user_type(request)
|
||||||
|
if "dealer_slug" not in view_kwargs:
|
||||||
|
return redirect("home", dealer_slug=dealer.slug, **view_kwargs)
|
||||||
|
elif view_kwargs["dealer_slug"] != dealer.slug:
|
||||||
|
raise Http404("Dealer slug mismatch")
|
||||||
|
return None
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
|
from django.http import Http404
|
||||||
|
from django.shortcuts import redirect
|
||||||
from django.utils.translation import get_language
|
from django.utils.translation import get_language
|
||||||
|
|
||||||
|
from inventory.utils import get_user_type
|
||||||
|
|
||||||
|
|
||||||
class AddClassMixin:
|
class AddClassMixin:
|
||||||
"""
|
"""
|
||||||
@ -60,3 +64,13 @@ class LocalizedNameMixin:
|
|||||||
# return super().form_valid(form)
|
# return super().form_valid(form)
|
||||||
# else:
|
# else:
|
||||||
# return form.errors
|
# return form.errors
|
||||||
|
|
||||||
|
|
||||||
|
class DealerSlugMixin:
|
||||||
|
def dispatch(self, request, *args, **kwargs):
|
||||||
|
if request.user.is_authenticated:
|
||||||
|
if "dealer_slug" not in kwargs:
|
||||||
|
return redirect("home", dealer_slug=request.dealer.slug, **kwargs)
|
||||||
|
elif kwargs["dealer_slug"] != request.dealer.slug:
|
||||||
|
raise Http404("Dealer slug mismatch")
|
||||||
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
|||||||
@ -2482,16 +2482,22 @@ class SaleOrder(models.Model):
|
|||||||
item_data = self.invoice.get_itemtxs_data()
|
item_data = self.invoice.get_itemtxs_data()
|
||||||
if item_data:
|
if item_data:
|
||||||
return item_data
|
return item_data
|
||||||
return [] # Return an empty list if no invoice or no item data
|
return [] # Return an empty list if no invoice or no item data
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def cars(self):
|
def cars(self):
|
||||||
# Check if self.items is not empty before trying to iterate
|
# Check if self.items is not empty before trying to iterate
|
||||||
if self.items.exists() if hasattr(self.items, 'exists') else self.items: # Handle both QuerySet and list
|
if (
|
||||||
|
self.items.exists() if hasattr(self.items, "exists") else self.items
|
||||||
|
): # Handle both QuerySet and list
|
||||||
# Ensure x is an *instance* of ItemTransactionModel
|
# Ensure x is an *instance* of ItemTransactionModel
|
||||||
# item_model should be a ForeignKey to your CarModel within ItemTransactionModel
|
# item_model should be a ForeignKey to your CarModel within ItemTransactionModel
|
||||||
return [x.item_model.car for x in self.items if hasattr(x, 'item_model') and hasattr(x.item_model, 'car')]
|
return [
|
||||||
return [] # Return an empty list if no items or no associated cars
|
x.item_model.car
|
||||||
|
for x in self.items
|
||||||
|
if hasattr(x, "item_model") and hasattr(x.item_model, "car")
|
||||||
|
]
|
||||||
|
return [] # Return an empty list if no items or no associated cars
|
||||||
|
|
||||||
|
|
||||||
class CustomGroup(models.Model):
|
class CustomGroup(models.Model):
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
from typing import Union
|
from typing import Union
|
||||||
from random import randint
|
from random import randint
|
||||||
from django import template
|
from django import template
|
||||||
@ -442,6 +441,7 @@ def filter_by_role(accounts, role_prefix):
|
|||||||
@register.inclusion_tag("purchase_orders/tags/po_item_table.html", takes_context=True)
|
@register.inclusion_tag("purchase_orders/tags/po_item_table.html", takes_context=True)
|
||||||
def po_item_table1(context, queryset):
|
def po_item_table1(context, queryset):
|
||||||
return {
|
return {
|
||||||
|
"dealer_slug": context["view"].kwargs["dealer_slug"],
|
||||||
"entity_slug": context["entity_slug"],
|
"entity_slug": context["entity_slug"],
|
||||||
"po_model": context["po_model"],
|
"po_model": context["po_model"],
|
||||||
"po_item_list": queryset,
|
"po_item_list": queryset,
|
||||||
@ -459,6 +459,7 @@ def po_item_formset_table(context, po_model, itemtxs_formset):
|
|||||||
item_role="inventory"
|
item_role="inventory"
|
||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
|
"dealer_slug": context["view"].kwargs["dealer_slug"],
|
||||||
"entity_slug": context["view"].kwargs["entity_slug"],
|
"entity_slug": context["view"].kwargs["entity_slug"],
|
||||||
"po_model": po_model,
|
"po_model": po_model,
|
||||||
"itemtxs_formset": itemtxs_formset,
|
"itemtxs_formset": itemtxs_formset,
|
||||||
@ -468,6 +469,7 @@ def po_item_formset_table(context, po_model, itemtxs_formset):
|
|||||||
@register.inclusion_tag("bill/tags/bill_item_formset.html", takes_context=True)
|
@register.inclusion_tag("bill/tags/bill_item_formset.html", takes_context=True)
|
||||||
def bill_item_formset_table(context, item_formset):
|
def bill_item_formset_table(context, item_formset):
|
||||||
return {
|
return {
|
||||||
|
"dealer_slug": context["view"].kwargs["dealer_slug"],
|
||||||
"entity_slug": context["view"].kwargs["entity_slug"],
|
"entity_slug": context["view"].kwargs["entity_slug"],
|
||||||
"bill_pk": context["view"].kwargs["bill_pk"],
|
"bill_pk": context["view"].kwargs["bill_pk"],
|
||||||
"total_amount__sum": context["total_amount__sum"],
|
"total_amount__sum": context["total_amount__sum"],
|
||||||
@ -490,15 +492,15 @@ def transactions_table(
|
|||||||
qs = object_type.get_transaction_queryset(annotated=True)
|
qs = object_type.get_transaction_queryset(annotated=True)
|
||||||
transaction_model_qs = qs.annotate(
|
transaction_model_qs = qs.annotate(
|
||||||
debit_credit_sort_order=Case(
|
debit_credit_sort_order=Case(
|
||||||
When(tx_type='debit', then=Value(0)), # Debits will get sort order 0
|
When(tx_type="debit", then=Value(0)), # Debits will get sort order 0
|
||||||
When(tx_type='credit', then=Value(1)), # Credits will get sort order 1
|
When(tx_type="credit", then=Value(1)), # Credits will get sort order 1
|
||||||
default=Value(2), # Fallback for any other tx_type, if applicable
|
default=Value(2), # Fallback for any other tx_type, if applicable
|
||||||
output_field=IntegerField()
|
output_field=IntegerField(),
|
||||||
)
|
)
|
||||||
).order_by(
|
).order_by(
|
||||||
'-timestamp', # Primary sort: chronological (oldest first)
|
"-timestamp", # Primary sort: chronological (oldest first)
|
||||||
'-debit_credit_sort_order', # Secondary sort: Debits (0) before Credits (1)
|
"-debit_credit_sort_order", # Secondary sort: Debits (0) before Credits (1)
|
||||||
'pk' # Optional: Tie-breaker for consistent order
|
"pk", # Optional: Tie-breaker for consistent order
|
||||||
)
|
)
|
||||||
elif isinstance(object_type, InvoiceModel):
|
elif isinstance(object_type, InvoiceModel):
|
||||||
transaction_model_qs = object_type.get_transaction_queryset(
|
transaction_model_qs = object_type.get_transaction_queryset(
|
||||||
|
|||||||
@ -1,13 +1,15 @@
|
|||||||
from django.conf.urls import handler403, handler400, handler404, handler500
|
from inventory.utils import get_user_type
|
||||||
from django.urls import path
|
|
||||||
from django_tables2.export.export import TableExport
|
|
||||||
|
|
||||||
from . import views
|
from . import views
|
||||||
|
from django.urls import path
|
||||||
|
from django.urls import reverse_lazy
|
||||||
|
from django.views.generic import RedirectView
|
||||||
|
from django_tables2.export.export import TableExport
|
||||||
|
from django.conf.urls import handler403, handler400, handler404, handler500
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
# main URLs
|
# main URLs
|
||||||
path("", views.HomeView.as_view(), name="home"),
|
path("", views.HomeView.as_view(), name="home"),
|
||||||
|
path("<slug:dealer_slug>/", views.HomeView.as_view(), name="home"),
|
||||||
path("welcome/", views.WelcomeView.as_view(), name="welcome"),
|
path("welcome/", views.WelcomeView.as_view(), name="welcome"),
|
||||||
# Accounts URLs
|
# Accounts URLs
|
||||||
# path("login/", allauth_views.LoginView.as_view(template_name="account/login.html"), name="account_login"),
|
# path("login/", allauth_views.LoginView.as_view(template_name="account/login.html"), name="account_login"),
|
||||||
@ -277,28 +279,56 @@ urlpatterns = [
|
|||||||
name="vendor_delete",
|
name="vendor_delete",
|
||||||
),
|
),
|
||||||
# Car URLs
|
# Car URLs
|
||||||
path("cars/upload_cars/", views.upload_cars, name="upload_cars"),
|
path("<slug:dealer_slug>/cars/upload_cars/", views.upload_cars, name="upload_cars"),
|
||||||
path("cars/<uuid:pk>/upload_cars/", views.upload_cars, name="upload_cars"),
|
|
||||||
path("cars/add/", views.CarCreateView.as_view(), name="car_add"),
|
|
||||||
path("cars/inventory/", views.CarInventory.as_view(), name="car_inventory_all"),
|
|
||||||
path(
|
path(
|
||||||
"cars/inventory/<slug:make_id>/<slug:model_id>/<slug:trim_id>/",
|
"<slug:dealer_slug>/cars/<uuid:pk>/upload_cars/",
|
||||||
|
views.upload_cars,
|
||||||
|
name="upload_cars",
|
||||||
|
),
|
||||||
|
path("<slug:dealer_slug>/cars/add/", views.CarCreateView.as_view(), name="car_add"),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/cars/inventory/",
|
||||||
|
views.CarInventory.as_view(),
|
||||||
|
name="car_inventory_all",
|
||||||
|
),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/cars/inventory/<slug:make_id>/<slug:model_id>/<slug:trim_id>/",
|
||||||
views.CarInventory.as_view(),
|
views.CarInventory.as_view(),
|
||||||
name="car_inventory",
|
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(
|
path(
|
||||||
"cars/<slug:slug>/finance/create/",
|
"<slug:dealer_slug>/cars/inventory/stats",
|
||||||
|
views.inventory_stats_view,
|
||||||
|
name="inventory_stats",
|
||||||
|
),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/cars/inventory/list",
|
||||||
|
views.CarListView.as_view(),
|
||||||
|
name="car_list",
|
||||||
|
),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/cars/<slug:slug>/",
|
||||||
|
views.CarDetailView.as_view(),
|
||||||
|
name="car_detail",
|
||||||
|
),
|
||||||
|
path("cars/<slug:slug>/history/", views.car_history, name="car_history"),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/cars/<slug:slug>/update/",
|
||||||
|
views.CarUpdateView.as_view(),
|
||||||
|
name="car_update",
|
||||||
|
),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/cars/<slug:slug>/delete/",
|
||||||
|
views.CarDeleteView.as_view(),
|
||||||
|
name="car_delete",
|
||||||
|
),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/cars/<slug:slug>/finance/create/",
|
||||||
views.CarFinanceCreateView.as_view(),
|
views.CarFinanceCreateView.as_view(),
|
||||||
name="car_finance_create",
|
name="car_finance_create",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"cars/finance/<int:pk>/update/",
|
"<slug:dealer_slug>/cars/finance/<int:pk>/update/",
|
||||||
views.CarFinanceUpdateView.as_view(),
|
views.CarFinanceUpdateView.as_view(),
|
||||||
name="car_finance_update",
|
name="car_finance_update",
|
||||||
),
|
),
|
||||||
@ -307,12 +337,16 @@ urlpatterns = [
|
|||||||
views.bulk_update_car_price,
|
views.bulk_update_car_price,
|
||||||
name="bulk_update_car_price",
|
name="bulk_update_car_price",
|
||||||
),
|
),
|
||||||
path("ajax/", views.AjaxHandlerView.as_view(), name="ajax_handler"),
|
|
||||||
path(
|
path(
|
||||||
"cars/<slug:slug>/add-color/", views.CarColorCreate.as_view(), name="add_color"
|
"<slug:dealer_slug>/ajax/", views.AjaxHandlerView.as_view(), name="ajax_handler"
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"car/colors/<slug:slug>/update/",
|
"<slug:dealer_slug>/cars/<slug:slug>/add-color/",
|
||||||
|
views.CarColorCreate.as_view(),
|
||||||
|
name="add_color",
|
||||||
|
),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/car/colors/<slug:slug>/update/",
|
||||||
views.CarColorsUpdateView.as_view(),
|
views.CarColorsUpdateView.as_view(),
|
||||||
name="car_colors_update",
|
name="car_colors_update",
|
||||||
),
|
),
|
||||||
@ -353,35 +387,39 @@ urlpatterns = [
|
|||||||
),
|
),
|
||||||
path("cars/inventory/search/", views.SearchCodeView.as_view(), name="car_search"),
|
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/<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(
|
path(
|
||||||
"reservations/<int:reservation_id>/",
|
"<slug:dealer_slug>/cars/reserve/<slug:slug>/",
|
||||||
|
views.reserve_car_view,
|
||||||
|
name="reserve_car",
|
||||||
|
),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/reservations/<int:reservation_id>/",
|
||||||
views.manage_reservation,
|
views.manage_reservation,
|
||||||
name="reservations",
|
name="reservations",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"cars/<slug:slug>/add-custom-card/",
|
"<slug:dealer_slug>/cars/<slug:slug>/add-custom-card/",
|
||||||
views.CustomCardCreateView.as_view(),
|
views.CustomCardCreateView.as_view(),
|
||||||
name="add_custom_card",
|
name="add_custom_card",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"cars/<slug:slug>/add-registration/",
|
"<slug:dealer_slug>/cars/<slug:slug>/add-registration/",
|
||||||
views.CarRegistrationCreateView.as_view(),
|
views.CarRegistrationCreateView.as_view(),
|
||||||
name="add_registration",
|
name="add_registration",
|
||||||
),
|
),
|
||||||
# sales list
|
# sales list
|
||||||
path(
|
path(
|
||||||
"sales/list/",
|
"<slug:dealer_slug>/sales/list/",
|
||||||
views.sales_list_view,
|
views.sales_list_view,
|
||||||
name="sales_list",
|
name="sales_list",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sale_orders/<int:pk>/",
|
"<slug:dealer_slug>/sale_orders/<int:pk>/",
|
||||||
views.SaleOrderDetailView.as_view(),
|
views.SaleOrderDetailView.as_view(),
|
||||||
name="order_detail",
|
name="order_detail",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"inventory/<slug:entity_slug>/list/",
|
"<slug:dealer_slug>/inventory/<slug:entity_slug>/list/",
|
||||||
views.InventoryListView.as_view(),
|
views.InventoryListView.as_view(),
|
||||||
name="inventort_list",
|
name="inventort_list",
|
||||||
),
|
),
|
||||||
@ -612,142 +650,176 @@ urlpatterns = [
|
|||||||
),
|
),
|
||||||
# Bank Account
|
# Bank Account
|
||||||
path(
|
path(
|
||||||
"bank_accounts/", views.BankAccountListView.as_view(), name="bank_account_list"
|
"<slug:dealer_slug>/bank_accounts/",
|
||||||
|
views.BankAccountListView.as_view(),
|
||||||
|
name="bank_account_list",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"bank_accounts/<uuid:pk>/",
|
"<slug:dealer_slug>/bank_accounts/<uuid:pk>/",
|
||||||
views.BankAccountDetailView.as_view(),
|
views.BankAccountDetailView.as_view(),
|
||||||
name="bank_account_detail",
|
name="bank_account_detail",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"bank_accounts/create/",
|
"<slug:dealer_slug>/bank_accounts/create/",
|
||||||
views.BankAccountCreateView.as_view(),
|
views.BankAccountCreateView.as_view(),
|
||||||
name="bank_account_create",
|
name="bank_account_create",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"bank_accounts/<uuid:pk>/update/",
|
"<slug:dealer_slug>/bank_accounts/<uuid:pk>/update/",
|
||||||
views.BankAccountUpdateView.as_view(),
|
views.BankAccountUpdateView.as_view(),
|
||||||
name="bank_account_update",
|
name="bank_account_update",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"bank_accounts/<uuid:pk>/delete/",
|
"<slug:dealer_slug>/bank_accounts/<uuid:pk>/delete/",
|
||||||
views.bank_account_delete,
|
views.bank_account_delete,
|
||||||
name="bank_account_delete",
|
name="bank_account_delete",
|
||||||
),
|
),
|
||||||
# Account
|
# Account
|
||||||
path("coa_accounts/", views.AccountListView.as_view(), name="account_list"),
|
|
||||||
path(
|
path(
|
||||||
"coa_accounts/<uuid:pk>/",
|
"<slug:dealer_slug>/coa_accounts/",
|
||||||
|
views.AccountListView.as_view(),
|
||||||
|
name="account_list",
|
||||||
|
),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/coa_accounts/<uuid:pk>/",
|
||||||
views.AccountDetailView.as_view(),
|
views.AccountDetailView.as_view(),
|
||||||
name="account_detail",
|
name="account_detail",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"coa_accounts/create/", views.AccountCreateView.as_view(), name="account_create"
|
"<slug:dealer_slug>/coa_accounts/create/",
|
||||||
|
views.AccountCreateView.as_view(),
|
||||||
|
name="account_create",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"coa_accounts/<uuid:pk>/update/",
|
"<slug:dealer_slug>/coa_accounts/<uuid:pk>/update/",
|
||||||
views.AccountUpdateView.as_view(),
|
views.AccountUpdateView.as_view(),
|
||||||
name="account_update",
|
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(
|
path(
|
||||||
"sales/estimates/<uuid:pk>/",
|
"<slug:dealer_slug>/coa_accounts/<uuid:pk>/delete/",
|
||||||
|
views.account_delete,
|
||||||
|
name="account_delete",
|
||||||
|
),
|
||||||
|
#################################################
|
||||||
|
# Estimate
|
||||||
|
#################################################
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/sales/estimates/",
|
||||||
|
views.EstimateListView.as_view(),
|
||||||
|
name="estimate_list",
|
||||||
|
),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/sales/estimates/<uuid:pk>/",
|
||||||
views.EstimateDetailView.as_view(),
|
views.EstimateDetailView.as_view(),
|
||||||
name="estimate_detail",
|
name="estimate_detail",
|
||||||
),
|
),
|
||||||
path("sales/estimates/create/", views.create_estimate, name="estimate_create"),
|
|
||||||
path(
|
path(
|
||||||
"sales/estimates/create/<slug:slug>/",
|
"<slug:dealer_slug>/sales/estimates/create/",
|
||||||
|
views.create_estimate,
|
||||||
|
name="estimate_create",
|
||||||
|
),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/sales/estimates/create/<slug:slug>/",
|
||||||
views.create_estimate,
|
views.create_estimate,
|
||||||
name="estimate_create_from_opportunity",
|
name="estimate_create_from_opportunity",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/estimates/<uuid:pk>/estimate_mark_as/",
|
"<slug:dealer_slug>/sales/estimates/<uuid:pk>/estimate_mark_as/",
|
||||||
views.estimate_mark_as,
|
views.estimate_mark_as,
|
||||||
name="estimate_mark_as",
|
name="estimate_mark_as",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/estimates/<uuid:pk>/preview/",
|
"<slug:dealer_slug>/sales/estimates/<uuid:pk>/preview/",
|
||||||
views.EstimatePreviewView.as_view(),
|
views.EstimatePreviewView.as_view(),
|
||||||
name="estimate_preview",
|
name="estimate_preview",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/estimates/<uuid:pk>/payment_request/",
|
"<slug:dealer_slug>/sales/estimates/<uuid:pk>/payment_request/",
|
||||||
views.PaymentRequest.as_view(),
|
views.PaymentRequest.as_view(),
|
||||||
name="payment_request",
|
name="payment_request",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/estimates/<uuid:pk>/send_email", views.send_email_view, name="send_email"
|
"<slug:dealer_slug>/sales/estimates/<uuid:pk>/send_email",
|
||||||
|
views.send_email_view,
|
||||||
|
name="send_email",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/estimates/<uuid:pk>/sale_order/",
|
"<slug:dealer_slug>/sales/estimates/<uuid:pk>/sale_order/",
|
||||||
views.create_sale_order,
|
views.create_sale_order,
|
||||||
name="create_sale_order",
|
name="create_sale_order",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/estimates/<uuid:pk>/sale_order/<int:order_pk>/details/",
|
"<slug:dealer_slug>/sales/estimates/<uuid:pk>/sale_order/<int:order_pk>/details/",
|
||||||
views.SaleOrderDetail.as_view(),
|
views.SaleOrderDetail.as_view(),
|
||||||
name="sale_order_details",
|
name="sale_order_details",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/estimates/<uuid:pk>/sale_order/preview/",
|
"<slug:dealer_slug>/sales/estimates/<uuid:pk>/sale_order/preview/",
|
||||||
views.preview_sale_order,
|
views.preview_sale_order,
|
||||||
name="preview_sale_order",
|
name="preview_sale_order",
|
||||||
),
|
),
|
||||||
|
###############################################
|
||||||
# Invoice
|
# Invoice
|
||||||
path("sales/invoices/", views.InvoiceListView.as_view(), name="invoice_list"),
|
###############################################
|
||||||
path(
|
path(
|
||||||
"sales/invoices/<uuid:pk>/create/", views.invoice_create, name="invoice_create"
|
"<slug:dealer_slug>/sales/invoices/",
|
||||||
|
views.InvoiceListView.as_view(),
|
||||||
|
name="invoice_list",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/invoices/<uuid:pk>/",
|
"<slug:dealer_slug>/sales/invoices/<uuid:pk>/create/",
|
||||||
|
views.invoice_create,
|
||||||
|
name="invoice_create",
|
||||||
|
),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/sales/invoices/<uuid:pk>/",
|
||||||
views.InvoiceDetailView.as_view(),
|
views.InvoiceDetailView.as_view(),
|
||||||
name="invoice_detail",
|
name="invoice_detail",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/invoices/<uuid:pk>/preview/",
|
"<slug:dealer_slug>/sales/invoices/<uuid:pk>/preview/",
|
||||||
views.InvoicePreviewView.as_view(),
|
views.InvoicePreviewView.as_view(),
|
||||||
name="invoice_preview",
|
name="invoice_preview",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/invoices/<uuid:pk>/invoice_mark_as/",
|
"<slug:dealer_slug>/sales/invoices/<uuid:pk>/invoice_mark_as/",
|
||||||
views.invoice_mark_as,
|
views.invoice_mark_as,
|
||||||
name="invoice_mark_as",
|
name="invoice_mark_as",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/invoices/<uuid:pk>/draft_invoice_update/",
|
"<slug:dealer_slug>/sales/invoices/<uuid:pk>/draft_invoice_update/",
|
||||||
views.DraftInvoiceModelUpdateFormView.as_view(),
|
views.DraftInvoiceModelUpdateFormView.as_view(),
|
||||||
name="draft_invoice_update",
|
name="draft_invoice_update",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/invoices/<uuid:pk>/approved_invoice_update/",
|
"<slug:dealer_slug>/sales/invoices/<uuid:pk>/approved_invoice_update/",
|
||||||
views.ApprovedInvoiceModelUpdateFormView.as_view(),
|
views.ApprovedInvoiceModelUpdateFormView.as_view(),
|
||||||
name="approved_invoice_update",
|
name="approved_invoice_update",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/invoices/<uuid:pk>/paid_invoice_update/",
|
"<slug:dealer_slug>/sales/invoices/<uuid:pk>/paid_invoice_update/",
|
||||||
views.PaidInvoiceModelUpdateFormView.as_view(),
|
views.PaidInvoiceModelUpdateFormView.as_view(),
|
||||||
name="paid_invoice_update",
|
name="paid_invoice_update",
|
||||||
),
|
),
|
||||||
# path('sales/estimates/<uuid:pk>/preview/', views.EstimatePreviewView.as_view(), name='estimate_preview'),
|
# path('sales/estimates/<uuid:pk>/preview/', views.EstimatePreviewView.as_view(), name='estimate_preview'),
|
||||||
# path('send_email/<uuid:pk>', views.send_email, name='send_email'),
|
# path('send_email/<uuid:pk>', views.send_email, name='send_email'),
|
||||||
# Payment
|
# Payment
|
||||||
path("sales/payments/", views.PaymentListView, name="payment_list"),
|
|
||||||
path(
|
path(
|
||||||
"sales/payments/<uuid:pk>/create/",
|
"<slug:dealer_slug>/sales/payments/", views.PaymentListView, name="payment_list"
|
||||||
|
),
|
||||||
|
path(
|
||||||
|
"<slug:dealer_slug>/sales/payments/<uuid:pk>/create/",
|
||||||
views.PaymentCreateView,
|
views.PaymentCreateView,
|
||||||
name="payment_create",
|
name="payment_create",
|
||||||
),
|
),
|
||||||
# path("sales/payments/create/", views.PaymentCreateView, name="payment_create"),
|
# path("sales/payments/create/", views.PaymentCreateView, name="payment_create"),
|
||||||
path(
|
path(
|
||||||
"sales/payments/<uuid:pk>/payment_details/",
|
"<slug:dealer_slug>/sales/payments/<uuid:pk>/payment_details/",
|
||||||
views.PaymentDetailView,
|
views.PaymentDetailView,
|
||||||
name="payment_details",
|
name="payment_details",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"sales/payments/<uuid:pk>/payment_mark_as_paid/",
|
"<slug:dealer_slug>/sales/payments/<uuid:pk>/payment_mark_as_paid/",
|
||||||
views.payment_mark_as_paid,
|
views.payment_mark_as_paid,
|
||||||
name="payment_mark_as_paid",
|
name="payment_mark_as_paid",
|
||||||
),
|
),
|
||||||
@ -787,85 +859,90 @@ urlpatterns = [
|
|||||||
name="item_expense_update",
|
name="item_expense_update",
|
||||||
),
|
),
|
||||||
# Bills
|
# Bills
|
||||||
path("items/bills/", views.BillListView.as_view(), name="bill_list"),
|
path(
|
||||||
|
"<slug:dealer_slug>/items/bills/",
|
||||||
|
views.BillListView.as_view(),
|
||||||
|
name="bill_list",
|
||||||
|
),
|
||||||
# path("items/bills/create/", views.BillModelCreateViewView.as_view(), name="bill_create"),
|
# path("items/bills/create/", views.BillModelCreateViewView.as_view(), name="bill_create"),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/create/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/create/",
|
||||||
views.BillModelCreateView.as_view(),
|
views.BillModelCreateView.as_view(),
|
||||||
name="bill-create",
|
name="bill-create",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/create/purchase-order/<uuid:po_pk>/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/create/purchase-order/<uuid:po_pk>/",
|
||||||
views.BillModelCreateView.as_view(for_purchase_order=True),
|
views.BillModelCreateView.as_view(for_purchase_order=True),
|
||||||
name="bill-create-po",
|
name="bill-create-po",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/create/estimate/<uuid:ce_pk>/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/create/estimate/<uuid:ce_pk>/",
|
||||||
views.BillModelCreateView.as_view(for_estimate=True),
|
views.BillModelCreateView.as_view(for_estimate=True),
|
||||||
name="bill-create-estimate",
|
name="bill-create-estimate",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/detail/<uuid:bill_pk>/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/detail/<uuid:bill_pk>/",
|
||||||
views.BillModelDetailViewView.as_view(),
|
views.BillModelDetailViewView.as_view(),
|
||||||
name="bill-detail",
|
name="bill-detail",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/update/<uuid:bill_pk>/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/update/<uuid:bill_pk>/",
|
||||||
views.BillModelUpdateViewView.as_view(),
|
views.BillModelUpdateViewView.as_view(),
|
||||||
name="bill-update",
|
name="bill-update",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/update/<uuid:bill_pk>/items/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/update/<uuid:bill_pk>/items/",
|
||||||
views.BillModelUpdateViewView.as_view(action_update_items=True),
|
views.BillModelUpdateViewView.as_view(action_update_items=True),
|
||||||
name="bill-update-items",
|
name="bill-update-items",
|
||||||
),
|
),
|
||||||
############################################################
|
############################################################
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/mark-as-draft/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/mark-as-draft/",
|
||||||
views.BillModelActionMarkAsDraftView.as_view(),
|
views.BillModelActionMarkAsDraftView.as_view(),
|
||||||
name="bill-action-mark-as-draft",
|
name="bill-action-mark-as-draft",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/mark-as-review/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/mark-as-review/",
|
||||||
views.BillModelActionMarkAsInReviewView.as_view(),
|
views.BillModelActionMarkAsInReviewView.as_view(),
|
||||||
name="bill-action-mark-as-review",
|
name="bill-action-mark-as-review",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/mark-as-approved/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/mark-as-approved/",
|
||||||
views.BillModelActionMarkAsApprovedView.as_view(),
|
views.BillModelActionMarkAsApprovedView.as_view(),
|
||||||
name="bill-action-mark-as-approved",
|
name="bill-action-mark-as-approved",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/mark-as-paid/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/mark-as-paid/",
|
||||||
views.BillModelActionMarkAsPaidView.as_view(),
|
views.BillModelActionMarkAsPaidView.as_view(),
|
||||||
name="bill-action-mark-as-paid",
|
name="bill-action-mark-as-paid",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/mark-as-void/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/mark-as-void/",
|
||||||
views.BillModelActionVoidView.as_view(),
|
views.BillModelActionVoidView.as_view(),
|
||||||
name="bill-action-mark-as-void",
|
name="bill-action-mark-as-void",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/mark-as-canceled/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/mark-as-canceled/",
|
||||||
views.BillModelActionCanceledView.as_view(),
|
views.BillModelActionCanceledView.as_view(),
|
||||||
name="bill-action-mark-as-canceled",
|
name="bill-action-mark-as-canceled",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/lock-ledger/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/lock-ledger/",
|
||||||
views.BillModelActionLockLedgerView.as_view(),
|
views.BillModelActionLockLedgerView.as_view(),
|
||||||
name="bill-action-lock-ledger",
|
name="bill-action-lock-ledger",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/unlock-ledger/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/unlock-ledger/",
|
||||||
views.BillModelActionUnlockLedgerView.as_view(),
|
views.BillModelActionUnlockLedgerView.as_view(),
|
||||||
name="bill-action-unlock-ledger",
|
name="bill-action-unlock-ledger",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/force-migration/",
|
"<slug:dealer_slug>/items/bills/<slug:entity_slug>/actions/<uuid:bill_pk>/force-migration/",
|
||||||
views.BillModelActionForceMigrateView.as_view(),
|
views.BillModelActionForceMigrateView.as_view(),
|
||||||
name="bill-action-force-migrate",
|
name="bill-action-force-migrate",
|
||||||
),
|
),
|
||||||
# path("items/bills/create/", views.bill_create, name="bill_create"),
|
# path("items/bills/create/", views.bill_create, name="bill_create"),
|
||||||
|
# >>>>>>>>>>>>>>>>>>>>>>...
|
||||||
path(
|
path(
|
||||||
"items/bills/<uuid:pk>/bill_detail/",
|
"items/bills/<uuid:pk>/bill_detail/",
|
||||||
views.BillDetailView.as_view(),
|
views.BillDetailView.as_view(),
|
||||||
@ -1039,82 +1116,81 @@ urlpatterns = [
|
|||||||
#########
|
#########
|
||||||
# Purchase Order
|
# Purchase Order
|
||||||
path(
|
path(
|
||||||
"purchase_orders/",
|
"<slug:dealer_slug>/purchase_orders/",
|
||||||
views.PurchaseOrderListView.as_view(),
|
views.PurchaseOrderListView.as_view(),
|
||||||
name="purchase_order_list",
|
name="purchase_order_list",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"purchase_orders/new/",
|
"<slug:dealer_slug>/purchase_orders/new/",
|
||||||
views.PurchaseOrderCreateView,
|
views.PurchaseOrderCreateView,
|
||||||
name="purchase_order_create",
|
name="purchase_order_create",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"purchase_orders/<uuid:pk>/detail/",
|
"<slug:dealer_slug>/purchase_orders/<uuid:pk>/detail/",
|
||||||
views.PurchaseOrderDetailView.as_view(),
|
views.PurchaseOrderDetailView.as_view(),
|
||||||
name="purchase_order_detail",
|
name="purchase_order_detail",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"purchase_orders/<slug:entity_slug>/<uuid:po_pk>/update/",
|
"<slug:dealer_slug>/purchase_orders/<slug:entity_slug>/<uuid:po_pk>/update/",
|
||||||
views.PurchaseOrderUpdateView.as_view(),
|
views.PurchaseOrderUpdateView.as_view(),
|
||||||
name="purchase_order_update",
|
name="purchase_order_update",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"purchase_orders/<slug:entity_slug>/update/<uuid:po_pk>/update-items/",
|
"<slug:dealer_slug>/purchase_orders/<slug:entity_slug>/update/<uuid:po_pk>/update-items/",
|
||||||
views.PurchaseOrderUpdateView.as_view(action_update_items=True),
|
views.PurchaseOrderUpdateView.as_view(action_update_items=True),
|
||||||
name="purchase_order_update_items",
|
name="purchase_order_update_items",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"purchase_orders/inventory_item/create/",
|
"<slug:dealer_slug>/purchase_orders/inventory_item/create/",
|
||||||
views.InventoryItemCreateView,
|
views.InventoryItemCreateView,
|
||||||
name="inventory_item_create",
|
name="inventory_item_create",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"purchase_orders/inventory_items_filter/",
|
"<slug:dealer_slug>/purchase_orders/inventory_items_filter/",
|
||||||
views.inventory_items_filter,
|
views.inventory_items_filter,
|
||||||
name="inventory_items_filter",
|
name="inventory_items_filter",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"purchase_orders/<slug:entity_slug>/delete/<uuid:po_pk>/",
|
"<slug:dealer_slug>/purchase_orders/<slug:entity_slug>/delete/<uuid:po_pk>/",
|
||||||
views.PurchaseOrderModelDeleteView.as_view(),
|
views.PurchaseOrderModelDeleteView.as_view(),
|
||||||
name="po-delete",
|
name="po-delete",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"purchase_orders/<slug:entity_slug>/<uuid:po_pk>/upload/",
|
"<slug:dealer_slug>/purchase_orders/<slug:entity_slug>/<uuid:po_pk>/upload/",
|
||||||
view=views.view_items_inventory,
|
view=views.view_items_inventory,
|
||||||
name="view_items_inventory",
|
name="view_items_inventory",
|
||||||
),
|
),
|
||||||
# Actions....
|
# Actions....
|
||||||
path(
|
path(
|
||||||
"<slug:entity_slug>/action/<uuid:po_pk>/mark-as-draft/",
|
"<slug:dealer_slug>/<slug:entity_slug>/action/<uuid:po_pk>/mark-as-draft/",
|
||||||
views.PurchaseOrderMarkAsDraftView.as_view(),
|
views.PurchaseOrderMarkAsDraftView.as_view(),
|
||||||
name="po-action-mark-as-draft",
|
name="po-action-mark-as-draft",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"<slug:entity_slug>/action/<uuid:po_pk>/mark-as-review/",
|
"<slug:dealer_slug>/<slug:entity_slug>/action/<uuid:po_pk>/mark-as-review/",
|
||||||
views.PurchaseOrderMarkAsReviewView.as_view(),
|
views.PurchaseOrderMarkAsReviewView.as_view(),
|
||||||
name="po-action-mark-as-review",
|
name="po-action-mark-as-review",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"<slug:entity_slug>/action/<uuid:po_pk>/mark-as-approved/",
|
"<slug:dealer_slug>/<slug:entity_slug>/action/<uuid:po_pk>/mark-as-approved/",
|
||||||
views.PurchaseOrderMarkAsApprovedView.as_view(),
|
views.PurchaseOrderMarkAsApprovedView.as_view(),
|
||||||
name="po-action-mark-as-approved",
|
name="po-action-mark-as-approved",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"<slug:entity_slug>/action/<uuid:po_pk>/mark-as-fulfilled/",
|
"<slug:dealer_slug>/<slug:entity_slug>/action/<uuid:po_pk>/mark-as-fulfilled/",
|
||||||
views.PurchaseOrderMarkAsFulfilledView.as_view(),
|
views.PurchaseOrderMarkAsFulfilledView.as_view(),
|
||||||
name="po-action-mark-as-fulfilled",
|
name="po-action-mark-as-fulfilled",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"<slug:entity_slug>/action/<uuid:po_pk>/mark-as-canceled/",
|
"<slug:dealer_slug>/<slug:entity_slug>/action/<uuid:po_pk>/mark-as-canceled/",
|
||||||
views.PurchaseOrderMarkAsCanceledView.as_view(),
|
views.PurchaseOrderMarkAsCanceledView.as_view(),
|
||||||
name="po-action-mark-as-canceled",
|
name="po-action-mark-as-canceled",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"<slug:entity_slug>/action/<uuid:po_pk>/mark-as-void/",
|
"<slug:dealer_slug>/<slug:entity_slug>/action/<uuid:po_pk>/mark-as-void/",
|
||||||
views.PurchaseOrderMarkAsVoidView.as_view(),
|
views.PurchaseOrderMarkAsVoidView.as_view(),
|
||||||
name="po-action-mark-as-void",
|
name="po-action-mark-as-void",
|
||||||
),
|
),
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
handler404 = "inventory.views.custom_page_not_found_view"
|
handler404 = "inventory.views.custom_page_not_found_view"
|
||||||
|
|||||||
@ -222,7 +222,7 @@ def reserve_car(car, request):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
messages.error(request, f"Error reserving car: {e}")
|
messages.error(request, f"Error reserving car: {e}")
|
||||||
|
|
||||||
return redirect("car_detail", slug=car.slug)
|
return redirect("car_detail", dealer_slug=request.dealer.slug, slug=car.slug)
|
||||||
|
|
||||||
|
|
||||||
def calculate_vat_amount(amount):
|
def calculate_vat_amount(amount):
|
||||||
@ -1011,7 +1011,7 @@ class CarFinanceCalculator:
|
|||||||
"make": car_info.get("make"),
|
"make": car_info.get("make"),
|
||||||
"model": car_info.get("model"),
|
"model": car_info.get("model"),
|
||||||
"year": car_info.get("year"),
|
"year": car_info.get("year"),
|
||||||
"logo": item.item_model.car.id_car_make.logo.url,
|
"logo": getattr(item.item_model.car.id_car_make, "logo", ""),
|
||||||
"trim": car_info.get("trim"),
|
"trim": car_info.get("trim"),
|
||||||
"mileage": car_info.get("mileage"),
|
"mileage": car_info.get("mileage"),
|
||||||
"cost_price": car_finance.get("cost_price"),
|
"cost_price": car_finance.get("cost_price"),
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -63,7 +63,7 @@
|
|||||||
{% include 'header.html' %}
|
{% include 'header.html' %}
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
{% include "plans/expiration_messages.html" %}
|
{% include "plans/expiration_messages.html" %}
|
||||||
{% block period_navigation %}
|
{% block period_navigation %}
|
||||||
|
|
||||||
|
|||||||
@ -42,11 +42,11 @@
|
|||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<div class="card shadow-sm" >
|
<div class="card shadow-sm" >
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% include 'bill/includes/card_bill.html' with bill=bill entity_slug=view.kwargs.entity_slug style='bill-detail' %}
|
{% include 'bill/includes/card_bill.html' with dealer_slug=request.dealer.slug bill=bill entity_slug=view.kwargs.entity_slug style='bill-detail' %}
|
||||||
<hr class="my-4">
|
<hr class="my-4">
|
||||||
{% include 'bill/includes/card_vendor.html' with vendor=bill.vendor %}
|
{% include 'bill/includes/card_vendor.html' with vendor=bill.vendor %}
|
||||||
<div class="d-grid mt-4">
|
<div class="d-grid mt-4">
|
||||||
<a href="{% url 'bill_list' %}"
|
<a href="{% url 'bill_list' request.dealer.slug %}"
|
||||||
class="btn btn-phoenix-primary">
|
class="btn btn-phoenix-primary">
|
||||||
<i class="fas fa-arrow-left me-1"></i> {% trans 'Bill List' %}
|
<i class="fas fa-arrow-left me-1"></i> {% trans 'Bill List' %}
|
||||||
</a>
|
</a>
|
||||||
@ -65,7 +65,7 @@
|
|||||||
<div class="border rounded p-3">
|
<div class="border rounded p-3">
|
||||||
<h6 class="text-uppercase text-xs text-muted mb-2">
|
<h6 class="text-uppercase text-xs text-muted mb-2">
|
||||||
{% trans 'Cash Account' %}:
|
{% trans 'Cash Account' %}:
|
||||||
<a href="{% url 'account_detail' bill.cash_account.uuid %}"
|
<a href="{% url 'account_detail' request.dealer.slug bill.cash_account.uuid %}"
|
||||||
class="text-decoration-none ms-1">
|
class="text-decoration-none ms-1">
|
||||||
{{ bill.cash_account.code }}
|
{{ bill.cash_account.code }}
|
||||||
</a>
|
</a>
|
||||||
@ -80,7 +80,7 @@
|
|||||||
<div class="border rounded p-3">
|
<div class="border rounded p-3">
|
||||||
<h6 class="text-uppercase text-xs text-muted mb-2">
|
<h6 class="text-uppercase text-xs text-muted mb-2">
|
||||||
{% trans 'Prepaid Account' %}:
|
{% trans 'Prepaid Account' %}:
|
||||||
<a href="{% url 'account_detail' bill.prepaid_account.uuid %}"
|
<a href="{% url 'account_detail' request.dealer.slug bill.prepaid_account.uuid %}"
|
||||||
class="text-decoration-none ms-1">
|
class="text-decoration-none ms-1">
|
||||||
{{ bill.prepaid_account.code }}
|
{{ bill.prepaid_account.code }}
|
||||||
</a>
|
</a>
|
||||||
@ -94,7 +94,7 @@
|
|||||||
<div class="border rounded p-3">
|
<div class="border rounded p-3">
|
||||||
<h6 class="text-uppercase text-xs text-muted mb-2">
|
<h6 class="text-uppercase text-xs text-muted mb-2">
|
||||||
{% trans 'Accounts Payable' %}:
|
{% trans 'Accounts Payable' %}:
|
||||||
<a href="{% url 'account_detail' bill.unearned_account.uuid %}"
|
<a href="{% url 'account_detail' request.dealer.slug bill.unearned_account.uuid %}"
|
||||||
class="text-decoration-none ms-1">
|
class="text-decoration-none ms-1">
|
||||||
{{ bill.unearned_account.code }}
|
{{ bill.unearned_account.code }}
|
||||||
</a>
|
</a>
|
||||||
@ -185,7 +185,7 @@
|
|||||||
<td class="align-items-start white-space-nowrap pe-2">
|
<td class="align-items-start white-space-nowrap pe-2">
|
||||||
{% if bill_item.po_model_id %}
|
{% if bill_item.po_model_id %}
|
||||||
<a class="btn btn-sm btn-phoenix-primary"
|
<a class="btn btn-sm btn-phoenix-primary"
|
||||||
href="{% url 'purchase_order_detail' bill_item.po_model_id %}">
|
href="{% url 'purchase_order_detail' request.dealer.slug bill_item.po_model_id %}">
|
||||||
{% trans 'View PO' %}
|
{% trans 'View PO' %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@ -17,9 +17,9 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card mb-4">
|
<div class="card mb-4">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% include 'bill/includes/card_bill.html' with bill=bill_model style='bill-detail' entity_slug=view.kwargs.entity_slug %}
|
{% include 'bill/includes/card_bill.html' with dealer_slug=request.dealer.slug bill=bill_model style='bill-detail' entity_slug=view.kwargs.entity_slug %}
|
||||||
|
|
||||||
<form action="{% url 'bill-update' entity_slug=view.kwargs.entity_slug bill_pk=bill_model.uuid %}" method="post">
|
<form action="{% url 'bill-update' dealer_slug=request.dealer.slug entity_slug=view.kwargs.entity_slug bill_pk=bill_model.uuid %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
@ -30,12 +30,12 @@
|
|||||||
<i class="fas fa-save me-2"></i>{% trans 'Save Bill' %}
|
<i class="fas fa-save me-2"></i>{% trans 'Save Bill' %}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<a href="{% url 'bill-detail' entity_slug=view.kwargs.entity_slug bill_pk=bill_model.uuid %}"
|
<a href="{% url 'bill-detail' dealer_slug=request.dealer.slug entity_slug=view.kwargs.entity_slug bill_pk=bill_model.uuid %}"
|
||||||
class="btn btn-phoenix-secondary w-100 mb-2">
|
class="btn btn-phoenix-secondary w-100 mb-2">
|
||||||
<i class="fas fa-arrow-left me-2"></i>{% trans 'Back to Bill Detail' %}
|
<i class="fas fa-arrow-left me-2"></i>{% trans 'Back to Bill Detail' %}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="{% url 'bill_list' %}"
|
<a href="{% url 'bill_list' request.dealer.slug %}"
|
||||||
class="btn btn-phoenix-info w-100 mb-2">
|
class="btn btn-phoenix-info w-100 mb-2">
|
||||||
<i class="fas fa-list me-2"></i>{% trans 'Bill List' %}
|
<i class="fas fa-list me-2"></i>{% trans 'Bill List' %}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -201,48 +201,48 @@
|
|||||||
<div class="card-footer p-0">
|
<div class="card-footer p-0">
|
||||||
<div class="d-flex flex-wrap gap-2 mt-2">
|
<div class="d-flex flex-wrap gap-2 mt-2">
|
||||||
<!-- Update Button -->
|
<!-- Update Button -->
|
||||||
<a href="{% url 'bill-update' entity_slug=entity_slug bill_pk=bill.uuid %}" class="btn btn-phoenix-primary">
|
<a href="{% url 'bill-update' dealer_slug=dealer_slug entity_slug=entity_slug bill_pk=bill.uuid %}" class="btn btn-phoenix-primary">
|
||||||
<i class="fas fa-edit me-2"></i>{% trans 'Update' %}
|
<i class="fas fa-edit me-2"></i>{% trans 'Update' %}
|
||||||
</a>
|
</a>
|
||||||
<!-- Mark as Draft -->
|
<!-- Mark as Draft -->
|
||||||
{% if bill.can_draft %}
|
{% if bill.can_draft %}
|
||||||
<button class="btn btn-phoenix-success"
|
<button class="btn btn-phoenix-success"
|
||||||
onclick="showPOModal('Mark as Draft', '{% url 'bill-action-mark-as-draft' entity_slug=entity_slug bill_pk=bill.pk %}', 'Mark as Draft')">
|
onclick="showPOModal('Mark as Draft', '{% url 'bill-action-mark-as-draft' dealer_slug=request.dealer.slug entity_slug=entity_slug bill_pk=bill.pk %}', 'Mark as Draft')">
|
||||||
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Draft' %}
|
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Draft' %}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!-- Mark as Review -->
|
<!-- Mark as Review -->
|
||||||
{% if bill.can_review %}
|
{% if bill.can_review %}
|
||||||
<button class="btn btn-phoenix-warning"
|
<button class="btn btn-phoenix-warning"
|
||||||
onclick="showPOModal('Mark as Review', '{% url 'bill-action-mark-as-review' entity_slug=entity_slug bill_pk=bill.pk %}', 'Mark as Review')">
|
onclick="showPOModal('Mark as Review', '{% url 'bill-action-mark-as-review' dealer_slug=request.dealer.slug entity_slug=entity_slug bill_pk=bill.pk %}', 'Mark as Review')">
|
||||||
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Review' %}
|
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Review' %}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!-- Mark as Approved -->
|
<!-- Mark as Approved -->
|
||||||
{% if bill.can_approve %}
|
{% if bill.can_approve %}
|
||||||
<button class="btn btn-phoenix-success"
|
<button class="btn btn-phoenix-success"
|
||||||
onclick="showPOModal('Mark as Approved', '{% url 'bill-action-mark-as-approved' entity_slug=entity_slug bill_pk=bill.pk %}', 'Mark as Approved')">
|
onclick="showPOModal('Mark as Approved', '{% url 'bill-action-mark-as-approved' dealer_slug=request.dealer.slug entity_slug=entity_slug bill_pk=bill.pk %}', 'Mark as Approved')">
|
||||||
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Approved' %}
|
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Approved' %}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!-- Mark as Paid -->
|
<!-- Mark as Paid -->
|
||||||
{% if bill.can_pay %}
|
{% if bill.can_pay %}
|
||||||
<button class="btn btn-phoenix-success"
|
<button class="btn btn-phoenix-success"
|
||||||
onclick="showPOModal('Mark as Paid', '{% url 'bill-action-mark-as-paid' entity_slug=entity_slug bill_pk=bill.pk %}', 'Mark as Paid')">
|
onclick="showPOModal('Mark as Paid', '{% url 'bill-action-mark-as-paid' dealer_slug=request.dealer.slug entity_slug=entity_slug bill_pk=bill.pk %}', 'Mark as Paid')">
|
||||||
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Paid' %}
|
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Paid' %}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!-- Void Button -->
|
<!-- Void Button -->
|
||||||
{% if bill.can_void %}
|
{% if bill.can_void %}
|
||||||
<button class="btn btn-phoenix-danger"
|
<button class="btn btn-phoenix-danger"
|
||||||
onclick="showPOModal('Mark as Void', '{% url 'bill-action-mark-as-void' entity_slug=entity_slug bill_pk=bill.pk %}', 'Mark as Void')">
|
onclick="showPOModal('Mark as Void', '{% url 'bill-action-mark-as-void' dealer_slug=request.dealer.slug entity_slug=entity_slug bill_pk=bill.pk %}', 'Mark as Void')">
|
||||||
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Void' %}
|
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Void' %}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!-- Cancel Button -->
|
<!-- Cancel Button -->
|
||||||
{% if bill.can_cancel %}
|
{% if bill.can_cancel %}
|
||||||
<button class="btn btn-phoenix-danger"
|
<button class="btn btn-phoenix-danger"
|
||||||
onclick="showPOModal('Mark as Canceled', '{% url 'bill-action-mark-as-canceled' entity_slug=entity_slug bill_pk=bill.pk %}', 'Mark as Canceled')">
|
onclick="showPOModal('Mark as Canceled', '{% url 'bill-action-mark-as-canceled' dealer_slug=request.dealer.slug entity_slug=entity_slug bill_pk=bill.pk %}', 'Mark as Canceled')">
|
||||||
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Canceled' %}
|
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Canceled' %}
|
||||||
</button>
|
</button>
|
||||||
{% modal_action_v2 bill bill.get_mark_as_canceled_url bill.get_mark_as_canceled_message bill.get_mark_as_canceled_html_id %}
|
{% modal_action_v2 bill bill.get_mark_as_canceled_url bill.get_mark_as_canceled_message bill.get_mark_as_canceled_html_id %}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
{% load django_ledger %}
|
{% load django_ledger %}
|
||||||
{% load widget_tweaks %}
|
{% load widget_tweaks %}
|
||||||
|
|
||||||
<form action="{% url 'bill-update-items' entity_slug=entity_slug bill_pk=bill_pk %}" method="post">
|
<form action="{% url 'bill-update-items' dealer_slug=dealer_slug entity_slug=entity_slug bill_pk=bill_pk %}" method="post">
|
||||||
<div class="container-fluid py-4">
|
<div class="container-fluid py-4">
|
||||||
<!-- Page Header -->
|
<!-- Page Header -->
|
||||||
<div class="row mb-4">
|
<div class="row mb-4">
|
||||||
@ -72,7 +72,7 @@
|
|||||||
{% currency_symbol %}{{ f.instance.po_total_amount | currency_format }}
|
{% currency_symbol %}{{ f.instance.po_total_amount | currency_format }}
|
||||||
</span>
|
</span>
|
||||||
<a class="btn btn-sm btn-phoenix-info mt-1"
|
<a class="btn btn-sm btn-phoenix-info mt-1"
|
||||||
href="{% url 'purchase_order_detail' f.instance.po_model_id %}">
|
href="{% url 'purchase_order_detail' dealer_slug f.instance.po_model_id %}">
|
||||||
{% trans 'View PO' %}
|
{% trans 'View PO' %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="fs-9">
|
<tbody class="fs-9">
|
||||||
|
|
||||||
{% for transaction_model in transaction_model_qs %}
|
{% for transaction_model in transaction_model_qs %}
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -231,27 +231,27 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
|
<div class="d-flex">
|
||||||
|
{% include 'partials/pagination.html'%}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<tr>
|
||||||
|
<td colspan="6" class="text-center">{% trans "No Lead Yet" %}</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
|
||||||
|
|
||||||
<div class="d-flex">
|
|
||||||
{% include 'partials/pagination.html'%}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
<tr>
|
|
||||||
<td colspan="6" class="text-center">{% trans "No Lead Yet" %}</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@ -90,14 +90,14 @@
|
|||||||
<div id="opportunities-grid" class="row g-4 px-2 px-lg-4 mt-1">
|
<div id="opportunities-grid" class="row g-4 px-2 px-lg-4 mt-1">
|
||||||
{% include 'crm/opportunities/partials/opportunity_grid.html' %}
|
{% include 'crm/opportunities/partials/opportunity_grid.html' %}
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -109,15 +109,15 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include 'modal/delete_modal.html' %}
|
{% include 'modal/delete_modal.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-6 col-md-4 col-xxl-2 text-center border-translucent border-start-xxl border-end-xxl-0 border-bottom-xxl-0 border-end border-bottom pb-4 pb-xxl-0 ">
|
<div class="col-6 col-md-4 col-xxl-2 text-center border-translucent border-start-xxl border-end-xxl-0 border-bottom-xxl-0 border-end border-bottom pb-4 pb-xxl-0 ">
|
||||||
<span class="uil fs-5 lh-1 uil-bill text-info"></span>
|
<span class="uil fs-5 lh-1 uil-bill text-info"></span>
|
||||||
<a href="{% url 'invoice_list' %}"><h4 class="fs-6 pt-3">{{ invoices }}</h4></a>
|
<a href="{% url 'invoice_list' request.dealer.slug %}"><h4 class="fs-6 pt-3">{{ invoices }}</h4></a>
|
||||||
<p class="fs-9 mb-0">{{ _("Invoices")}}</p>
|
<p class="fs-9 mb-0">{{ _("Invoices")}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 col-md-4 col-xxl-2 text-center border-translucent border-start-xxl border-end-xxl-0 border-bottom-xxl-0 border-end border-bottom pb-4 pb-xxl-0 ">
|
<div class="col-6 col-md-4 col-xxl-2 text-center border-translucent border-start-xxl border-end-xxl-0 border-bottom-xxl-0 border-end border-bottom pb-4 pb-xxl-0 ">
|
||||||
|
|||||||
@ -43,6 +43,6 @@
|
|||||||
<div class="error-page">
|
<div class="error-page">
|
||||||
<h1 class="error-code">{% trans "400" %}</h1>
|
<h1 class="error-code">{% trans "400" %}</h1>
|
||||||
<p class="error-message">{% trans "Bad Request" %}</p>
|
<p class="error-message">{% trans "Bad Request" %}</p>
|
||||||
<a href="{% url 'inventory_stats' %}" class="error-button">{% trans "Go Back" %}</a>
|
<a href="{% url 'inventory_stats' request.dealer.slug %}" class="error-button">{% trans "Go Back" %}</a>
|
||||||
</div>
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
@ -46,13 +46,13 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -22,44 +22,44 @@
|
|||||||
<li class="collapsed-nav-item-title d-none">{% trans "Inventory"|capfirst %}</li>
|
<li class="collapsed-nav-item-title d-none">{% trans "Inventory"|capfirst %}</li>
|
||||||
{% if perms.inventory.add_car %}
|
{% if perms.inventory.add_car %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a id="btn-add-car" class="nav-link btn-add-car" href="{% url 'car_add' %}">
|
<a id="btn-add-car" class="nav-link btn-add-car" href="{% url 'car_add' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span class="fas fa-plus-circle"></span></span><span class="nav-link-text">{% trans "add car"|capfirst %}</span>
|
<span class="nav-link-icon"><span class="fas fa-plus-circle"></span></span><span class="nav-link-text">{% trans "add car"|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'inventory_item_create' %}">
|
<a class="nav-link" href="{% url 'inventory_item_create' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span class="fas fa-plus-circle"></span></span><span class="nav-link-text">{% trans "add invenotry item"|capfirst %}</span>
|
<span class="nav-link-icon"><span class="fas fa-plus-circle"></span></span><span class="nav-link-text">{% trans "add invenotry item"|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'purchase_order_list' %}">
|
<a class="nav-link" href="{% url 'purchase_order_list' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span class="fas fa-warehouse"></span></span><span class="nav-link-text">{% trans "purchase Orders"|capfirst %}</span>
|
<span class="nav-link-icon"><span class="fas fa-warehouse"></span></span><span class="nav-link-text">{% trans "purchase Orders"|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'upload_cars' %}">
|
<a class="nav-link" href="{% url 'upload_cars' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span class="fas fa-file-invoice"></span></span><span class="nav-link-text">{% trans "Upload Cars"|capfirst %}</span>
|
<span class="nav-link-icon"><span class="fas fa-file-import"></span></span><span class="nav-link-text">{% trans "Bulk Upload"|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
|
|
||||||
<a class="nav-link" href="{% url 'inventory_stats' %}">
|
<a class="nav-link" href="{% url 'inventory_stats' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span class="fas fa-car-side"></span></span><span class="nav-link-text">{% trans 'Cars'|capfirst %}</span>
|
<span class="nav-link-icon"><span class="fas fa-car-side"></span></span><span class="nav-link-text">{% trans 'Cars'|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'car_list' %}">
|
<a class="nav-link" href="{% url 'car_list' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span class="fas fa-car-side"></span></span><span class="nav-link-text">{% trans 'Stock'|capfirst %}</span>
|
<span class="nav-link-icon"><span class="fas fa-car-side"></span></span><span class="nav-link-text">{% trans 'Stock'|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -82,7 +82,7 @@
|
|||||||
<li class="collapsed-nav-item-title d-none">{% trans 'sales'|capfirst %}</li>
|
<li class="collapsed-nav-item-title d-none">{% trans 'sales'|capfirst %}</li>
|
||||||
{% if perms.django_ledger.add_estimatemodel %}
|
{% if perms.django_ledger.add_estimatemodel %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'estimate_create' %}">
|
<a class="nav-link" href="{% url 'estimate_create' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span class="fas fa-list-ul"></span></span><span class="nav-link-text">{% trans "create quotation"|capfirst %}</span>
|
<span class="nav-link-icon"><span class="fas fa-list-ul"></span></span><span class="nav-link-text">{% trans "create quotation"|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -91,7 +91,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.django_ledger.view_estimatemodel %}
|
{% if perms.django_ledger.view_estimatemodel %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'estimate_list' %}">
|
<a class="nav-link" href="{% url 'estimate_list' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span class="fas fa-clipboard-list"></span></span><span class="nav-link-text">{% trans "quotations"|capfirst %}</span>
|
<span class="nav-link-icon"><span class="fas fa-clipboard-list"></span></span><span class="nav-link-text">{% trans "quotations"|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -109,7 +109,7 @@
|
|||||||
|
|
||||||
{% if perms.django_ledger.view_invoicemodel %}
|
{% if perms.django_ledger.view_invoicemodel %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'invoice_list' %}">
|
<a class="nav-link" href="{% url 'invoice_list' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span class="fas fa-file-invoice"></span></span><span class="nav-link-text">{% trans "invoices"|capfirst %}</span>
|
<span class="nav-link-icon"><span class="fas fa-file-invoice"></span></span><span class="nav-link-text">{% trans "invoices"|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -118,7 +118,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.django_ledger.view_journalentrymodel %}
|
{% if perms.django_ledger.view_journalentrymodel %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'payment_list' %}">
|
<a class="nav-link" href="{% url 'payment_list' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span class="fas fa-money-check"></span></span><span class="nav-link-text">{% trans "payments"|capfirst %}</span>
|
<span class="nav-link-icon"><span class="fas fa-money-check"></span></span><span class="nav-link-text">{% trans "payments"|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -214,7 +214,7 @@
|
|||||||
<li class="collapsed-nav-item-title d-none">{% trans 'Financials' %}</li>
|
<li class="collapsed-nav-item-title d-none">{% trans 'Financials' %}</li>
|
||||||
{% if perms.django_ledger.view_accountmodel %}
|
{% if perms.django_ledger.view_accountmodel %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'account_list' %}">
|
<a class="nav-link" href="{% url 'account_list' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span class="fas fa-book-open"></span></span><span class="nav-link-text">{% trans 'Chart of Accounts'|capfirst %}</span>
|
<span class="nav-link-icon"><span class="fas fa-book-open"></span></span><span class="nav-link-text">{% trans 'Chart of Accounts'|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -223,7 +223,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.django_ledger.view_bankaccountmodel %}
|
{% if perms.django_ledger.view_bankaccountmodel %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'bank_account_list' %}">
|
<a class="nav-link" href="{% url 'bank_account_list' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span data-feather="credit-card"></span></span><span class="nav-link-text">{% trans 'Bank Accounts'|capfirst %}</span>
|
<span class="nav-link-icon"><span data-feather="credit-card"></span></span><span class="nav-link-text">{% trans 'Bank Accounts'|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -266,13 +266,13 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.django_ledger.view_billmodel %}
|
{% if perms.django_ledger.view_billmodel %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'bill_list' %}">
|
<a class="nav-link" href="{% url 'bill_list' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span class="fa-solid fa-money-bills"></span></span><span class="nav-link-text">{% trans 'bills'|capfirst %}</span>
|
<span class="nav-link-icon"><span class="fa-solid fa-money-bills"></span></span><span class="nav-link-text">{% trans 'bills'|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -364,7 +364,7 @@
|
|||||||
aria-label="Toggle Navigation">
|
aria-label="Toggle Navigation">
|
||||||
<span class="navbar-toggle-icon"><span class="toggle-line"></span></span>
|
<span class="navbar-toggle-icon"><span class="toggle-line"></span></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand me-1 me-sm-3" href="{% url 'home' %}">
|
<a class="navbar-brand me-1 me-sm-3" href="{% url 'home' request.dealer.slug %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<img class="logo-img d-dark-none" src="{% static 'images/logos/logo-d.png' %}" alt="haikal" width="27" />
|
<img class="logo-img d-dark-none" src="{% static 'images/logos/logo-d.png' %}" alt="haikal" width="27" />
|
||||||
<img class="logo-img d-light-none" src="{% static 'images/logos/logo.png' %}" alt="haikal" width="27" />
|
<img class="logo-img d-light-none" src="{% static 'images/logos/logo.png' %}" alt="haikal" width="27" />
|
||||||
|
|||||||
@ -15,5 +15,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
{% load crispy_forms_filters %}
|
{% load crispy_forms_filters %}
|
||||||
<form method="post"
|
<form method="post"
|
||||||
id="customCardForm"
|
id="customCardForm"
|
||||||
action="{% url 'add_custom_card' car.slug %}">
|
action="{% url 'add_custom_card' request.dealer.slug car.slug %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form|crispy }}
|
{{ form|crispy }}
|
||||||
<div class="d-flex gap-1">
|
<div class="d-flex gap-1">
|
||||||
|
|||||||
@ -166,7 +166,11 @@
|
|||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-sm btn-phoenix-success"
|
class="btn btn-sm btn-phoenix-success"
|
||||||
data-bs-toggle="modal"
|
data-bs-toggle="modal"
|
||||||
data-bs-target="#customCardModal">{% trans 'Add' %}</button>
|
data-bs-target="#mainModal"
|
||||||
|
hx-get="{% url 'add_custom_card' request.dealer.slug car.slug %}"
|
||||||
|
hx-target=".main-modal-body"
|
||||||
|
hx-swap="innerHTML"
|
||||||
|
>{% trans 'Add' %}</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -188,7 +192,12 @@
|
|||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-sm btn-phoenix-success"
|
class="btn btn-sm btn-phoenix-success"
|
||||||
data-bs-toggle="modal"
|
data-bs-toggle="modal"
|
||||||
data-bs-target="#registrationModal">{% trans 'Add' %}</button>
|
data-bs-target="#mainModal"
|
||||||
|
hx-get="{% url 'add_registration' request.dealer.slug car.slug %}"
|
||||||
|
hx-target=".main-modal-body"
|
||||||
|
hx-swap="innerHTML"
|
||||||
|
>{% trans 'Add' %}</button>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -219,7 +228,7 @@
|
|||||||
<div>
|
<div>
|
||||||
{% if not car.get_transfer %}
|
{% if not car.get_transfer %}
|
||||||
{% if perms.inventory.change_car %}
|
{% if perms.inventory.change_car %}
|
||||||
<a href="{% url 'car_update' car.slug %}"
|
<a href="{% url 'car_update' request.dealer.slug car.slug %}"
|
||||||
class="btn btn-phoenix-warning btn-sm mt-1">{% trans "Edit" %}</a>
|
class="btn btn-phoenix-warning btn-sm mt-1">{% trans "Edit" %}</a>
|
||||||
<a href="{% url 'transfer' car.slug %}"
|
<a href="{% url 'transfer' car.slug %}"
|
||||||
class="btn btn-phoenix-danger btn-sm">
|
class="btn btn-phoenix-danger btn-sm">
|
||||||
@ -277,7 +286,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
{% if not car.get_transfer %}
|
{% if not car.get_transfer %}
|
||||||
<a href="{% url 'car_finance_update' car.finances.pk %}"
|
<a href="{% url 'car_finance_update' request.dealer.slug car.finances.pk %}"
|
||||||
class="btn btn-phoenix-warning btn-sm mb-3">{% trans "Edit" %}</a>
|
class="btn btn-phoenix-warning btn-sm mb-3">{% trans "Edit" %}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="badge bg-danger">{% trans "Cannot Edit, Car in Transfer." %}</span>
|
<span class="badge bg-danger">{% trans "Cannot Edit, Car in Transfer." %}</span>
|
||||||
@ -285,7 +294,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans "No finance details available." %}</p>
|
<p>{% trans "No finance details available." %}</p>
|
||||||
{% if perms.inventory.add_carfinance %}
|
{% if perms.inventory.add_carfinance %}
|
||||||
<a href="{% url 'car_finance_create' car.slug %}"
|
<a href="{% url 'car_finance_create' request.dealer.slug car.slug %}"
|
||||||
class="btn btn-phoenix-success btn-sm mb-3">{% trans "Add" %}</a>
|
class="btn btn-phoenix-success btn-sm mb-3">{% trans "Add" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
@ -327,7 +336,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
{% if not car.get_transfer %}
|
{% if not car.get_transfer %}
|
||||||
<a href="{% url 'car_colors_update' car.slug %}"
|
<a href="{% url 'car_colors_update' request.dealer.slug car.slug %}"
|
||||||
class="btn btn-phoenix-warning btn-sm mb-3">{% trans "Edit" %}</a>
|
class="btn btn-phoenix-warning btn-sm mb-3">{% trans "Edit" %}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="badge bg-danger">{% trans "Cannot Edit, Car in Transfer." %}</span>
|
<span class="badge bg-danger">{% trans "Cannot Edit, Car in Transfer." %}</span>
|
||||||
@ -340,7 +349,7 @@
|
|||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<p>{% trans "No color details available." %}</p>
|
<p>{% trans "No color details available." %}</p>
|
||||||
{% if perms.inventory.add_carcolors %}
|
{% if perms.inventory.add_carcolors %}
|
||||||
<a class="btn btn-phoenix-success btn-sm mb-3" href="{% url 'add_color' car.slug %}">{{ _("Add Color") }}</a>
|
<a class="btn btn-phoenix-success btn-sm mb-3" href="{% url 'add_color' request.dealer.slug car.slug %}">{{ _("Add Color") }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -372,7 +381,7 @@
|
|||||||
<td>{{ reservation.reserved_until }}</td>
|
<td>{{ reservation.reserved_until }}</td>
|
||||||
<td>
|
<td>
|
||||||
{% if reservation.is_active %}
|
{% if reservation.is_active %}
|
||||||
<form method="post" action="{% url 'reservations' reservation.id %}">
|
<form method="post" action="{% url 'reservations' request.dealer.slug reservation.id %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
@ -495,22 +504,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Registration Modal -->
|
<!-- Main Modal -->
|
||||||
<div class="modal fade"
|
<div class="modal fade"
|
||||||
id="registrationModal"
|
id="mainModal"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
aria-labelledby="registrationModalLabel"
|
aria-labelledby="mainModalLabel"
|
||||||
aria-hidden="true">
|
aria-hidden="true">
|
||||||
<div class="modal-dialog modal-sm">
|
<div class="modal-dialog modal-sm">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="registrationModalLabel">{% trans 'Registration' %}</h5>
|
<h5 class="modal-title" id="mainModalLabel">{% trans 'Registration' %}</h5>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn-close"
|
class="btn-close"
|
||||||
data-bs-dismiss="modal"
|
data-bs-dismiss="modal"
|
||||||
aria-label="Close"></button>
|
aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="main-modal-body" style="padding: 20px;">
|
||||||
<!-- Content will be loaded here via AJAX -->
|
<!-- Content will be loaded here via AJAX -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -532,7 +541,7 @@
|
|||||||
aria-label="Close"></button>
|
aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">{% trans 'Are you sure you want to reserve this car?' %}</div>
|
<div class="modal-body">{% trans 'Are you sure you want to reserve this car?' %}</div>
|
||||||
<form method="POST" action="{% url 'reserve_car' car.slug %}" class="form ">
|
<form method="POST" action="{% url 'reserve_car' request.dealer.slug car.slug %}" class="form">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="p-1">
|
<div class="p-1">
|
||||||
<div class="d-flex gap-1">
|
<div class="d-flex gap-1">
|
||||||
@ -577,52 +586,11 @@
|
|||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
const csrftoken = getCookie("csrftoken");
|
const csrftoken = getCookie("csrftoken");
|
||||||
const ajaxUrl = "{% url 'ajax_handler' %}";
|
const ajaxUrl = "{% url 'ajax_handler' request.dealer.slug %}";
|
||||||
|
|
||||||
|
|
||||||
const customCardModal = document.getElementById("customCardModal");
|
|
||||||
const modalBody = customCardModal.querySelector(".modal-body");
|
const modalBody = customCardModal.querySelector(".modal-body");
|
||||||
|
|
||||||
// When the modal is triggered, load the form
|
|
||||||
customCardModal.addEventListener("show.bs.modal", function () {
|
|
||||||
const url = "{% url 'add_custom_card' car.slug %}";
|
|
||||||
|
|
||||||
fetch(url)
|
|
||||||
.then((response) => response.text())
|
|
||||||
.then((html) => {
|
|
||||||
modalBody.innerHTML = html;
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
modalBody.innerHTML = '<p class="text-danger">Error loading form. Please try again later.</p>';
|
|
||||||
console.error("Error loading form:", error);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
customCardModal.addEventListener("hidden.bs.modal", function () {
|
|
||||||
modalBody.innerHTML = "";
|
|
||||||
});
|
|
||||||
|
|
||||||
const registrationModal = document.getElementById("registrationModal");
|
|
||||||
const modalBody_r = registrationModal.querySelector(".modal-body");
|
|
||||||
|
|
||||||
// When the modal is triggered, load the form
|
|
||||||
registrationModal.addEventListener("show.bs.modal", function () {
|
|
||||||
const url = "{% url 'add_registration' car.slug %}";
|
|
||||||
|
|
||||||
fetch(url)
|
|
||||||
.then((response) => response.text())
|
|
||||||
.then((html) => {
|
|
||||||
modalBody_r.innerHTML = html;
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
modalBody_r.innerHTML = '<p class="text-danger">{{_("Error loading form. Please try again later")}}.</p>';
|
|
||||||
console.error("Error loading form:", error);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
registrationModal.addEventListener("hidden.bs.modal", function () {
|
|
||||||
modalBody_r.innerHTML = "";
|
|
||||||
});
|
|
||||||
|
|
||||||
const showSpecificationButton = document.getElementById("specification-btn");
|
const showSpecificationButton = document.getElementById("specification-btn");
|
||||||
const specificationsContent = document.getElementById("specificationsContent");
|
const specificationsContent = document.getElementById("specificationsContent");
|
||||||
|
|
||||||
@ -689,7 +657,7 @@
|
|||||||
document.querySelectorAll(".reserve-btn").forEach((button) => {
|
document.querySelectorAll(".reserve-btn").forEach((button) => {
|
||||||
button.addEventListener("click", async function () {
|
button.addEventListener("click", async function () {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`{% url 'reserve_car' car.slug %}`, {
|
const response = await fetch(`{% url 'reserve_car' request.dealer.slug car.slug %}`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"X-CSRFToken": csrfToken,
|
"X-CSRFToken": csrfToken,
|
||||||
|
|||||||
@ -29,13 +29,6 @@
|
|||||||
{{ form|crispy }}
|
{{ form|crispy }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% comment %} <div class="row g-1">
|
|
||||||
<div class="btn-group">
|
|
||||||
<button type="submit" class="btn btn-sm btn-success me-1"><i class="fa-solid fa-floppy-disk"></i>{% trans "Save" %}</button>
|
|
||||||
<a href="{{request.META.HTTP_REFERER}}" class="btn btn-sm btn-danger"><i class="fa-solid fa-ban"></i>{% trans "Cancel" %}</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div> {% endcomment %}
|
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<button class="btn btn-sm btn-phoenix-success me-2" type="submit">
|
<button class="btn btn-sm btn-phoenix-success me-2" type="submit">
|
||||||
<i class="fa-solid fa-floppy-disk me-1"></i>
|
<i class="fa-solid fa-floppy-disk me-1"></i>
|
||||||
|
|||||||
@ -346,7 +346,7 @@
|
|||||||
const optionsContent = document.getElementById("optionsContent")
|
const optionsContent = document.getElementById("optionsContent")
|
||||||
const generationContainer = document.getElementById("generation-div")
|
const generationContainer = document.getElementById("generation-div")
|
||||||
|
|
||||||
const ajaxUrl = "{% url 'ajax_handler' %}";
|
const ajaxUrl = "{% url 'ajax_handler' request.dealer.slug %}";
|
||||||
|
|
||||||
const closeButton = document.querySelector(".btn-close");
|
const closeButton = document.querySelector(".btn-close");
|
||||||
const scanVinBtn = document.getElementById("scan-vin-btn");
|
const scanVinBtn = document.getElementById("scan-vin-btn");
|
||||||
|
|||||||
@ -330,7 +330,7 @@
|
|||||||
const optionsContent = document.getElementById("optionsContent")
|
const optionsContent = document.getElementById("optionsContent")
|
||||||
const generationContainer = document.getElementById("generation-div")
|
const generationContainer = document.getElementById("generation-div")
|
||||||
|
|
||||||
const ajaxUrl = "{% url 'ajax_handler' %}";
|
const ajaxUrl = "{% url 'ajax_handler' request.dealer.slug %}";
|
||||||
|
|
||||||
const closeButton = document.querySelector(".btn-close");
|
const closeButton = document.querySelector(".btn-close");
|
||||||
const scanVinBtn = document.getElementById("scan-vin-btn");
|
const scanVinBtn = document.getElementById("scan-vin-btn");
|
||||||
|
|||||||
@ -93,7 +93,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td class="align-middle white-space-nowrap text-start">
|
<td class="align-middle white-space-nowrap text-start">
|
||||||
<a class="fs-9 fw-bold" href="{% url 'car_detail' car.slug %}">{{ car.vin }}</a>
|
<a class="fs-9 fw-bold" href="{% url 'car_detail' request.dealer.slug car.slug %}">{{ car.vin }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="align-middle white-space-nowrap text-center fw-bold">{{ car.year }}</td>
|
<td class="align-middle white-space-nowrap text-center fw-bold">{{ car.year }}</td>
|
||||||
{% if car.colors %}
|
{% if car.colors %}
|
||||||
@ -147,14 +147,14 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="align-middle white-space-nowrap text-end pe-0 ps-4">
|
<td class="align-middle white-space-nowrap text-end pe-0 ps-4">
|
||||||
<a class="btn btn-sm btn-phoenix-success"
|
<a class="btn btn-sm btn-phoenix-success"
|
||||||
href="{% url 'car_detail' car.slug %}">{% trans "view"|capfirst %}</a>
|
href="{% url 'car_detail' request.dealer.slug car.slug %}">{% trans "view"|capfirst %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="7" class="d-flex flex-column align-items-center">
|
<td colspan="7" class="d-flex flex-column align-items-center">
|
||||||
<p class="text-muted">{% trans "No cars available." %}</p>
|
<p class="text-muted">{% trans "No cars available." %}</p>
|
||||||
<a href="{% url 'add_car' %}" class="btn btn-phoenix-primary">{% trans "Add a Car" %}</a>
|
<a href="{% url 'add_car' request.dealer.slug %}" class="btn btn-phoenix-primary">{% trans "Add a Car" %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@ -25,88 +25,88 @@
|
|||||||
{% endblock customCSS %}
|
{% endblock customCSS %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container-fluid" id="projectSummary">
|
<div class="container-fluid" id="projectSummary">
|
||||||
<div class="row g-3 justify-content-between align-items-end mb-4">
|
<div class="row g-3 justify-content-between align-items-end mb-4">
|
||||||
<div class="col-12 col-sm-auto">
|
<div class="col-12 col-sm-auto">
|
||||||
<h2 class="text-body-emphasis fw-bold mb-0">{{ _("Inventory") }}</h2>
|
<h2 class="text-body-emphasis fw-bold mb-0">{{ _("Inventory") }}</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row g-3 justify-content-between align-items-end mb-2">
|
<div class="row g-3 justify-content-between align-items-end mb-2">
|
||||||
<div class="col-4 col-sm-auto">
|
<div class="col-4 col-sm-auto">
|
||||||
<ul
|
<ul
|
||||||
class="nav nav-links mx-n2"
|
class="nav nav-links mx-n2"
|
||||||
hx-boost="true"
|
hx-boost="true"
|
||||||
hx-push-url="false"
|
hx-push-url="false"
|
||||||
hx-target=".table-responsive"
|
hx-target=".table-responsive"
|
||||||
hx-select=".table-responsive"
|
hx-select=".table-responsive"
|
||||||
hx-swap="innerHTML show:window:top"
|
hx-swap="innerHTML show:window:top"
|
||||||
hx-indicator=".htmx-indicator"
|
hx-indicator=".htmx-indicator"
|
||||||
hx-on::before-request="on_before_request()"
|
hx-on::before-request="on_before_request()"
|
||||||
hx-on::after-request="on_after_request()">
|
hx-on::after-request="on_after_request()">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link px-2 py-1 active" aria-current="page" href="{% url 'car_list' %}"><span>{{ _("All") }}</span><span class="text-body-tertiary fw-semibold">({{ stats.all }})</span></a>
|
<a class="nav-link px-2 py-1 active" aria-current="page" href="{% url 'car_list' request.dealer.slug %}"><span>{{ _("All") }}</span><span class="text-body-tertiary fw-semibold">({{ stats.all }})</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link px-2 py-1" href="{% url 'car_list' %}?status=available"><span>{{ _("Available") }}</span><span class="text-body-tertiary fw-semibold">({{ stats.available }})</span></a>
|
<a class="nav-link px-2 py-1" href="{% url 'car_list' request.dealer.slug %}?status=available"><span>{{ _("Available") }}</span><span class="text-body-tertiary fw-semibold">({{ stats.available }})</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link px-2 py-1" href="{% url 'car_list' %}?status=reserved"><span>{{ _("Reserved") }}</span><span class="text-body-tertiary fw-semibold">({{ stats.reserved }})</span></a>
|
<a class="nav-link px-2 py-1" href="{% url 'car_list' request.dealer.slug %}?status=reserved"><span>{{ _("Reserved") }}</span><span class="text-body-tertiary fw-semibold">({{ stats.reserved }})</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link px-2 py-1" href="{% url 'car_list' %}?status=transfer"><span>{{ _("Transfer") }}</span><span class="text-body-tertiary fw-semibold">({{ stats.transfer }})</span></a>
|
<a class="nav-link px-2 py-1" href="{% url 'car_list' request.dealer.slug %}?status=transfer"><span>{{ _("Transfer") }}</span><span class="text-body-tertiary fw-semibold">({{ stats.transfer }})</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link px-2 py-1" href="{% url 'car_list' %}?status=sold"><span>{{ _("Sold") }}</span><span class="text-body-tertiary fw-semibold">({{ stats.sold }})</span></a>
|
<a class="nav-link px-2 py-1" href="{% url 'car_list' request.dealer.slug %}?status=sold"><span>{{ _("Sold") }}</span><span class="text-body-tertiary fw-semibold">({{ stats.sold }})</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<button hx-on:click="toggle_filter()" class="btn btn-sm btn-phoenix-primary px-2 py-1">
|
<button hx-on:click="toggle_filter()" class="btn btn-sm btn-phoenix-primary px-2 py-1">
|
||||||
<span><span class="fa fa-filter me-1"></span>{{ _("Filter") }}</span>
|
<span><span class="fa fa-filter me-1"></span>{{ _("Filter") }}</span>
|
||||||
<span class="fas fa-caret-down fs-9 ms-1 filter-icon"></span>
|
<span class="fas fa-caret-down fs-9 ms-1 filter-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 col-sm-auto">
|
<div class="col-4 col-sm-auto">
|
||||||
<form hx-boost="true" action="{% url 'bulk_update_car_price' %}" method="post" hx-include=".car-checkbox" class="update-price-form d-flex flex-row align-items-center ms-auto d-none" style="float: right;">
|
<form hx-boost="true" action="{% url 'bulk_update_car_price' %}" method="post" hx-include=".car-checkbox" class="update-price-form d-flex flex-row align-items-center ms-auto d-none" style="float: right;">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input class="form-control" type="number" placeholder='{{ _("Price") }}' name="price" aria-label="Price" id="price" />
|
<input class="form-control" type="number" placeholder='{{ _("Price") }}' name="price" aria-label="Price" id="price" />
|
||||||
<button class="btn btn-sm btn-phoenix-primary" type="submit">{{ _("Update") }}</button>
|
<button class="btn btn-sm btn-phoenix-primary" type="submit">{{ _("Update") }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-auto">
|
||||||
|
<div class="d-flex align-items-center">
|
||||||
|
<div class="spinner-border mx-3 htmx-indicator" role="status">
|
||||||
|
<span class="visually-hidden">Loading...</span>
|
||||||
|
</div>
|
||||||
|
<div class="search-box me-3">
|
||||||
|
<form class="position-relative">
|
||||||
|
<input
|
||||||
|
class="form-control search-input search"
|
||||||
|
name="search"
|
||||||
|
type="search"
|
||||||
|
placeholder="Search"
|
||||||
|
aria-label="Search"
|
||||||
|
hx-get="{% url 'car_list' request.dealer.slug %}"
|
||||||
|
hx-trigger="keyup changed delay:500ms"
|
||||||
|
hx-target=".table-responsive"
|
||||||
|
hx-select=".table-responsive"
|
||||||
|
hx-swap="innerHTML show:window:top"
|
||||||
|
hx-indicator=".htmx-indicator"
|
||||||
|
hx-on::before-request="on_before_request()"
|
||||||
|
hx-on::after-request="on_after_request()"
|
||||||
|
/>
|
||||||
|
<span class="fas fa-search search-box-icon"></span>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
<div class="col-4 col-sm-auto">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<div class="spinner-border mx-3 htmx-indicator" role="status">
|
|
||||||
<span class="visually-hidden">Loading...</span>
|
|
||||||
</div>
|
|
||||||
<div class="search-box me-3">
|
|
||||||
<form class="position-relative">
|
|
||||||
<input
|
|
||||||
class="form-control search-input search"
|
|
||||||
name="search"
|
|
||||||
type="search"
|
|
||||||
placeholder="Search"
|
|
||||||
aria-label="Search"
|
|
||||||
hx-get="{% url 'car_list' %}"
|
|
||||||
hx-trigger="keyup changed delay:500ms"
|
|
||||||
hx-target=".table-responsive"
|
|
||||||
hx-select=".table-responsive"
|
|
||||||
hx-swap="innerHTML show:window:top"
|
|
||||||
hx-indicator=".htmx-indicator"
|
|
||||||
hx-on::before-request="on_before_request()"
|
|
||||||
hx-on::after-request="on_after_request()"
|
|
||||||
/>
|
|
||||||
<span class="fas fa-search search-box-icon"></span>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="d-flex align-items-center d-none filter">
|
<div class="d-flex align-items-center d-none filter">
|
||||||
<select
|
<select
|
||||||
hx-get="{% url 'car_list' %}"
|
hx-get="{% url 'car_list' request.dealer.slug %}"
|
||||||
name="make"
|
name="make"
|
||||||
hx-target=".model-select"
|
hx-target=".model-select"
|
||||||
hx-select=".model-select"
|
hx-select=".model-select"
|
||||||
@ -122,7 +122,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<select
|
<select
|
||||||
hx-get="{% url 'car_list' %}"
|
hx-get="{% url 'car_list' request.dealer.slug %}"
|
||||||
hx-include=".make"
|
hx-include=".make"
|
||||||
name="model"
|
name="model"
|
||||||
hx-target=".year"
|
hx-target=".year"
|
||||||
@ -153,7 +153,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<button
|
<button
|
||||||
id="search"
|
id="search"
|
||||||
hx-get="{% url 'car_list' %}"
|
hx-get="{% url 'car_list' request.dealer.slug %}"
|
||||||
hx-include=".make,.model,.year,.car_status"
|
hx-include=".make,.model,.year,.car_status"
|
||||||
hx-indicator=".htmx-indicator"
|
hx-indicator=".htmx-indicator"
|
||||||
hx-target=".table-responsive"
|
hx-target=".table-responsive"
|
||||||
@ -165,149 +165,147 @@
|
|||||||
{{ _("Search") }}
|
{{ _("Search") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive scrollbar">
|
<div class="table-responsive scrollbar">
|
||||||
<div class="d-flex flex-wrap align-items-center justify-content-between py-3 pe-0 fs-9">
|
<div class="d-flex flex-wrap align-items-center justify-content-between py-3 pe-0 fs-9">
|
||||||
<div
|
<div
|
||||||
class="d-flex"
|
class="d-flex"
|
||||||
hx-boost="true"
|
hx-boost="true"
|
||||||
hx-push-url="false"
|
hx-push-url="false"
|
||||||
hx-include=".make,.model,.year,.car_status"
|
hx-include=".make,.model,.year,.car_status"
|
||||||
hx-target=".table-responsive"
|
hx-target=".table-responsive"
|
||||||
hx-select=".table-responsive"
|
hx-select=".table-responsive"
|
||||||
hx-swap="innerHTML show:window:top"
|
hx-swap="innerHTML show:window:top"
|
||||||
hx-indicator=".htmx-indicator"
|
hx-indicator=".htmx-indicator"
|
||||||
hx-on::before-request="on_before_request()"
|
hx-on::before-request="on_before_request()"
|
||||||
hx-on::after-request="on_after_request()">
|
hx-on::after-request="on_after_request()"></div>
|
||||||
|
<div class="w-100 list table-responsive" >
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input ms-4" type="checkbox" id="select-all" /> <span class="ms-1 text-body-tertiary">{{ _("Select All") }}</span>
|
||||||
</div>
|
</div>
|
||||||
<table class="table fs-9 mb-0 border-top border-translucent">
|
{% for car in cars %}
|
||||||
<thead>
|
<div class="card border mb-3 py-0 px-0" id="project-list-table-body">
|
||||||
<tr>
|
<div class="card-body">
|
||||||
<th class="sort white-space-nowrap align-middle" scope="col">
|
<div class="row align-items-center">
|
||||||
<div class="form-check">
|
<div class="col-auto">
|
||||||
<input class="form-check-input" type="checkbox" id="select-all" />
|
<div class="form-check">
|
||||||
</div>
|
<input class="form-check-input car-checkbox" type="checkbox" name="car" value="{{ car.pk }}" id="car-{{car.pk}}" />
|
||||||
</th>
|
</div>
|
||||||
<th class="sort white-space-nowrap align-middle" scope="col">{{ _("VIN") }}</th>
|
</div>
|
||||||
<th class="sort white-space-nowrap align-middle" scope="col" data-sort="make">{{ _("Make") }}</th>
|
<!-- Vehicle Image/Icon -->
|
||||||
<th class="sort white-space-nowrap align-middle" scope="col" data-sort="model">{{ _("Model") }}</th>
|
<div class="col-auto">
|
||||||
<th class="sort white-space-nowrap align-middle" scope="col" data-sort="year">{{ _("Year") }}</th>
|
<div class="avatar avatar-3xl">
|
||||||
<th class="sort white-space-nowrap align-middle" scope="col">{{ _("Trim") }}</th>
|
<img class="rounded-soft shadow shadow-lg" src="{% static 'images/cars/' %}{{ car.vin }}.png" alt="{{ car.vin }}" />
|
||||||
<th class="sort white-space-nowrap align-middle" scope="col">{{ _("Color") }}</th>
|
</div>
|
||||||
<th class="sort white-space-nowrap align-middle" scope="col">{{ _("Date Received") }}</th>
|
</div>
|
||||||
<th class="sort white-space-nowrap align-middle" scope="col" data-sort="car_status">{{ _("Status") }}</th>
|
<!-- Vehicle Details -->
|
||||||
<th class="sort white-space-nowrap align-middle" scope="col">{{ _("Inventory Ready") }}</th>
|
<div class="col">
|
||||||
<th class="sort white-space-nowrap align-middle" scope="col"></th>
|
<div class="row">
|
||||||
</tr>
|
<!-- Make/Model/Specs -->
|
||||||
</thead>
|
<div class="col-md-4">
|
||||||
<tbody class="list" id="project-list-table-body">
|
<h5 class="text-body-emphasis fw-bold">{{ car.year }}</h5>
|
||||||
{% for car in cars %}
|
<p class="text-body-emphasis fw-bold">
|
||||||
<tr class="position-static">
|
<a href="{% url 'car_detail' request.dealer.slug car.slug %}" class="text-decoration-none text-body-emphasis">
|
||||||
<td class="align-middle time white-space-nowrap">
|
{{ car.id_car_make.get_local_name }}
|
||||||
<div class="form-check">
|
</a>
|
||||||
<input class="form-check-input car-checkbox"
|
<small>{{ car.id_car_model.get_local_name }}</small>
|
||||||
type="checkbox"
|
</p>
|
||||||
name="car"
|
<small class="text-body-secondary" dir="ltr">
|
||||||
value="{{ car.pk }}"
|
{{ car.id_car_trim }}
|
||||||
id="car-{{car.pk}}" />
|
</small>
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td class="align-middle white-space-nowrap assignees">
|
|
||||||
<a class="fw-bold" href="{% url 'car_detail' car.slug %}">{{ car.vin }}</a>
|
|
||||||
</td>
|
|
||||||
<td class="align-middle white-space-nowrap make">
|
|
||||||
<p class="mb-0 fs-9 text-body">{{ car.id_car_make.get_local_name|default:car.id_car_make.name }}</p>
|
|
||||||
</td>
|
|
||||||
<td class="align-middle white-space-nowrap model">
|
|
||||||
<p class="mb-0 fs-9 text-body">{{ car.id_car_model.get_local_name|default:car.id_car_model.name }}</p>
|
|
||||||
</td>
|
|
||||||
<td class="align-middle white-space-nowrap year">
|
|
||||||
<p class="fw-bo text-body fs-9 mb-0">{{ car.year }}</p>
|
|
||||||
</td>
|
|
||||||
<td class="align-middle white-space-nowrap">
|
|
||||||
<p class="text-body-secondary fs-10 mb-0">{{ car.id_car_trim }}</p>
|
|
||||||
</td>
|
|
||||||
<td class="align-middle white-space-nowrap">
|
|
||||||
<div class="d-flex flex-row align-items-center">
|
|
||||||
<div class="d-flex flex-column align-items-center">
|
|
||||||
<span class="color-div"
|
|
||||||
style="background: linear-gradient(90deg, rgba({{ car.colors.exterior.rgb }},1) 10%, rgba({{ car.colors.exterior.rgb }},0.10) 100%)"
|
|
||||||
title="{{ car.colors.exterior.get_local_name }}"></span><span>{{ car.colors.exterior.get_local_name }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex flex-column align-items-center">
|
|
||||||
<span class="color-div"
|
|
||||||
style="background: linear-gradient(90deg, rgba({{ car.colors.interior.rgb }},1) 10%, rgba({{ car.colors.interior.rgb }},0.10) 100%)"
|
|
||||||
title="{{ car.colors.interior.get_local_name }}"></span><span>{{ car.colors.interior.get_local_name }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td class="align-middle white-space-nowrap">
|
|
||||||
<p class="fw-bold text-body mb-0">{{ car.receiving_date|naturalday|capfirst }}</p>
|
|
||||||
</td>
|
|
||||||
<td class="align-middle white-space-nowrap statuses">
|
|
||||||
{% if car.status == "available" %}
|
|
||||||
<span class="badge badge-phoenix fs-11 badge-phoenix-success">{{ _("Available") }}</span>
|
|
||||||
{% elif car.status == "reserved" %}
|
|
||||||
<span class="badge badge-phoenix fs-11 badge-phoenix-danger">{{ _("Reserved") }}</span>
|
|
||||||
{% elif car.status == "sold" %}
|
|
||||||
<span class="badge badge-phoenix fs-11 badge-phoenix-info">{{ _("Sold") }}</span>
|
|
||||||
{% elif car.status == "transfer" %}
|
|
||||||
<span class="badge badge-phoenix fs-11 badge-phoenix-warning">{{ _("Transfer") }}</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td class="align-middle white-space-nowrap">
|
|
||||||
{% if not car.ready %}
|
|
||||||
<span class="text-danger"> {{ _("NO") }} </span>
|
|
||||||
{%else%}
|
|
||||||
<span class="text-success"> {{ _("YES") }} </span>
|
|
||||||
{%endif%}
|
|
||||||
</td>
|
|
||||||
<td class="align-middle text-end white-space-nowrap pe-0 action">
|
|
||||||
<div class="btn-reveal-trigger position-static">
|
|
||||||
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10"
|
|
||||||
type="button"
|
|
||||||
data-bs-toggle="dropdown"
|
|
||||||
data-boundary="window"
|
|
||||||
aria-haspopup="true"
|
|
||||||
aria-expanded="false"
|
|
||||||
data-bs-reference="parent">
|
|
||||||
<span class="fas fa-ellipsis-h fs-10"></span>
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu dropdown-menu-end py-2">
|
|
||||||
<a class="dropdown-item" href="{% url 'car_detail' car.slug %}">{{ _("View") }}</a>
|
|
||||||
<a class="dropdown-item" href="#!">{{ _("Export") }}</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% empty %}
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="text-center py-5">
|
|
||||||
<div class="text-body-secondary">
|
|
||||||
<i class="fas fa-car fa-4x mb-3 opacity-50"></i>
|
|
||||||
<h4 class="text-body-secondary">{{ _("No vehicles found") }}</h4>
|
|
||||||
<p class="text-body-tertiary">{{ _("Try adjusting your search criteria or filters") }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
<!-- Color and Date -->
|
||||||
</table>
|
<div class="col-md-3">
|
||||||
</div>
|
<p class="text-body mb-1">
|
||||||
</div>
|
{{ car.colors.exterior.get_local_name }}
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
</p>
|
||||||
|
<small class="text-body-secondary">
|
||||||
<div class="d-flex justify-content-end mt-3">
|
{{ car.receiving_date|naturalday|capfirst }}
|
||||||
|
</small>
|
||||||
<div class="d-flex">
|
</div>
|
||||||
{% include 'partials/pagination.html'%}
|
|
||||||
</div>
|
<!-- Status Badge -->
|
||||||
|
<div class="col-md-3">
|
||||||
|
{% if car.status == "available" %}
|
||||||
|
<span class="badge badge-phoenix fs-10 badge-phoenix-success text-uppercase px-3 py-2">{{ _("Available") }}</span>
|
||||||
|
{% elif car.status == "reserved" %}
|
||||||
|
<span class="badge badge-phoenix fs-10 badge-phoenix-warning text-uppercase px-3 py-2">{{ _("Reserved") }}</span>
|
||||||
|
{% elif car.status == "sold" %}
|
||||||
|
<span class="badge badge-phoenix fs-10 badge-phoenix-danger text-uppercase px-3 py-2">{{ _("Sold") }}</span>
|
||||||
|
{% elif car.status == "transfer" %}
|
||||||
|
<span class="badge badge-phoenix fs-10 badge-phoenix-info text-uppercase px-3 py-2">{{ _("Transfer") }}</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Ready Status -->
|
||||||
|
<div class="col-md-2">
|
||||||
|
<div class="d-flex align-items-center">
|
||||||
|
<span class="fs-10 fw-light me-2">{{ _("Inventory Ready") }}</span>
|
||||||
|
{% if car.ready %}
|
||||||
|
<span class="badge bg-success rounded-circle p-1 me-2">
|
||||||
|
<span class="visually-hidden">Ready</span>
|
||||||
|
</span>
|
||||||
|
<span class="text-success fw-bold">{{ _("Yes") }}</span>
|
||||||
|
{% else %}
|
||||||
|
<span class="badge bg-danger rounded-circle p-1 me-2">
|
||||||
|
<span class="visually-hidden">Not Ready</span>
|
||||||
|
</span>
|
||||||
|
<span class="text-danger fw-bold">{{ _("No") }}</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Action Menu -->
|
||||||
|
<div class="col-auto">
|
||||||
|
<div class="btn-reveal-trigger position-static">
|
||||||
|
<button
|
||||||
|
class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="dropdown"
|
||||||
|
data-boundary="window"
|
||||||
|
aria-haspopup="true"
|
||||||
|
aria-expanded="false"
|
||||||
|
data-bs-reference="parent">
|
||||||
|
<span class="fas fa-ellipsis-h fs-10"></span>
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu dropdown-menu-end py-2">
|
||||||
|
<a class="dropdown-item" href="{% url 'car_detail' request.dealer.slug car.slug %}"> <span class="fas fa-eye me-2"></span>{{ _("View") }} </a>
|
||||||
|
<a class="dropdown-item" href="{% url 'car_update' request.dealer.slug car.slug %}"> <span class="fas fa-edit me-2"></span>{{ _("Edit") }} </a>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item text-danger" href="{% url 'car_delete' request.dealer.slug car.slug %}"> <span class="fas fa-trash me-2"></span>{{ _("Remove") }} </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
|
{% empty %}
|
||||||
|
<div class="text-center py-5">
|
||||||
|
<div class="text-body-secondary">
|
||||||
|
<span class="fas fa-car fa-4x mb-3 opacity-50"></span>
|
||||||
|
<h4 class="text-body-secondary">{{ _("No vehicles found") }}</h4>
|
||||||
|
<p class="text-body-tertiary">{{ _("Try adjusting your search criteria or filters") }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
|
<div class="d-flex">
|
||||||
|
{% include 'partials/pagination.html'%}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block customJS %}
|
{% block customJS %}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<div class="w-100 g-3">
|
<div class="w-100 g-3">
|
||||||
<form method="post"
|
<form method="post"
|
||||||
id="registrationForm"
|
id="registrationForm"
|
||||||
action="{% url 'add_registration' car.slug %}">
|
action="{% url 'add_registration' request.dealer.slug car.slug %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form|crispy }}
|
{{ form|crispy }}
|
||||||
<div class="d-flex gap-1">
|
<div class="d-flex gap-1">
|
||||||
|
|||||||
@ -67,7 +67,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{% for trim in model.trims %}
|
{% for trim in model.trims %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'car_inventory' make_id=make.slug model_id=model.slug trim_id=trim.slug %}">{{ trim.trim_name }}</a> - {% trans "Total" %}:
|
<a href="{% url 'car_inventory' dealer_slug=request.dealer.slug make_id=make.slug model_id=model.slug trim_id=trim.slug %}">{{ trim.trim_name }}</a> - {% trans "Total" %}:
|
||||||
<strong>{{ trim.total_cars }}</strong>
|
<strong>{{ trim.total_cars }}</strong>
|
||||||
</li>
|
</li>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
@ -86,15 +86,15 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% if is_paginated %}
|
{% if is_paginated %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@ -13,12 +13,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
{% for i in inventory_list %}
|
{% for i in inventory_list %}
|
||||||
|
|
||||||
<tr class="hover-actions-trigger">
|
<tr class="hover-actions-trigger">
|
||||||
|
|
||||||
<td class="ps-2 fw-medium">{{ i.item_model__name }}</td>
|
<td class="ps-2 fw-medium">{{ i.item_model__name }}</td>
|
||||||
<td class="ps-2 fw-medium">{{ i.item_model__name }}</td>
|
<td class="ps-2 fw-medium">{{ i.item_model__name }}</td>
|
||||||
<td class="text-center">{{ i.item_model__uom__name }}</td>
|
<td class="text-center">{{ i.item_model__uom__name }}</td>
|
||||||
<td class="text-end pe-3">{{ i.total_quantity | floatformat:3 }}</td>
|
<td class="text-end pe-3">{{ i.total_quantity | floatformat:3 }}</td>
|
||||||
|
|||||||
@ -61,16 +61,16 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -62,16 +62,16 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -52,14 +52,14 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<div class="d-flex justify-content-between mb-2">
|
<div class="d-flex justify-content-between mb-2">
|
||||||
<h3 class="">{% trans "Bills" %}</h3>
|
<h3 class="">{% trans "Bills" %}</h3>
|
||||||
<a href="{% url 'bill-create' entity.slug %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans 'New Bill' %}</a>
|
<a href="{% url 'bill-create' request.dealer.slug entity.slug %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans 'New Bill' %}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@ -81,7 +81,7 @@
|
|||||||
<div class="btn-reveal-trigger position-static">
|
<div class="btn-reveal-trigger position-static">
|
||||||
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
|
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
|
||||||
<div class="dropdown-menu dropdown-menu-end py-2">
|
<div class="dropdown-menu dropdown-menu-end py-2">
|
||||||
<a href="{% url 'bill-detail' entity_slug=entity.slug bill_pk=bill.pk %}" class="dropdown-item text-success-dark">{% trans 'View Bill detail' %}</a>
|
<a href="{% url 'bill-detail' dealer_slug=request.dealer.slug entity_slug=entity.slug bill_pk=bill.pk %}" class="dropdown-item text-success-dark">{% trans 'View' %}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -96,16 +96,16 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-sm btn-phoenix-secondary" data-bs-dismiss="modal">{% trans 'No' %}</button>
|
<button type="button" class="btn btn-sm btn-phoenix-secondary" data-bs-dismiss="modal">{% trans 'No' %}</button>
|
||||||
<div class="btn btn-sm btn-phoenix-danger">
|
<div class="btn btn-sm btn-phoenix-danger">
|
||||||
<form action="{% url 'account_delete' account.pk %}" method="post">
|
<form action="{% url 'account_delete' request.dealer.slug account.pk %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" class="btn btn-sm btn-phoenix-danger">{% trans 'Yes' %}</button>
|
<button type="submit" class="btn btn-sm btn-phoenix-danger">{% trans 'Yes' %}</button>
|
||||||
</form>
|
</form>
|
||||||
@ -99,7 +99,7 @@
|
|||||||
<div class="btn-reveal-trigger position-static">
|
<div class="btn-reveal-trigger position-static">
|
||||||
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
|
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
|
||||||
<div class="dropdown-menu dropdown-menu-end py-2">
|
<div class="dropdown-menu dropdown-menu-end py-2">
|
||||||
<a class="dropdown-item text-success" href="{% url 'payment_details' tx.journal_entry.pk %}">{% trans 'View Transacrions'|capfirst %}</a>
|
<a class="dropdown-item" href="{% url 'payment_details' request.dealer.slug tx.journal_entry.pk %}">{% trans 'view'|capfirst %}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -135,7 +135,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3 d-flex">
|
<div class="mt-3 d-flex">
|
||||||
<a class="btn btn-sm btn-phoenix-primary me-1" href="{% url 'account_update' account.pk %}">
|
<a class="btn btn-sm btn-phoenix-primary me-1" href="{% url 'account_update' request.dealer.slug account.pk %}">
|
||||||
<!-- <i class="bi bi-pencil-square"></i> -->
|
<!-- <i class="bi bi-pencil-square"></i> -->
|
||||||
<i class="fa-solid fa-pen-to-square"></i> {{ _('Edit') }}
|
<i class="fa-solid fa-pen-to-square"></i> {{ _('Edit') }}
|
||||||
</a>
|
</a>
|
||||||
@ -143,7 +143,7 @@
|
|||||||
<!-- <i class="bi bi-trash-fill"></i> -->
|
<!-- <i class="bi bi-trash-fill"></i> -->
|
||||||
<i class="fa-solid fa-trash"></i> {{ _('Delete') }}
|
<i class="fa-solid fa-trash"></i> {{ _('Delete') }}
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-sm btn-phoenix-secondary" href="{% url 'account_list' %}">
|
<a class="btn btn-sm btn-phoenix-secondary" href="{% url 'account_list' request.dealer.slug %}">
|
||||||
<!-- <i class="bi bi-arrow-left-square-fill"></i> -->
|
<!-- <i class="bi bi-arrow-left-square-fill"></i> -->
|
||||||
<i class="fa-regular fa-circle-left"></i> {% trans 'Back to List' %}
|
<i class="fa-regular fa-circle-left"></i> {% trans 'Back to List' %}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<div class="d-flex justify-content-between mb-2">
|
<div class="d-flex justify-content-between mb-2">
|
||||||
<h3 class=""><i class="fa-solid fa-book"></i> {% trans "Accounts" %}</h3>
|
<h3 class=""><i class="fa-solid fa-book"></i> {% trans "Accounts" %}</h3>
|
||||||
<a href="{% url 'account_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans 'New Account' %}</a>
|
<a href="{% url 'account_create' request.dealer.slug %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans 'New Account' %}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Account Type Tabs -->
|
<!-- Account Type Tabs -->
|
||||||
|
|||||||
@ -38,8 +38,8 @@
|
|||||||
<div class="btn-reveal-trigger position-static">
|
<div class="btn-reveal-trigger position-static">
|
||||||
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
|
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
|
||||||
<div class="dropdown-menu dropdown-menu-end py-2">
|
<div class="dropdown-menu dropdown-menu-end py-2">
|
||||||
<a href="{% url 'account_detail' account.uuid %}" class="dropdown-item text-success-dark">
|
<a href="{% url 'account_detail' request.dealer.slug account.uuid %}" class="dropdown-item text-success-dark">
|
||||||
{% trans "View Journal Entries" %}
|
{% trans "View" %}
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<button class="dropdown-item text-danger" data-bs-toggle="modal" data-bs-target="#deleteModal">{% trans "Delete" %}</button>
|
<button class="dropdown-item text-danger" data-bs-toggle="modal" data-bs-target="#deleteModal">{% trans "Delete" %}</button>
|
||||||
|
|||||||
@ -113,16 +113,16 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!--test-->
|
<!--test-->
|
||||||
|
|||||||
@ -42,14 +42,14 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -121,15 +121,15 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -88,11 +88,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% for bill in bills %}
|
{% for bill in bills %}
|
||||||
<div class="col">
|
<div class="col">
|
||||||
{% include 'django_ledger/bills/includes/card_bill.html' with bill=bill entity_slug=entity.slug style='dashboard' %}
|
{% include 'django_ledger/bills/includes/card_bill.html' with dealer_slug=request.dealer.slug bill=bill entity_slug=entity.slug style='dashboard' %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<div class="col">
|
<div class="col">
|
||||||
{% include 'django_ledger/bills/includes/card_bill.html' with create_bill=True entity_slug=entity.slug style='dashboard' %}
|
{% include 'django_ledger/bills/includes/card_bill.html' with dealer_slug=request.dealer.slug create_bill=True entity_slug=entity.slug style='dashboard' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -24,9 +24,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/search_box.html' %}
|
{% include 'partials/search_box.html' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -123,16 +123,16 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@ -1,90 +1,90 @@
|
|||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
<div class="d-flex justify-content-between align-items-center mt-4">
|
<div class="d-flex justify-content-between align-items-center mt-4">
|
||||||
<div class="text-body-secondary">
|
<div class="text-body-secondary">
|
||||||
{{ _("Showing") }} {{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }}
|
{{ _("Showing") }} {{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }}
|
||||||
{{ _("of") }} {{ page_obj.paginator.count }} {{ _("results") }}
|
{{ _("of") }} {{ page_obj.paginator.count }} {{ _("results") }}
|
||||||
</div>
|
</div>
|
||||||
<nav aria-label="Page navigation">
|
<nav aria-label="Page navigation">
|
||||||
<ul class="pagination mb-0">
|
<ul class="pagination mb-0">
|
||||||
{# First Page Link #}
|
{# First Page Link #}
|
||||||
{% if page_obj.has_previous %}
|
{% if page_obj.has_previous %}
|
||||||
<li class="page-item rounded-md overflow-hidden">
|
<li class="page-item rounded-md overflow-hidden">
|
||||||
<a class="page-link px-3 py-2 border border-gray-300 bg-white text-blue-600 hover:bg-gray-100 transition-colors duration-200" href="?page=1{% if q %}&q={{q}}{% endif %}" aria-label="{% trans 'First' %}">
|
<a class="page-link px-3 py-2 border border-gray-300 bg-white text-blue-600 hover:bg-gray-100 transition-colors duration-200" href="?page=1{% if q %}&q={{q}}{% endif %}" aria-label="{% trans 'First' %}">
|
||||||
<span class="fas fa-angle-double-left" aria-hidden="true"></span>
|
<span class="fas fa-angle-double-left" aria-hidden="true"></span>
|
||||||
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% else %}
|
|
||||||
<li class="page-item disabled rounded-md overflow-hidden">
|
|
||||||
<span class="page-link px-3 py-2 border border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed">
|
|
||||||
<span class="fas fa-angle-double-left" aria-hidden="true"></span>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# Previous Page Link #}
|
|
||||||
{% if page_obj.has_previous %}
|
|
||||||
<li class="page-item rounded-md overflow-hidden">
|
|
||||||
<a class="page-link px-3 py-2 border border-gray-300 bg-white text-blue-600 hover:bg-gray-100 transition-colors duration-200" href="?page={{ page_obj.previous_page_number }}{% if q %}&q={{q}}{% endif %}" aria-label="{% trans 'Previous' %}">
|
|
||||||
<span class="fas fa-chevron-left" aria-hidden="true"></span>
|
|
||||||
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% else %}
|
|
||||||
<li class="page-item disabled rounded-md overflow-hidden">
|
|
||||||
<span class="page-link px-3 py-2 border border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed">
|
|
||||||
<span class="fas fa-chevron-left" aria-hidden="true"></span>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# Page Numbers #}
|
|
||||||
{% for num in page_obj.paginator.page_range %}
|
|
||||||
{% if num == 1 or num == page_obj.paginator.num_pages or num >= page_obj.number|add:-2 and num <= page_obj.number|add:2 %}
|
|
||||||
<li class="page-item {% if num == page_obj.number %}active{% endif %}">
|
|
||||||
<a class="page-link" {% if num == page_obj.number %}aria-current="page"{% endif %}
|
|
||||||
href="?page={{ num }}{% if q %}&q={{q}}{% endif %}">
|
|
||||||
{{ num }}
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% else %}
|
||||||
|
<li class="page-item disabled rounded-md overflow-hidden">
|
||||||
|
<span class="page-link px-3 py-2 border border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed">
|
||||||
|
<span class="fas fa-angle-double-left" aria-hidden="true"></span>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
|
||||||
|
{# Previous Page Link #}
|
||||||
|
{% if page_obj.has_previous %}
|
||||||
|
<li class="page-item rounded-md overflow-hidden">
|
||||||
|
<a class="page-link px-3 py-2 border border-gray-300 bg-white text-blue-600 hover:bg-gray-100 transition-colors duration-200" href="?page={{ page_obj.previous_page_number }}{% if q %}&q={{q}}{% endif %}" aria-label="{% trans 'Previous' %}">
|
||||||
|
<span class="fas fa-chevron-left" aria-hidden="true"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% else %}
|
||||||
|
<li class="page-item disabled rounded-md overflow-hidden">
|
||||||
|
<span class="page-link px-3 py-2 border border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed">
|
||||||
|
<span class="fas fa-chevron-left" aria-hidden="true"></span>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# Page Numbers #}
|
||||||
|
{% for num in page_obj.paginator.page_range %}
|
||||||
|
{% if num == 1 or num == page_obj.paginator.num_pages or num >= page_obj.number|add:-2 and num <= page_obj.number|add:2 %}
|
||||||
|
<li class="page-item {% if num == page_obj.number %}active{% endif %}">
|
||||||
|
<a class="page-link" {% if num == page_obj.number %}aria-current="page"{% endif %}
|
||||||
|
href="?page={{ num }}{% if q %}&q={{q}}{% endif %}">
|
||||||
|
{{ num }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
{# Next Page Link #}
|
{# Next Page Link #}
|
||||||
{% if page_obj.has_next %}
|
{% if page_obj.has_next %}
|
||||||
<li class="page-item rounded-md overflow-hidden">
|
<li class="page-item rounded-md overflow-hidden">
|
||||||
<a class="page-link px-3 py-2 border border-gray-300 bg-white text-blue-600 hover:bg-gray-100 transition-colors duration-200" href="?page={{ page_obj.next_page_number }}{% if q %}&q={{q}}{% endif %}" aria-label="{% trans 'Next' %}">
|
<a class="page-link px-3 py-2 border border-gray-300 bg-white text-blue-600 hover:bg-gray-100 transition-colors duration-200" href="?page={{ page_obj.next_page_number }}{% if q %}&q={{q}}{% endif %}" aria-label="{% trans 'Next' %}">
|
||||||
<span class="fas fa-chevron-right" aria-hidden="true"></span>
|
<span class="fas fa-chevron-right" aria-hidden="true"></span>
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="page-item disabled rounded-md overflow-hidden">
|
<li class="page-item disabled rounded-md overflow-hidden">
|
||||||
<span class="page-link px-3 py-2 border border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed">
|
<span class="page-link px-3 py-2 border border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed">
|
||||||
<span class="fas fa-chevron-right" aria-hidden="true"></span>
|
<span class="fas fa-chevron-right" aria-hidden="true"></span>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# Last Page Link #}
|
{# Last Page Link #}
|
||||||
{% if page_obj.has_next %}
|
{% if page_obj.has_next %}
|
||||||
<li class="page-item rounded-md overflow-hidden">
|
<li class="page-item rounded-md overflow-hidden">
|
||||||
<a class="page-link px-3 py-2 border border-gray-300 bg-white text-blue-600 hover:bg-gray-100 transition-colors duration-200" href="?page={{ page_obj.paginator.num_pages }}{% if q %}&q={{q}}{% endif %}" aria-label="{% trans 'Last' %}">
|
<a class="page-link px-3 py-2 border border-gray-300 bg-white text-blue-600 hover:bg-gray-100 transition-colors duration-200" href="?page={{ page_obj.paginator.num_pages }}{% if q %}&q={{q}}{% endif %}" aria-label="{% trans 'Last' %}">
|
||||||
<span class="fas fa-angle-double-right" aria-hidden="true"></span>
|
<span class="fas fa-angle-double-right" aria-hidden="true"></span>
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="page-item disabled rounded-md overflow-hidden">
|
<li class="page-item disabled rounded-md overflow-hidden">
|
||||||
<span class="page-link px-3 py-2 border border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed">
|
<span class="page-link px-3 py-2 border border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed">
|
||||||
<span class="fas fa-angle-double-right" aria-hidden="true"></span>
|
<span class="fas fa-angle-double-right" aria-hidden="true"></span>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<button type="submit" class="btn btn-phoenix-primary">Save</button>
|
<button type="submit" class="btn btn-phoenix-primary">Save</button>
|
||||||
<a href="{% url 'purchase_order_list' %}" class="btn btn-phoenix-secondary">Cancel</a>
|
<a href="{% url 'purchase_order_list' request.dealer.slug %}" class="btn btn-phoenix-secondary">Cancel</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -11,11 +11,11 @@
|
|||||||
<h3>{% trans "Provide billing data"|upper %}</h3>
|
<h3>{% trans "Provide billing data"|upper %}</h3>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form|crispy }}
|
{{ form|crispy }}
|
||||||
|
|
||||||
<button type="submit" class="btn btn-sm btn-phoenix-success me-2">
|
<button type="submit" class="btn btn-sm btn-phoenix-success me-2">
|
||||||
<i class="fa fa-save me-1"></i>{{ _("Save") }}
|
<i class="fa fa-save me-1"></i>{{ _("Save") }}
|
||||||
</button>
|
</button>
|
||||||
{% if object %}
|
{% if object %}
|
||||||
<a class="btn btn-sm btn-phoenix-danger " href="{% url 'billing_info_delete' %}"><i class="fa-solid fa-trash me-1"></i> {{ _("Delete") }}</a>
|
<a class="btn btn-sm btn-phoenix-danger " href="{% url 'billing_info_delete' %}"><i class="fa-solid fa-trash me-1"></i> {{ _("Delete") }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
@ -162,7 +162,7 @@
|
|||||||
|
|
||||||
<div class="card-footer bg-light">
|
<div class="card-footer bg-light">
|
||||||
<div class="d-flex flex-wrap gap-2 justify-content-between">
|
<div class="d-flex flex-wrap gap-2 justify-content-between">
|
||||||
<a href="{% url 'purchase_order_update' entity_slug=entity_slug po_pk=po_model.pk %}"
|
<a href="{% url 'purchase_order_update' dealer_slug=request.dealer.slug entity_slug=entity_slug po_pk=po_model.pk %}"
|
||||||
class="btn btn-phoenix-primary">
|
class="btn btn-phoenix-primary">
|
||||||
<i class="fas fa-edit me-2"></i>{% trans 'Update' %}
|
<i class="fas fa-edit me-2"></i>{% trans 'Update' %}
|
||||||
</a>
|
</a>
|
||||||
@ -171,28 +171,28 @@
|
|||||||
{# Status Action Buttons #}
|
{# Status Action Buttons #}
|
||||||
{% if po_model.can_draft %}
|
{% if po_model.can_draft %}
|
||||||
<button class="btn btn-phoenix-secondary"
|
<button class="btn btn-phoenix-secondary"
|
||||||
onclick="showPOModal('Draft PO', '{% url 'po-action-mark-as-draft' entity_slug po_model.pk %}', 'Mark As Draft')">
|
onclick="showPOModal('Draft PO', '{% url 'po-action-mark-as-draft' request.dealer.slug entity_slug po_model.pk %}', 'Mark As Draft')">
|
||||||
<i class="fas fa-file me-2"></i>{% trans 'Mark as Draft' %}
|
<i class="fas fa-file me-2"></i>{% trans 'Mark as Draft' %}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if po_model.can_review %}
|
{% if po_model.can_review %}
|
||||||
<button class="btn btn-phoenix-warning"
|
<button class="btn btn-phoenix-warning"
|
||||||
onclick="showPOModal('Review PO', '{% url 'po-action-mark-as-review' entity_slug po_model.pk %}', 'Mark As Review')">
|
onclick="showPOModal('Review PO', '{% url 'po-action-mark-as-review' request.dealer.slug entity_slug po_model.pk %}', 'Mark As Review')">
|
||||||
<i class="fas fa-search me-2"></i>{% trans 'Mark as Review' %}
|
<i class="fas fa-search me-2"></i>{% trans 'Mark as Review' %}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if po_model.can_approve %}
|
{% if po_model.can_approve %}
|
||||||
<button class="btn btn-phoenix-success"
|
<button class="btn btn-phoenix-success"
|
||||||
onclick="showPOModal('Approve PO', '{% url 'po-action-mark-as-approved' entity_slug po_model.pk %}', 'Mark As Approved')">
|
onclick="showPOModal('Approve PO', '{% url 'po-action-mark-as-approved' request.dealer.slug entity_slug po_model.pk %}', 'Mark As Approved')">
|
||||||
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Approved' %}
|
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Approved' %}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if po_model.can_fulfill %}
|
{% if po_model.can_fulfill %}
|
||||||
<button class="btn btn-phoenix-primary"
|
<button class="btn btn-phoenix-primary"
|
||||||
onclick="showPOModal('Fulfill PO', '{% url 'po-action-mark-as-fulfilled' entity_slug po_model.pk %}', 'Mark As Fulfilled')">
|
onclick="showPOModal('Fulfill PO', '{% url 'po-action-mark-as-fulfilled' request.dealer.slug entity_slug po_model.pk %}', 'Mark As Fulfilled')">
|
||||||
<i class="fas fa-truck me-2"></i>{% trans 'Mark as Fulfilled' %}
|
<i class="fas fa-truck me-2"></i>{% trans 'Mark as Fulfilled' %}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@ -201,21 +201,21 @@
|
|||||||
{# Danger Action Buttons #}
|
{# Danger Action Buttons #}
|
||||||
{% if po_model.can_delete %}
|
{% if po_model.can_delete %}
|
||||||
<button class="btn btn-outline-danger"
|
<button class="btn btn-outline-danger"
|
||||||
onclick="showPOModal('Cancel PO', '{% url 'po-delete' entity_slug po_model.pk %}', 'Mark As Cancelled')">
|
onclick="showPOModal('Delete PO', '{% url 'po-delete' request.dealer.slug entity_slug po_model.pk %}', 'Delete')">
|
||||||
<i class="fas fa-ban me-2"></i>{% trans 'Delete' %}
|
<i class="fas fa-ban me-2"></i>{% trans 'Delete' %}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if po_model.can_void %}
|
{% if po_model.can_void %}
|
||||||
<button class="btn btn-outline-danger"
|
<button class="btn btn-outline-danger"
|
||||||
onclick="showPOModal('Void PO', '{% url 'po-action-mark-as-void' entity_slug po_model.pk %}', 'Mark As Void')">
|
onclick="showPOModal('Void PO', '{% url 'po-action-mark-as-void' request.dealer.slug entity_slug po_model.pk %}', 'Mark As Void')">
|
||||||
<i class="fas fa-times-circle me-2"></i>{% trans 'Void' %}
|
<i class="fas fa-times-circle me-2"></i>{% trans 'Void' %}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if po_model.can_cancel %}
|
{% if po_model.can_cancel %}
|
||||||
<button class="btn btn-outline-danger"
|
<button class="btn btn-outline-danger"
|
||||||
onclick="showPOModal('Cancel PO', '{% url 'po-action-mark-as-canceled' entity_slug po_model.pk %}', 'Mark As Cancelled')">
|
onclick="showPOModal('Cancel PO', '{% url 'po-action-mark-as-canceled' request.dealer.slug entity_slug po_model.pk %}', 'Mark As Cancelled')">
|
||||||
<i class="fas fa-ban me-2"></i>{% trans 'Cancel' %}
|
<i class="fas fa-ban me-2"></i>{% trans 'Cancel' %}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@ -228,7 +228,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<div class="card border-0 shadow-sm text-center py-5">
|
<div class="card border-0 shadow-sm text-center py-5">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<a href="{% url 'purchase_order_create' %}" class="text-decoration-none">
|
<a href="{% url 'purchase_order_create' request.dealer.slug %}" class="text-decoration-none">
|
||||||
<span class="text-muted mb-3 d-inline-block">{% icon "ic:baseline-add-circle-outline" 48 %}</span>
|
<span class="text-muted mb-3 d-inline-block">{% icon "ic:baseline-add-circle-outline" 48 %}</span>
|
||||||
<h3 class="h4 text-muted">{% trans 'New Purchase Order' %}</h3>
|
<h3 class="h4 text-muted">{% trans 'New Purchase Order' %}</h3>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<form action="{% url 'inventory_item_create' po_model.pk %}" method="post">
|
<form action="{% url 'inventory_item_create' request.dealer.slug po_model.pk %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% include "purchase_orders/partials/po-select.html" with name="make" target="model" data=make_data pk=po_model.pk %}
|
{% include "purchase_orders/partials/po-select.html" with name="make" target="model" data=make_data pk=po_model.pk %}
|
||||||
{% include "purchase_orders/partials/po-select.html" with name="model" target="serie" data=model_data pk=po_model.pk %}
|
{% include "purchase_orders/partials/po-select.html" with name="model" target="serie" data=model_data pk=po_model.pk %}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
{% load custom_filters %}
|
{% load custom_filters %}
|
||||||
{% load widget_tweaks %}
|
{% load widget_tweaks %}
|
||||||
|
|
||||||
<form action="{% url 'purchase_order_update_items' entity_slug=entity_slug po_pk=po_model.uuid %}"
|
<form action="{% url 'purchase_order_update_items' dealer_slug=dealer_slug entity_slug=entity_slug po_pk=po_model.uuid %}"
|
||||||
method="post">
|
method="post">
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@ -60,7 +60,7 @@
|
|||||||
{{ f.create_bill|add_class:"form-check-input" }}
|
{{ f.create_bill|add_class:"form-check-input" }}
|
||||||
{% elif f.instance.bill_model %}
|
{% elif f.instance.bill_model %}
|
||||||
<a class="btn btn-sm btn-phoenix-secondary"
|
<a class="btn btn-sm btn-phoenix-secondary"
|
||||||
href="{% url 'bill-detail' entity_slug=entity_slug bill_pk=f.instance.bill_model_id %}">
|
href="{% url 'bill-detail' dealer_slug=dealer_slug entity_slug=entity_slug bill_pk=f.instance.bill_model_id %}">
|
||||||
{% trans 'View Bill' %}
|
{% trans 'View Bill' %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<select class="form-control"
|
<select class="form-control"
|
||||||
name="{{name}}" id="{{name}}"
|
name="{{name}}" id="{{name}}"
|
||||||
{% if name != "trim" %}
|
{% if name != "trim" %}
|
||||||
hx-get="{% url 'inventory_items_filter' %}"
|
hx-get="{% url 'inventory_items_filter' request.dealer.slug %}"
|
||||||
hx-target="#form-{{target}}"
|
hx-target="#form-{{target}}"
|
||||||
hx-select="#form-{{target}}"
|
hx-select="#form-{{target}}"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form action="{% url 'po-delete' entity_slug=view.kwargs.entity_slug po_pk=po_model.uuid %}"
|
<form action="{% url 'po-delete' dealer_slug=request.dealer.slug entity_slug=view.kwargs.entity_slug po_pk=po_model.uuid %}"
|
||||||
method="post">
|
method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="card shadow">
|
<div class="card shadow">
|
||||||
@ -15,10 +15,10 @@
|
|||||||
Purchase Order {{ po_model.po_number }}?</h2>
|
Purchase Order {{ po_model.po_number }}?</h2>
|
||||||
|
|
||||||
<p class="card-text text-muted mb-4">All transactions associated with this Purchase Order will be deleted.
|
<p class="card-text text-muted mb-4">All transactions associated with this Purchase Order will be deleted.
|
||||||
If you want to void the PO instead, <a href="{% url 'purchase_order_detail' entity_slug=view.kwargs.entity_slug po_pk=po_model.uuid %}" class="text-decoration-none">click here</a></p>
|
If you want to void the PO instead, <a href="{% url 'purchase_order_detail' dealer_slug=request.dealer.slug pk=po_model.uuid %}" class="text-decoration-none">click here</a></p>
|
||||||
|
|
||||||
<div class="d-flex justify-content-center gap-3 mt-4">
|
<div class="d-flex justify-content-center gap-3 mt-4">
|
||||||
<a href="{% url 'purchase_order_update' entity_slug=view.kwargs.entity_slug po_pk=po_model.uuid %}"
|
<a href="{% url 'purchase_order_update' dealer_slug=request.dealer.slug entity_slug=view.kwargs.entity_slug po_pk=po_model.uuid %}"
|
||||||
class="btn btn-phoenix-primary px-4">{% trans 'Go Back' %}</a>
|
class="btn btn-phoenix-primary px-4">{% trans 'Go Back' %}</a>
|
||||||
<button type="submit" class="btn btn-phoenix-danger px-4">{% trans 'Delete' %}</button>
|
<button type="submit" class="btn btn-phoenix-danger px-4">{% trans 'Delete' %}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -7,19 +7,28 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container-fluid mt-4">
|
<div class="container-fluid mt-4">
|
||||||
<div class="row g-1">
|
<div class="row g-1">
|
||||||
|
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div class="d-flex flex-column gap-3">
|
<div class="d-flex flex-column gap-3">
|
||||||
<!-- PO Card -->
|
<!-- PO Card -->
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% include 'purchase_orders/includes/card_po.html' with po_model=po_model entity_slug=entity_slug style='po-detail' %}
|
{% include 'purchase_orders/includes/card_po.html' with dealer_slug=request.dealer.slug po_model=po_model entity_slug=entity_slug style='po-detail' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- PO Stats Card-->
|
<!-- PO List Button -->
|
||||||
|
<a class="btn btn-phoenix-primary w-100 py-2"
|
||||||
<div class="card mb-4">
|
href="{% url 'purchase_order_list' request.dealer.slug %}">
|
||||||
|
<i class="fas fa-list me-2"></i>{% trans 'PO List' %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Main Content -->
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<!-- Stats Cards -->
|
||||||
|
<div class="card mb-4">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row text-center">
|
<div class="row text-center">
|
||||||
<div class="col-md-6 border-end">
|
<div class="col-md-6 border-end">
|
||||||
@ -41,29 +50,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<!-- PO Details -->
|
<!-- PO Details -->
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3 class="h4 fw-light mb-2">{{ po_model.po_title }}</h3>
|
<h3 class="h4 fw-light mb-2">{{ po_model.po_title }}</h3>
|
||||||
|
|
||||||
<!-- PO Items Table -->
|
<!-- PO Items Table -->
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
{% po_item_table1 po_items %}
|
{% po_item_table1 po_items %}
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--POS list-->
|
|
||||||
<a class="btn btn-phoenix-primary w-100 py-2 mt-2"
|
|
||||||
href="{% url 'purchase_order_list' %}">
|
|
||||||
<i class="fas fa-list me-2"></i>{% trans 'PO List' %}
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!--POS list-->
|
||||||
|
<a class="btn btn-phoenix-primary w-100 py-2 mt-2"
|
||||||
|
href="{% url 'purchase_order_list' %}">
|
||||||
|
<i class="fas fa-list me-2"></i>{% trans 'PO List' %}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% include "purchase_orders/includes/mark_as.html" %}
|
{% include "purchase_orders/includes/mark_as.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
{{ _("Purchase Orders") |capfirst }}
|
{{ _("Purchase Orders") |capfirst }}
|
||||||
</h2>
|
</h2>
|
||||||
<div>
|
<div>
|
||||||
<a href="{% url 'purchase_order_create' %}"
|
<a href="{% url 'purchase_order_create' request.dealer.slug %}"
|
||||||
class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{{ _("Create New PO") }}</a>
|
class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{{ _("Create New PO") }}</a>
|
||||||
<a href="{% url 'inventory_item_create' %}?for_po=1"
|
<a href="{% url 'inventory_item_create' request.dealer.slug %}?for_po=1"
|
||||||
class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{{ _("Create Inventory Item for PO") }}</a>
|
class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{{ _("Create Inventory Item for PO") }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -67,8 +67,8 @@
|
|||||||
<div class="btn-reveal-trigger position-static">
|
<div class="btn-reveal-trigger position-static">
|
||||||
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
|
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
|
||||||
<div class="dropdown-menu dropdown-menu-end py-2">
|
<div class="dropdown-menu dropdown-menu-end py-2">
|
||||||
<a href="{% url 'purchase_order_detail' po.pk %}" class="dropdown-item text-success-dark">{% trans 'PO Detail' %}</a>
|
<a href="{% url 'purchase_order_detail' request.dealer.slug po.pk %}" class="dropdown-item text-success-dark">{% trans 'Detail' %}</a>
|
||||||
<a href="{% url 'view_items_inventory' entity_slug=entity_slug po_pk=po.pk %}" class="dropdown-item text-success-dark">{% trans 'View Inventory Items' %}</a>
|
<a href="{% url 'view_items_inventory' dealer_slug=request.dealer.slug entity_slug=entity_slug po_pk=po.pk %}" class="dropdown-item text-success-dark">{% trans 'View Inventory Items' %}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -82,16 +82,16 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% include 'modal/delete_modal.html' %}
|
{% include 'modal/delete_modal.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -12,12 +12,12 @@
|
|||||||
|
|
||||||
<div class="row g-4">
|
<div class="row g-4">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
{% include 'purchase_orders/includes/card_po.html' with style='po-detail' po_model=po_model entity_slug=entity_slug %}
|
{% include 'purchase_orders/includes/card_po.html' with style='po-detail' dealer_slug=request.dealer.slug po_model=po_model entity_slug=entity_slug %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card shadow-sm">
|
<div class="card shadow-sm">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form action="{% url 'purchase_order_update' entity_slug=view.kwargs.entity_slug po_pk=po_model.uuid %}"
|
<form action="{% url 'purchase_order_update' dealer_slug=request.dealer.slug entity_slug=view.kwargs.entity_slug po_pk=po_model.uuid %}"
|
||||||
method="post">
|
method="post">
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@ -26,9 +26,9 @@
|
|||||||
<button type="submit"
|
<button type="submit"
|
||||||
class="btn btn-phoenix-success w-100 my-2">{% trans 'Save PO' %}
|
class="btn btn-phoenix-success w-100 my-2">{% trans 'Save PO' %}
|
||||||
</button>
|
</button>
|
||||||
<a href="{% url 'purchase_order_detail' po_model.uuid %}"
|
<a href="{% url 'purchase_order_detail' request.dealer.slug po_model.uuid %}"
|
||||||
class="btn btn-phoenix-secondary w-100 my-2">{% trans 'Back to PO Detail' %}</a>
|
class="btn btn-phoenix-secondary w-100 my-2">{% trans 'Back to PO Detail' %}</a>
|
||||||
<a href="{% url 'purchase_order_list' %}"
|
<a href="{% url 'purchase_order_list' request.dealer.slug %}"
|
||||||
class="btn btn-phoenix-info
|
class="btn btn-phoenix-info
|
||||||
info w-100 my-2">{% trans 'PO List' %}</a>
|
info w-100 my-2">{% trans 'PO List' %}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -57,14 +57,14 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div>
|
<div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
@ -28,7 +28,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="has-text-centered">{% if item.bill_model_id %}
|
<td class="has-text-centered">{% if item.bill_model_id %}
|
||||||
<a class="is-small is-info button"
|
<a class="is-small is-info button"
|
||||||
href="{% url 'bill-detail' entity_slug=entity_slug bill_pk=item.bill_model_id %}">View
|
href="{% url 'bill-detail' dealer_slug=dealer_slug entity_slug=entity_slug bill_pk=item.bill_model_id %}">View
|
||||||
Bill</a>{% endif %}
|
Bill</a>{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<p>{% trans "Are you sure you want to Cancel this Estimate?" %}</p>
|
<p>{% trans "Are you sure you want to Cancel this Estimate?" %}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer flex justify-content-center border-top-0">
|
<div class="modal-footer flex justify-content-center border-top-0">
|
||||||
<a type="button" class="btn btn-sm btn-phoenix-danger w-100" href="{% url 'estimate_mark_as' estimate.pk %}?mark=canceled">
|
<a type="button" class="btn btn-sm btn-phoenix-danger w-100" href="{% url 'estimate_mark_as' request.dealer.slug estimate.pk %}?mark=canceled">
|
||||||
<i class="fa-solid fa-circle-check"></i> {% trans "Yes" %}
|
<i class="fa-solid fa-circle-check"></i> {% trans "Yes" %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -40,7 +40,7 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
{% trans 'Are you sure ?' %}
|
{% trans 'Are you sure ?' %}
|
||||||
<div class="modal-footer flex justify-content-center border-top-0">
|
<div class="modal-footer flex justify-content-center border-top-0">
|
||||||
<form id="confirmForm" method="POST" action="{% url 'estimate_mark_as' estimate.pk %}?mark=approved" class="form">
|
<form id="confirmForm" method="POST" action="{% url 'estimate_mark_as' request.dealer.slug estimate.pk %}?mark=approved" class="form">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="container-fluid m-0 p-0">
|
<div class="container-fluid m-0 p-0">
|
||||||
<button type="button" class="btn btn-phoenix-danger btn-sm" data-bs-dismiss="modal"><i class="fa-solid fa-ban"></i> {% trans 'No' %}</button>
|
<button type="button" class="btn btn-phoenix-danger btn-sm" data-bs-dismiss="modal"><i class="fa-solid fa-ban"></i> {% trans 'No' %}</button>
|
||||||
@ -74,32 +74,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex align-items-center gap-2">
|
<div class="d-flex align-items-center gap-2">
|
||||||
{% if estimate.status == 'draft' %}
|
{% if estimate.invoicemodel_set.first %}
|
||||||
<a href="{% url 'send_email' estimate.pk %}" class="btn btn-phoenix-primary me-2"><span class="fa-regular fa-paper-plane me-sm-2"></span><span class="d-none d-sm-inline-block">{% trans 'Send Quotation' %}</span></a>
|
<a href="{% url 'invoice_detail' request.dealer.slug estimate.invoicemodel_set.first.pk %}" class="btn btn-phoenix-primary btn-sm" type="button"><i class="fa-solid fa-receipt"></i>
|
||||||
|
{{ _("View Invoice")}}</a>
|
||||||
|
<button class="btn btn-phoenix-primary" data-bs-toggle="modal" data-bs-target="#POModal"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-receipt"></i> {% trans 'View Purchase Order' %}</span></button>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if estimate.status == 'draft' %}
|
||||||
|
<a href="{% url 'send_email' request.dealer.slug estimate.pk %}" class="btn btn-phoenix-primary me-2"><span class="fa-regular fa-paper-plane me-sm-2"></span><span class="d-none d-sm-inline-block">{% trans 'Send Quotation' %}</span></a>
|
||||||
<button id="mark_as_sent_estimate" class="btn btn-phoenix-secondary" onclick="setFormAction('review')" data-bs-toggle="modal" data-bs-target="#confirmModal"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-check-double"></i> {% trans 'Mark As Sent' %}</span></button>
|
<button id="mark_as_sent_estimate" class="btn btn-phoenix-secondary" onclick="setFormAction('review')" data-bs-toggle="modal" data-bs-target="#confirmModal"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-check-double"></i> {% trans 'Mark As Sent' %}</span></button>
|
||||||
{% elif estimate.status == 'in_review' %}
|
{% elif estimate.status == 'in_review' %}
|
||||||
<button id="accept_estimate" onclick="setFormAction('approved')" class="btn btn-phoenix-secondary" data-bs-toggle="modal" data-bs-target="#confirmModal"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-check-double"></i> {% trans 'Mark As Accept' %}</span></button>
|
<button id="accept_estimate" onclick="setFormAction('approved')" class="btn btn-phoenix-secondary" data-bs-toggle="modal" data-bs-target="#confirmModal"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-check-double"></i> {% trans 'Mark As Accept' %}</span></button>
|
||||||
{% elif estimate.status == 'approved' %}
|
{% elif estimate.status == 'approved' %}
|
||||||
|
|
||||||
{% if estimate.sale_orders.first %}
|
{% if estimate.sale_orders.first %}
|
||||||
<!--if there is a sales order for an estimate-->
|
<a href="{% url 'invoice_create' request.dealer.slug estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-receipt"></i> {% trans 'Create Invoice' %}</span></a>
|
||||||
<!--View sales Order-->
|
<a href="{% url 'preview_sale_order' request.dealer.slug estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block">{{ _("Preview Sale Order") }}</span></a>
|
||||||
<a href="{% url 'order_detail' estimate.sale_orders.first.pk %}" class="btn btn-phoenix-primary btn-sm" type="button"><i class="fa-solid fa-cart-shopping"></i>
|
|
||||||
{{ _("View Sales Order")}}
|
|
||||||
</a>
|
|
||||||
{% if estimate.sale_orders.first.invoice %}
|
|
||||||
<a href="{% url 'invoice_detail' estimate.invoicemodel_set.first.pk %}" class="btn btn-phoenix-primary btn-sm" type="button"><i class="fa-solid fa-receipt"></i>
|
|
||||||
{{ _("View Invoice")}}</a>
|
|
||||||
{% else %}
|
|
||||||
<!--if there is no invoice for a sale order create invoice -->
|
|
||||||
<a href="{% url 'invoice_create' estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-receipt"></i> {% trans 'Create Invoice' %}</span></a>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<!--if no sales order for the estimate Create sales order-->
|
<a href="{% url 'create_sale_order' request.dealer.slug estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-file-import"></i> {% trans 'Create Sale Order' %}</span></a>
|
||||||
<a href="{% url 'create_sale_order' estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-file-import"></i> {% trans 'Create Sale Order' %}</span></a>
|
{% comment %} {% endcomment %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif estimate.status == 'in_review' %}
|
{% elif estimate.status == 'in_review' %}
|
||||||
<a href="{% url 'estimate_preview' estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block"><i class="fa-regular fa-eye"></i> {% trans 'Preview' %}</span></a>
|
<a href="{% url 'estimate_preview' request.dealer.slug estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block"><i class="fa-regular fa-eye"></i> {% trans 'Preview' %}</span></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if estimate.can_cancel %}
|
{% if estimate.can_cancel %}
|
||||||
{% if perms.django_ledger.change_estimatemodel %}
|
{% if perms.django_ledger.change_estimatemodel %}
|
||||||
@ -109,42 +105,42 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container bg-body dark__bg-gray-1100 p-4 mb-4 rounded-2">
|
<div class="container bg-body dark__bg-gray-1100 p-4 mb-4 rounded-2">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col mb-2">
|
<div class="col mb-2">
|
||||||
<h6><i class="fa-solid fa-hashtag"></i> {% trans 'Quotation Number' %}:</h6>
|
<h6><i class="fa-solid fa-hashtag"></i> {% trans 'Quotation Number' %}:</h6>
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.estimate_number}}</p>
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.estimate_number}}</p>
|
||||||
</div>
|
|
||||||
<div class="col mb-2">
|
|
||||||
<h6><i class="fa-solid fa-calendar-days"></i> {% trans 'Quotation Date' %}:</h6>
|
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.created}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="col mb-2">
|
|
||||||
<h6><i class="fa-solid fa-user"></i> {% trans 'Customer' %}:</h6>
|
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.customer.customer_name}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="col mb-2">
|
|
||||||
<h6><i class="fa-solid fa-envelope"></i> {% trans 'Email' %}:</h6>
|
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.customer.email}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<h6><i class="fa-solid fa-list"></i> {% trans "Quotation Status" %}:</h6>
|
|
||||||
<div class="fs-9 text-body-secondary fw-semibold mb-0">
|
|
||||||
{% if estimate.status == 'draft' %}
|
|
||||||
<span class="badge text-bg-warning">{% trans "Draft" %}</span>
|
|
||||||
{% elif estimate.status == 'in_review' %}
|
|
||||||
<span class="badge text-bg-info">{% trans "In Review" %}</span>
|
|
||||||
{% elif estimate.status == 'approved' %}
|
|
||||||
<span class="badge text-bg-success">{% trans "Approved" %}</span>
|
|
||||||
{% elif estimate.status == 'completed' %}
|
|
||||||
<span class="badge text-bg-success">{% trans "Completed" %}</span>
|
|
||||||
{% elif estimate.status == 'canceled' %}
|
|
||||||
<span class="badge text-bg-danger">{% trans "Canceled" %}</span>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col mb-2">
|
||||||
|
<h6><i class="fa-solid fa-calendar-days"></i> {% trans 'Quotation Date' %}:</h6>
|
||||||
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.created}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="col mb-2">
|
||||||
|
<h6><i class="fa-solid fa-user"></i> {% trans 'Customer' %}:</h6>
|
||||||
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.customer.customer_name}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="col mb-2">
|
||||||
|
<h6><i class="fa-solid fa-envelope"></i> {% trans 'Email' %}:</h6>
|
||||||
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.customer.email}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<h6><i class="fa-solid fa-list"></i> {% trans "Quotation Status" %}:</h6>
|
||||||
|
<div class="fs-9 text-body-secondary fw-semibold mb-0">
|
||||||
|
{% if estimate.status == 'draft' %}
|
||||||
|
<span class="badge text-bg-warning">{% trans "Draft" %}</span>
|
||||||
|
{% elif estimate.status == 'in_review' %}
|
||||||
|
<span class="badge text-bg-info">{% trans "In Review" %}</span>
|
||||||
|
{% elif estimate.status == 'approved' %}
|
||||||
|
<span class="badge text-bg-success">{% trans "Approved" %}</span>
|
||||||
|
{% elif estimate.status == 'completed' %}
|
||||||
|
<span class="badge text-bg-success">{% trans "Completed" %}</span>
|
||||||
|
{% elif estimate.status == 'canceled' %}
|
||||||
|
<span class="badge text-bg-danger">{% trans "Canceled" %}</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="px-0">
|
<div class="px-0">
|
||||||
<div class="table-responsive scrollbar">
|
<div class="table-responsive scrollbar">
|
||||||
<table id="estimate-table" class="table fs-9 text-body mb-0">
|
<table id="estimate-table" class="table fs-9 text-body mb-0">
|
||||||
@ -245,7 +241,7 @@
|
|||||||
// Get the form element
|
// Get the form element
|
||||||
const form = document.getElementById('confirmForm');
|
const form = document.getElementById('confirmForm');
|
||||||
// Set the form action with the query parameter
|
// Set the form action with the query parameter
|
||||||
form.action = "{% url 'estimate_mark_as' estimate.pk %}?mark=" + action;
|
form.action = "{% url 'estimate_mark_as' request.dealer.slug estimate.pk %}?mark=" + action;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -17,14 +17,14 @@
|
|||||||
{% if not items %}
|
{% if not items %}
|
||||||
<div class="alert alert-outline-warning d-flex align-items-center" role="alert">
|
<div class="alert alert-outline-warning d-flex align-items-center" role="alert">
|
||||||
<i class="fa-solid fa-circle-info fs-6"></i>
|
<i class="fa-solid fa-circle-info fs-6"></i>
|
||||||
<p class="mb-0 flex-1">{{ _("Please add at least one car before creating a quotation.") }}<a class="ms-3 text-body-primary fs-9" href="{% url 'car_add' %}"> {{ _("Add Car") }} </a></p>
|
<p class="mb-0 flex-1">{{ _("Please add at least one car before creating a quotation.") }}<a class="ms-3 text-body-primary fs-9" href="{% url 'car_add' request.dealer.slug %}"> {{ _("Add Car") }} </a></p>
|
||||||
<button class="btn-close" type="button" data-bs-dismiss="alert" aria-label="Close"></button>
|
<button class="btn-close" type="button" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not customer_count %}
|
{% if not customer_count %}
|
||||||
<div class="alert alert-outline-warning d-flex align-items-center" role="alert">
|
<div class="alert alert-outline-warning d-flex align-items-center" role="alert">
|
||||||
<i class="fa-solid fa-circle-info fs-6"></i>
|
<i class="fa-solid fa-circle-info fs-6"></i>
|
||||||
<p class="mb-0 flex-1"> {{ _("Please add at least one customer before creating a quotation.") }}<a class="ms-3 text-body-primary fs-9" href="{% url 'customer_create' %}"> {{ _("Add Customer") }} </a></p>
|
<p class="mb-0 flex-1"> {{ _("Please add at least one customer before creating a quotation.") }}<a class="ms-3 text-body-primary fs-9" href="{% url 'customer_create' request.dealer.slug %}"> {{ _("Add Customer") }} </a></p>
|
||||||
<button class="btn-close" type="button" data-bs-dismiss="alert" aria-label="Close"></button>
|
<button class="btn-close" type="button" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -163,7 +163,7 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Send data to the server using fetch
|
// Send data to the server using fetch
|
||||||
const response = await fetch("{% url 'estimate_create' %}", {
|
const response = await fetch("{% url 'estimate_create' request.dealer.slug %}", {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'X-CSRFToken': formData.csrfmiddlewaretoken,
|
'X-CSRFToken': formData.csrfmiddlewaretoken,
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
<td class="align-middle product white-space-nowrap">{{ estimate.get_status_action_date }}</td>
|
<td class="align-middle product white-space-nowrap">{{ estimate.get_status_action_date }}</td>
|
||||||
<td class="align-middle product white-space-nowrap">{{ estimate.created }}</td>
|
<td class="align-middle product white-space-nowrap">{{ estimate.created }}</td>
|
||||||
<td class="align-middle product white-space-nowrap">
|
<td class="align-middle product white-space-nowrap">
|
||||||
<a href="{% url 'estimate_detail' estimate.pk %}"
|
<a href="{% url 'estimate_detail' request.dealer.slug estimate.pk %}"
|
||||||
class="btn btn-sm btn-phoenix-success">
|
class="btn btn-sm btn-phoenix-success">
|
||||||
<i class="fa-regular fa-eye me-1"></i>
|
<i class="fa-regular fa-eye me-1"></i>
|
||||||
{% trans "view"|capfirst %}
|
{% trans "view"|capfirst %}
|
||||||
@ -60,11 +60,11 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -23,7 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-content-between align-items-center">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<a href="{% url 'estimate_detail' estimate.pk %}" class="btn btn-sm btn-phoenix-secondary text-body fs-10 me-1">{{ _("Cancel") }}</a>
|
<a href="{% url 'estimate_detail' request.dealer.slug estimate.pk %}" class="btn btn-sm btn-phoenix-secondary text-body fs-10 me-1">{{ _("Cancel") }}</a>
|
||||||
<button class="btn btn-sm btn-phoenix-primary fs-10" type="submit">{{ _("Send") }}<span class="fa-solid fa-paper-plane ms-1"></span></button>
|
<button class="btn btn-sm btn-phoenix-primary fs-10" type="submit">{{ _("Send") }}<span class="fa-solid fa-paper-plane ms-1"></span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -172,7 +172,7 @@
|
|||||||
<!-- Form Actions -->
|
<!-- Form Actions -->
|
||||||
<div class="form-actions mt-4">
|
<div class="form-actions mt-4">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<a href="{% url 'estimate_detail' estimate.pk %}" type="button" class="btn btn-phoenix-secondary">
|
<a href="{% url 'estimate_detail' request.dealer.slug estimate.pk %}" type="button" class="btn btn-phoenix-secondary">
|
||||||
<i class="fas fa-times me-2"></i> Cancel
|
<i class="fas fa-times me-2"></i> Cancel
|
||||||
</a>
|
</a>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
class="btn btn-sm btn-phoenix-danger"
|
class="btn btn-sm btn-phoenix-danger"
|
||||||
data-bs-dismiss="modal"><i class="fa-solid fa-ban"></i> {% trans 'No' %}
|
data-bs-dismiss="modal"><i class="fa-solid fa-ban"></i> {% trans 'No' %}
|
||||||
</button>
|
</button>
|
||||||
<form id="confirmForm" method="POST" action="{% url 'invoice_mark_as' invoice.pk %}?mark=accept" class="d-inline">
|
<form id="confirmForm" method="POST" action="{% url 'invoice_mark_as' request.dealer.slug invoice.pk %}?mark=accept" class="d-inline">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" class="btn btn-phoenix-success btn-sm"><i class="fa-solid fa-circle-check"></i> {% trans "Yes" %}</button>
|
<button type="submit" class="btn btn-phoenix-success btn-sm"><i class="fa-solid fa-circle-check"></i> {% trans "Yes" %}</button>
|
||||||
</form>
|
</form>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- ============================================-->
|
<!-- ============================================-->
|
||||||
<div class="modal fade" id="mark_as_paid_Modal" tabindex="-1" aria-labelledby="confirmModalLabel" aria-hidden="true">
|
<div class="modal fade" id="mark_as_paid_Modal" tabindex="-1" aria-labelledby="confirmModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-sm">
|
<div class="modal-dialog modal-sm">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@ -51,7 +51,7 @@
|
|||||||
data-bs-dismiss="modal">
|
data-bs-dismiss="modal">
|
||||||
<i class="fa-solid fa-ban"></i> {% trans 'No' %}
|
<i class="fa-solid fa-ban"></i> {% trans 'No' %}
|
||||||
</button>
|
</button>
|
||||||
<form id="confirmForm" method="POST" action="{% url 'payment_mark_as_paid' invoice.pk %}" class="d-inline">
|
<form id="confirmForm" method="POST" action="{% url 'payment_mark_as_paid' request.dealer.slug invoice.pk %}" class="d-inline">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" class="btn btn-phoenix-success btn-sm"><i class="fa-solid fa-circle-check"></i> {% trans "Yes" %}</button>
|
<button type="submit" class="btn btn-phoenix-success btn-sm"><i class="fa-solid fa-circle-check"></i> {% trans "Yes" %}</button>
|
||||||
</form>
|
</form>
|
||||||
@ -60,7 +60,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- ============================================-->
|
<!-- ============================================-->
|
||||||
<!-- <section> begin ============================-->
|
<!-- <section> begin ============================-->
|
||||||
<section class="pt-5 pb-9 bg-body-emphasis dark__bg-gray-1200 border-top">
|
<section class="pt-5 pb-9 bg-body-emphasis dark__bg-gray-1200 border-top">
|
||||||
<div class="row-small mt-3 mx-3">
|
<div class="row-small mt-3 mx-3">
|
||||||
@ -82,40 +82,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex align-items-center gap-2">
|
<div class="d-flex align-items-center gap-2">
|
||||||
{# Accept Invoice Button #}
|
{% if invoice.invoice_status == 'in_review' %}
|
||||||
{% if invoice.invoice_status == 'in_review' %}
|
<button id="accept_invoice" class="btn btn-phoenix-secondary" data-bs-toggle="modal" data-bs-target="#confirmModal"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-check-double"></i> {% trans 'Accept' %}</span></button>
|
||||||
<button id="accept_invoice" class="btn btn-phoenix-secondary btn-sm" data-bs-toggle="modal" data-bs-target="#confirmModal">
|
{% endif %}
|
||||||
<i class="fa-solid fa-check-double me-1 me-sm-0 me-md-1"></i> {# Icon always visible, adjusted margin #}
|
{% if invoice.invoice_status == 'approved' %}
|
||||||
<span class="d-none d-sm-inline-block">{% trans 'Accept' %}</span> {# Text hidden on xs, shown on sm+ #}
|
<a href="{% url 'payment_create' request.user.dealer.slug invoice.pk %}" class="btn btn-phoenix-success"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-money-bill"></i> {% trans 'Record Payment' %}</span></a>
|
||||||
</button>
|
{% endif %}
|
||||||
{% endif %}
|
{% if not invoice.is_paid %}
|
||||||
|
<button {% if invoice.is_review or invoice.amount_paid|to_int < invoice.amount_due|to_int %}disabled{% endif %} id="mark_invoice_as_paid" class="btn btn-phoenix-secondary" data-bs-toggle="modal" data-bs-target="#mark_as_paid_Modal"><span class="d-none d-sm-inline-block"><span class="icon-saudi_riyal"></span> {% trans 'Mark as Paid' %}</span></button>
|
||||||
{# Record Payment Button #}
|
{% endif %}
|
||||||
{% if invoice.invoice_status == 'approved' %}
|
<a href="{% url 'invoice_preview' request.user.dealer.slug invoice.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block"><i class="fa-regular fa-eye"></i> {% trans 'Preview' %}</span></a>
|
||||||
<a href="{% url 'payment_create' invoice.pk %}" class="btn btn-phoenix-success btn-sm">
|
</div>
|
||||||
<i class="fa-solid fa-money-bill me-1 me-sm-0 me-md-1"></i> {# Icon always visible, adjusted margin #}
|
|
||||||
<span class="d-none d-sm-inline-block">{% trans 'Record Payment' %}</span> {# Text hidden on xs, shown on sm+ #}
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# Mark as Paid Button #}
|
|
||||||
{% if not invoice.is_paid %}
|
|
||||||
<button {% if invoice.is_review or invoice.amount_paid|to_int < invoice.amount_due|to_int %}disabled{% endif %} id="mark_invoice_as_paid" class="btn btn-phoenix-secondary btn-sm" data-bs-toggle="modal" data-bs-target="#mark_as_paid_Modal">
|
|
||||||
<span class="icon-saudi_riyal me-1 me-sm-0 me-md-1"></span> {# Icon always visible, adjusted margin #}
|
|
||||||
<span class="d-none d-sm-inline-block">{% trans 'Mark as Paid' %}</span> {# Text hidden on xs, shown on sm+ #}
|
|
||||||
</button>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# Preview Button #}
|
|
||||||
<a href="{% url 'invoice_preview' invoice.pk %}" class="btn btn-phoenix-primary btn-sm">
|
|
||||||
<i class="fa-regular fa-eye me-1 me-sm-0 me-md-1"></i> {# Icon always visible, adjusted margin #}
|
|
||||||
<span class="d-none d-sm-inline-block">{% trans 'Preview' %}</span> {# Text hidden on xs, shown on sm+ #}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{invoice.amount_owned}}
|
{{invoice.amount_owned}}
|
||||||
|
|
||||||
<!-- ============================================-->
|
<!-- ============================================-->
|
||||||
<div class="card mb-5 {% if invoice.is_review %}disabled{% endif %}">
|
<div class="card mb-5 {% if invoice.is_review %}disabled{% endif %}">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row g-4 g-xl-1 g-xxl-3 justify-content-between">
|
<div class="row g-4 g-xl-1 g-xxl-3 justify-content-between">
|
||||||
@ -190,42 +171,42 @@
|
|||||||
<!-- <section> begin ============================-->
|
<!-- <section> begin ============================-->
|
||||||
<div class="container bg-body dark__bg-gray-1100 p-4 mb-4 rounded-2 text-body-tertiary {% if invoice.is_review %}disabled{% endif %}">
|
<div class="container bg-body dark__bg-gray-1100 p-4 mb-4 rounded-2 text-body-tertiary {% if invoice.is_review %}disabled{% endif %}">
|
||||||
<!---->
|
<!---->
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col mb-2">
|
<div class="col mb-2">
|
||||||
<h6 class="mb-0 me-3"><i class="fa-solid fa-hashtag"></i> {% trans "Invoice Number" %} :</h6>
|
<h6 class="mb-0 me-3"><i class="fa-solid fa-hashtag"></i> {% trans "Invoice Number" %} :</h6>
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.invoice_number}}</p>
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.invoice_number}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col mb-2">
|
<div class="col mb-2">
|
||||||
<h6 class="me-3"><i class="fa-solid fa-calendar-days"></i> {% trans "Invoice Date" %} :</h6>
|
<h6 class="me-3"><i class="fa-solid fa-calendar-days"></i> {% trans "Invoice Date" %} :</h6>
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.created}}</p>
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.created}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col mb-2">
|
<div class="col mb-2">
|
||||||
<h6 class="mb-2 me-3"><i class="fa-solid fa-user"></i> {% trans "Customer Name" %} :</h6>
|
<h6 class="mb-2 me-3"><i class="fa-solid fa-user"></i> {% trans "Customer Name" %} :</h6>
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.customer.customer_name}}</p>
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.customer.customer_name}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col mb-2">
|
<div class="col mb-2">
|
||||||
<h6 class="mb-2"><i class="fa-solid fa-envelope"></i> {% trans "Customer Email" %} :</h6>
|
<h6 class="mb-2"><i class="fa-solid fa-envelope"></i> {% trans "Customer Email" %} :</h6>
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.customer.email}}</p>
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.customer.email}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h6 class="mb-2"><i class="fa-solid fa-list"></i> {% trans "Invoice Status" %} :</h6>
|
<h6 class="mb-2"><i class="fa-solid fa-list"></i> {% trans "Invoice Status" %} :</h6>
|
||||||
<div class="fs-9 text-body-secondary fw-semibold mb-0">
|
<div class="fs-9 text-body-secondary fw-semibold mb-0">
|
||||||
{% if invoice.invoice_status == 'draft' %}
|
{% if invoice.invoice_status == 'draft' %}
|
||||||
<span class="badge text-bg-warning">{% trans "Draft" %}</span>
|
<span class="badge text-bg-warning">{% trans "Draft" %}</span>
|
||||||
{% elif invoice.invoice_status == 'in_review' %}
|
{% elif invoice.invoice_status == 'in_review' %}
|
||||||
<span class="badge text-bg-info">{% trans "In Review" %}</span>
|
<span class="badge text-bg-info">{% trans "In Review" %}</span>
|
||||||
{% elif invoice.invoice_status == 'approved' %}
|
{% elif invoice.invoice_status == 'approved' %}
|
||||||
<span class="badge text-bg-info">{% trans "Approved" %}</span>
|
<span class="badge text-bg-info">{% trans "Approved" %}</span>
|
||||||
{% elif invoice.invoice_status == 'declined' %}
|
{% elif invoice.invoice_status == 'declined' %}
|
||||||
<span class="badge text-bg-danger">{% trans "Declined" %}</span>
|
<span class="badge text-bg-danger">{% trans "Declined" %}</span>
|
||||||
{% elif invoice.invoice_status == 'paid' %}
|
{% elif invoice.invoice_status == 'paid' %}
|
||||||
<span class="badge text-bg-success">{% trans "Paid" %}</span>
|
<span class="badge text-bg-success">{% trans "Paid" %}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-0 {% if invoice.is_review %}disabled{% endif %}">
|
<div class="px-0 {% if invoice.is_review %}disabled{% endif %}">
|
||||||
<div class="table-responsive scrollbar">
|
<div class="table-responsive scrollbar">
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
{% block title %}{{ _("Invoices") }}{% endblock title %}
|
{% block title %}{{ _("Invoices") }}{% endblock title %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<h3 class="mb-3"><i class="fa-solid fa-receipt"></i> {% trans "Invoices" %}</h3>
|
<h3 class="mb-3"><i class="fa-solid fa-receipt"></i> {% trans "Invoices" %}</h3>
|
||||||
|
|
||||||
@ -55,7 +54,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="align-middle product white-space-nowrap">{{ invoice.created }}</td>
|
<td class="align-middle product white-space-nowrap">{{ invoice.created }}</td>
|
||||||
<td class="align-middle product white-space-nowrap">
|
<td class="align-middle product white-space-nowrap">
|
||||||
<a href="{% url 'invoice_detail' invoice.pk %}"
|
<a href="{% url 'invoice_detail' request.dealer.slug invoice.pk %}"
|
||||||
class="btn btn-sm btn-phoenix-success">
|
class="btn btn-sm btn-phoenix-success">
|
||||||
<i class="fa-regular fa-eye me-1"></i>
|
<i class="fa-regular fa-eye me-1"></i>
|
||||||
{% trans "View" %}
|
{% trans "View" %}
|
||||||
@ -71,12 +70,12 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<td class="align-middle product white-space-nowrap">{{ journal. }}</td>
|
<td class="align-middle product white-space-nowrap">{{ journal. }}</td>
|
||||||
<td class="align-middle product white-space-nowrap">{{ journal. }}</td>
|
<td class="align-middle product white-space-nowrap">{{ journal. }}</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="{% url 'invoice_detail' invoice.pk %}"
|
<a href="{% url 'invoice_detail' request.dealer.slug invoice.pk %}"
|
||||||
class="btn btn-sm btn-phoenix-success">
|
class="btn btn-sm btn-phoenix-success">
|
||||||
{% trans "view" %}
|
{% trans "view" %}
|
||||||
</a>
|
</a>
|
||||||
@ -44,11 +44,11 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1%}
|
{% if page_obj.paginator.num_pages > 1%}
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -53,11 +53,11 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1%}
|
{% if page_obj.paginator.num_pages > 1%}
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% if model %}
|
{% if model %}
|
||||||
<form method="post" action="{% url 'payment_create' pk=model.pk %}">
|
<form method="post" action="{% url 'payment_create' request.dealer.slug model.pk %}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form|crispy }}
|
{{ form|crispy }}
|
||||||
|
|||||||
@ -30,11 +30,11 @@
|
|||||||
<td class="align-middle product white-space-nowrap py-0">{{ journal.je_number }}</td>
|
<td class="align-middle product white-space-nowrap py-0">{{ journal.je_number }}</td>
|
||||||
{% if journal.ledger.invoicemodel %}
|
{% if journal.ledger.invoicemodel %}
|
||||||
<td class="align-middle product white-space-nowrap py-0">
|
<td class="align-middle product white-space-nowrap py-0">
|
||||||
<a href="{% url 'invoice_detail' journal.ledger.invoicemodel.pk %}"><i class="fa-solid fa-receipt"></i> {{ journal.ledger.invoicemodel }}</a>
|
<a href="{% url 'invoice_detail' request.dealer.slug journal.ledger.invoicemodel.pk %}"><i class="fa-solid fa-receipt"></i> {{ journal.ledger.invoicemodel }}</a>
|
||||||
</td>
|
</td>
|
||||||
{% elif journal.ledger.billmodel %}
|
{% elif journal.ledger.billmodel %}
|
||||||
<td class="align-middle product white-space-nowrap py-0">
|
<td class="align-middle product white-space-nowrap py-0">
|
||||||
<a href="{% url 'bill_detail' journal.ledger.billmodel.pk %}"><i class="fa-solid fa-money-bill"></i> {{ journal.ledger.billmodel }}</a>
|
<a href="{% url 'bill-detail' request.dealer.slug request.dealer.entity.slug journal.ledger.billmodel.pk %}"><i class="fa-solid fa-money-bill"></i> {{ journal.ledger.billmodel }}</a>
|
||||||
</td>
|
</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td class="align-middle product white-space-nowrap py-0"></td>
|
<td class="align-middle product white-space-nowrap py-0"></td>
|
||||||
@ -42,7 +42,7 @@
|
|||||||
<td class="align-middle product white-space-nowrap py-0">{{ journal.timestamp }}</td>
|
<td class="align-middle product white-space-nowrap py-0">{{ journal.timestamp }}</td>
|
||||||
<td class="align-middle product white-space-nowrap py-0">{{ journal.description }}</td>
|
<td class="align-middle product white-space-nowrap py-0">{{ journal.description }}</td>
|
||||||
<td class="align-middle product white-space-nowrap">
|
<td class="align-middle product white-space-nowrap">
|
||||||
<a href="{% url 'payment_details' journal.pk %}" class="btn btn-sm btn-phoenix-primary"><i class="fa-solid fa-eye me-1"></i> {% trans "View Tranactions"|capfirst %}</a>
|
<a href="{% url 'payment_details' request.dealer.slug journal.pk %}" class="btn btn-sm btn-phoenix-primary"><i class="fa-solid fa-eye me-1"></i> {% trans "View Tranactions"|capfirst %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
@ -54,11 +54,11 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.paginator.num_pages > 1 %}
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
<div class="d-flex justify-content-end mt-3">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html'%}
|
{% include 'partials/pagination.html'%}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -247,19 +247,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-footer text-end">
|
<div class="card-footer text-end">
|
||||||
<a href="{% url 'sales_list' %}" class="btn btn-phoenix-secondary">
|
<a href="{% url 'sales_list' request.dealer.slug %}" class="btn btn-phoenix-secondary">
|
||||||
{% trans "Back to List" %}
|
{% trans "Back to List" %}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- Add links to view full estimate and invoice if they exist -->
|
<!-- Add links to view full estimate and invoice if they exist -->
|
||||||
{% if sale_order.estimate %}
|
{% if sale_order.estimate %}
|
||||||
<a href="{% url 'estimate_detail' sale_order.estimate.pk %}" class="btn btn-phoenix-info ms-2">
|
<a href="{% url 'estimate_detail' request.dealer.slug sale_order.estimate.pk %}" class="btn btn-info ms-2">
|
||||||
{% trans "View Full Estimate" %}
|
{% trans "View Full Estimate" %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if sale_order.invoice %}
|
{% if sale_order.invoice %}
|
||||||
<a href="{% url 'invoice_detail' sale_order.invoice.pk %}" class="btn btn-phoenix-info ms-2">
|
<a href="{% url 'invoice_detail' request.dealer.slug sale_order.invoice.pk %}" class="btn btn-info ms-2">
|
||||||
{% trans "View Full Invoice" %}
|
{% trans "View Full Invoice" %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
<div class="spinner-border mx-3 htmx-indicator" role="status"><span class="visually-hidden">Loading...</span></div>
|
<div class="spinner-border mx-3 htmx-indicator" role="status"><span class="visually-hidden">Loading...</span></div>
|
||||||
<div class="search-box me-3">
|
<div class="search-box me-3">
|
||||||
<form class="position-relative">
|
<form class="position-relative">
|
||||||
<input class="form-control search-input search" name='search' type="search" placeholder="{{ _("Search") }}" aria-label="Search" hx-get="{% url 'car_list' %}" hx-trigger='keyup changed delay:500ms' hx-target='.table-responsive' hx-select='.table-responsive' hx-swap="innerHTML show:window:top" hx-indicator=".htmx-indicator"
|
<input class="form-control search-input search" name='search' type="search" placeholder="{{ _("Search") }}" aria-label="Search" hx-get="{% url 'car_list' request.dealer.slug %}" hx-trigger='keyup changed delay:500ms' hx-target='.table-responsive' hx-select='.table-responsive' hx-swap="innerHTML show:window:top" hx-indicator=".htmx-indicator"
|
||||||
hx-on::before-request="on_before_request()"
|
hx-on::before-request="on_before_request()"
|
||||||
hx-on::after-request="on_after_request()"
|
hx-on::after-request="on_after_request()"
|
||||||
/>
|
/>
|
||||||
@ -58,7 +58,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex align-items-center d-none filter">
|
<div class="d-flex align-items-center d-none filter">
|
||||||
<select hx-get="{% url 'car_list' %}" name="make" hx-target='.model-select' hx-select='.model-select' hx-swap="outerHTML show:window:top" hx-indicator=".htmx-indicator" class="form-select make" aria-label="Default select example"
|
<select hx-get="{% url 'car_list' request.dealer.slug %}" name="make" hx-target='.model-select' hx-select='.model-select' hx-swap="outerHTML show:window:top" hx-indicator=".htmx-indicator" class="form-select make" aria-label="Default select example"
|
||||||
hx-on::before-request="filter_before_request()"
|
hx-on::before-request="filter_before_request()"
|
||||||
hx-on::after-request="filter_after_request()"
|
hx-on::after-request="filter_after_request()"
|
||||||
>
|
>
|
||||||
@ -67,7 +67,7 @@
|
|||||||
<option value="{{ m.pk }}">{{ m.name }}</option>
|
<option value="{{ m.pk }}">{{ m.name }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<select hx-get="{% url 'car_list' %}" hx-include=".make" name="model" hx-target='.year' hx-select='.year' hx-swap="outerHTML show:window:top" hx-indicator=".htmx-indicator" class="form-select model-select" aria-label="Default select example"
|
<select hx-get="{% url 'car_list' request.dealer.slug %}" hx-include=".make" name="model" hx-target='.year' hx-select='.year' hx-swap="outerHTML show:window:top" hx-indicator=".htmx-indicator" class="form-select model-select" aria-label="Default select example"
|
||||||
hx-on::before-request="filter_before_request()"
|
hx-on::before-request="filter_before_request()"
|
||||||
hx-on::after-request="filter_after_request()"
|
hx-on::after-request="filter_after_request()"
|
||||||
>
|
>
|
||||||
@ -89,7 +89,7 @@
|
|||||||
<option value="sold">Sold</option>
|
<option value="sold">Sold</option>
|
||||||
<option value="transfer">Transfer</option>
|
<option value="transfer">Transfer</option>
|
||||||
</select>
|
</select>
|
||||||
<button id="search" hx-get="{% url 'car_list' %}" hx-include=".make,.model,.year,.car_status" hx-indicator=".htmx-indicator" hx-target='.table-responsive' hx-select='.table-responsive' hx-swap="outerHTML show:window:top" class="btn btn-sm btn-phoenix-primary"
|
<button id="search" hx-get="{% url 'car_list' request.dealer.slug %}" hx-include=".make,.model,.year,.car_status" hx-indicator=".htmx-indicator" hx-target='.table-responsive' hx-select='.table-responsive' hx-swap="outerHTML show:window:top" class="btn btn-sm btn-phoenix-primary"
|
||||||
hx-on::before-request="filter_before_request()"
|
hx-on::before-request="filter_before_request()"
|
||||||
hx-on::after-request="filter_after_request()">Search</button>
|
hx-on::after-request="filter_after_request()">Search</button>
|
||||||
</div>
|
</div>
|
||||||
@ -149,7 +149,7 @@
|
|||||||
<td class="align-middle white-space-nowrap quotation">
|
<td class="align-middle white-space-nowrap quotation">
|
||||||
{% if tx.estimate %}
|
{% if tx.estimate %}
|
||||||
<p class="fw-bo text-body fs-9 mb-0">
|
<p class="fw-bo text-body fs-9 mb-0">
|
||||||
<a href="{% url 'estimate_detail' tx.estimate.uuid %}">
|
<a href="{% url 'estimate_detail' request.dealer.slug tx.estimate.uuid %}">
|
||||||
{{tx.estimate.estimate_number}}
|
{{tx.estimate.estimate_number}}
|
||||||
</a><br>
|
</a><br>
|
||||||
{% if tx.estimate.status == "draft" %}
|
{% if tx.estimate.status == "draft" %}
|
||||||
@ -167,7 +167,7 @@
|
|||||||
<td class="align-middle white-space-nowrap invoice">
|
<td class="align-middle white-space-nowrap invoice">
|
||||||
{% if tx.invoice %}
|
{% if tx.invoice %}
|
||||||
<p class="fw-bo text-body fs-9 mb-0">
|
<p class="fw-bo text-body fs-9 mb-0">
|
||||||
<a href="{% url 'invoice_detail' tx.invoice.uuid %}">
|
<a href="{% url 'invoice_detail' request.dealer.slug tx.invoice.uuid %}">
|
||||||
{{tx.invoice.invoice_number}}
|
{{tx.invoice.invoice_number}}
|
||||||
</a><br>
|
</a><br>
|
||||||
{% if tx.invoice.is_draft %}
|
{% if tx.invoice.is_draft %}
|
||||||
@ -204,7 +204,7 @@
|
|||||||
<td class="align-middle text-end white-space-nowrap pe-0 action">
|
<td class="align-middle text-end white-space-nowrap pe-0 action">
|
||||||
<div class="btn-reveal-trigger position-static">
|
<div class="btn-reveal-trigger position-static">
|
||||||
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
|
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
|
||||||
<div class="dropdown-menu dropdown-menu-end py-2"><a class="dropdown-item text-success-dark" href="{% url 'order_detail' tx.pk %}">{{ _("View Sales Order Detail") }}</a>
|
<div class="dropdown-menu dropdown-menu-end py-2"><a class="dropdown-item text-success-dark" href="{% url 'order_detail' request.dealer.slug tx.pk %}">{{ _("View Sales Order Detail") }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
<input class="d-none" id="emailPhotos" type="file" accept="image/*" />
|
<input class="d-none" id="emailPhotos" type="file" accept="image/*" />
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<a href="{% url 'estimate_detail' estimate.pk %}" class="btn btn-link text-body fs-10 text-decoration-none">Discard</a>
|
<a href="{% url 'estimate_detail' request.dealer.slug estimate.pk %}" class="btn btn-link text-body fs-10 text-decoration-none">Discard</a>
|
||||||
<button class="btn btn-phoenix-primary fs-10" type="submit">Send<span class="fa-solid fa-paper-plane ms-1"></span></button>
|
<button class="btn btn-phoenix-primary fs-10" type="submit">Send<span class="fa-solid fa-paper-plane ms-1"></span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user