From e9f301ee20e545844d7aa66e7e72ae61b2898c6e Mon Sep 17 00:00:00 2001 From: Faheedkhan Date: Wed, 27 Aug 2025 14:11:33 +0300 Subject: [PATCH] car list filter fix --- templates/inventory/car_detail.html | 370 ++++++++---------- templates/inventory/car_list_view.html | 12 +- .../plans/billing_info_create_or_update.html | 89 ++--- 3 files changed, 211 insertions(+), 260 deletions(-) diff --git a/templates/inventory/car_detail.html b/templates/inventory/car_detail.html index 313aca0a..4298c875 100644 --- a/templates/inventory/car_detail.html +++ b/templates/inventory/car_detail.html @@ -77,15 +77,182 @@
-
-
+
+

{% trans 'Car Details' %}

+
{{ car.vin }}
-
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if car.vendor %} + + + + + {% endif %} + + + + + + + + + {% if car.custom_cards %} + + + + + + + + + {% else %} + + + + + {% endif %} + {% if car.registrations %} + + + + + + + + + {% else %} + + + + + {% endif %} + + + + +
{% trans "VIN" %}{{ car.vin }}
{% trans "year"|capfirst %}{{ car.year }}
{% trans "make"|capfirst %}{{ car.id_car_make.get_local_name }}
{% trans "model"|capfirst %}{{ car.id_car_model.get_local_name }}
{% trans "series"|capfirst %}{{ car.id_car_serie.name }}
{% trans "trim"|capfirst %}{{ car.id_car_trim.name }}
{% trans "Status"|capfirst %}{{ car.get_status_display }}
{% trans "Stock Type"|capfirst %}{{ car.get_stock_type_display }}
{% trans "Mileage"|capfirst %}{{ car.mileage }}
{% trans "Receiving Date"|capfirst %}{{ car.receiving_date|timesince }}
{% trans "Vendor"|capfirst %}{{ car.vendor.name }}
{% trans "Remarks"|capfirst %}{{ car.remarks }}
{% trans 'specifications'|capfirst %} + +
{% trans "Custom Number"|capfirst %}{{ car.custom_cards.custom_number }}
{% trans "Custom Date"|capfirst %}{{ car.custom_cards.custom_date|date }}
{% trans "Custom Card" %} + {% if perms.inventory.add_customcard %} + + {% endif %} +
{% trans "Registration"|capfirst %} + {{ car.registrations.plate_number }} | {{ car.registrations.text1 }} {{ car.registrations.text2 }} {{ car.registrations.text3 }} +
{% trans "Registration Date"|capfirst %}{{ car.registrations.registration_date|date }}
{% trans "Registration" %} + {% if perms.inventory.add_carregistration %} + + {% endif %} +
{% trans 'Location'|capfirst %} + {% if car.marked_price and not car.get_transfer %} + {% if car.location %} + {% if car.location.is_owner_showroom %} + {% trans 'Our Showroom' %} + {% else %} + {{ car.location.showroom.get_local_name }} + {% endif %} + {% if perms.inventory.add_cartransfer %} + + {% trans "transfer"|capfirst %} + + {% endif %} + {% else %} + {% trans "No location available." %} + {% if perms.inventory.add_carlocation %} + {% trans "Add" %} + {% endif %} + {% endif %} + {% endif %} +
+
+
+ {% if not car.get_transfer %} + {% if perms.inventory.change_car %} + {% trans "Edit" %} + + + + {% trans "Sell to another dealer"|capfirst %} + + {% endif %} + {% else %} + {% trans "Cannot Edit, Car in Transfer." %} + {% endif %} +
+
+
+
+
+
+

{% trans 'Financial Details' %}

@@ -100,34 +267,7 @@ {% trans "Marked Price"|capfirst %} {{ car.marked_price|floatformat:2 }} - {% comment %} - {% trans "Selling Price"|capfirst %} - {{ car.finances.selling_price|floatformat:2 }} - - - {% trans "Discount Amount"|capfirst %} - {{ car.finances.discount_amount|floatformat:2 }} - - - {% trans "Additional Fee"|capfirst %} - - - {% if car.finances.additional_services.first.pk %} - {% for service in car.finances.additional_services.all %} - - {{ service.name }} - {{ service.price_|floatformat:2 }} - - {% endfor %} - {% endif %} - - {% trans "VAT Amount"|capfirst %} - {{ car.finances.vat_amount|floatformat:2 }} - - - {% trans "Total"|capfirst %} - {{ car.finances.total_vat|floatformat:2 }} - {% endcomment %} + {% if not car.get_transfer %} @@ -327,173 +467,7 @@
{% endif %}
-
-
-

{% trans 'Car Details' %}

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {% if car.vendor %} - - - - - {% endif %} - - - - - - - - - {% if car.custom_cards %} - - - - - - - - - {% else %} - - - - - {% endif %} - {% if car.registrations %} - - - - - - - - - {% else %} - - - - - {% endif %} - - - - -
{% trans "VIN" %}{{ car.vin }}
{% trans "year"|capfirst %}{{ car.year }}
{% trans "make"|capfirst %}{{ car.id_car_make.get_local_name }}
{% trans "model"|capfirst %}{{ car.id_car_model.get_local_name }}
{% trans "series"|capfirst %}{{ car.id_car_serie.name }}
{% trans "trim"|capfirst %}{{ car.id_car_trim.name }}
{% trans "Status"|capfirst %}{{ car.get_status_display }}
{% trans "Stock Type"|capfirst %}{{ car.get_stock_type_display }}
{% trans "Mileage"|capfirst %}{{ car.mileage }}
{% trans "Receiving Date"|capfirst %}{{ car.receiving_date|timesince }}
{% trans "Vendor"|capfirst %}{{ car.vendor.name }}
{% trans "Remarks"|capfirst %}{{ car.remarks }}
{% trans 'specifications'|capfirst %} - -
{% trans "Custom Number"|capfirst %}{{ car.custom_cards.custom_number }}
{% trans "Custom Date"|capfirst %}{{ car.custom_cards.custom_date|date }}
{% trans "Custom Card" %} - {% if perms.inventory.add_customcard %} - - {% endif %} -
{% trans "Registration"|capfirst %} - {{ car.registrations.plate_number }} | {{ car.registrations.text1 }} {{ car.registrations.text2 }} {{ car.registrations.text3 }} -
{% trans "Registration Date"|capfirst %}{{ car.registrations.registration_date|date }}
{% trans "Registration" %} - {% if perms.inventory.add_carregistration %} - - {% endif %} -
{% trans 'Location'|capfirst %} - {% if car.marked_price and not car.get_transfer %} - {% if car.location %} - {% if car.location.is_owner_showroom %} - {% trans 'Our Showroom' %} - {% else %} - {{ car.location.showroom.get_local_name }} - {% endif %} - {% if perms.inventory.add_cartransfer %} - - {% trans "transfer"|capfirst %} - - {% endif %} - {% else %} - {% trans "No location available." %} - {% if perms.inventory.add_carlocation %} - {% trans "Add" %} - {% endif %} - {% endif %} - {% endif %} -
-
-
- {% if not car.get_transfer %} - {% if perms.inventory.change_car %} - {% trans "Edit" %} - - - - {% trans "Sell to another dealer"|capfirst %} - - {% endif %} - {% else %} - {% trans "Cannot Edit, Car in Transfer." %} - {% endif %} -
-
-
-
+
{% if car.status == 'sold' %} {{ _("Inventory Ready") }} {% if car.ready %} - Ready + {% trans "Ready" %} {{ _("Yes") }} {% else %} - Not Ready + {% trans "Not Ready" %} {{ _("No") }} {% endif %} @@ -306,3 +306,11 @@ {% include "empty-illustration-page.html" with value="car" url=create_car_url %} {% endif %} {% endblock %} +{% block customJS%} + +{% endblock %} \ No newline at end of file diff --git a/templates/plans/billing_info_create_or_update.html b/templates/plans/billing_info_create_or_update.html index 92caf5bb..a63bd0c1 100644 --- a/templates/plans/billing_info_create_or_update.html +++ b/templates/plans/billing_info_create_or_update.html @@ -1,68 +1,37 @@ {% extends 'base.html' %} {% load i18n crispy_forms_filters %} {% block title %} - {% trans 'Billing Information' %} + {% trans 'Billing Information' %} {% endblock %} {% block content %} - {% comment %}
-
-
- -

{% trans "Provide billing data"|upper %}

- {% csrf_token %} - {{ form|crispy }} - - - {% if object %} - {{ _("Delete") }} - {% endif %} - -
-
-
{% endcomment %} - -
-
-
-
-

- {% trans "Provide billing data"|upper %} -

- {% trans 'Billing Information' %} - {% endblock %} - {% block content %} -
-
-
-
-

- {% trans "Provide billing data"|upper %} - -

-
-
- {% endblock %} +
+ +
+
+
+ +{% endblock %} \ No newline at end of file