upto date on 1/6

This commit is contained in:
Faheedkhan 2025-06-01 15:48:19 +03:00
parent 172f830645
commit 072ddbba0c

View File

@ -17,24 +17,14 @@
{% endblock customCSS %} {% endblock customCSS %}
{% block content %} {% block content %}
{% if not car.ready %}
{% if not car.ready and not car.status == 'sold' %}
<div class="alert alert-outline-warning d-flex align-items-center" <div class="alert alert-outline-warning d-flex align-items-center"
role="alert"> role="alert">
<i class="fa-solid fa-circle-info fs-6"></i> <i class="fa-solid fa-circle-info fs-6"></i>
{%if not car.finances and not car.colors%}
<p class="mb-0 flex-1"> <p class="mb-0 flex-1">
{{ _("This car information is not complete , please add colors and finances both before making it ready for sale .") }} {{ _("This car information is not complete , please add colors and finances before making it ready for sale .") }}<a class="ms-3 text-body-primary fs-9"
href="{% url 'add_color' car.slug %}">{{ _("Add Color") }}</a>
</p> </p>
{% elif car.finances and not car.colors %}
<p class="mb-0 flex-1">
{{ _("This car information is not complete , please add colors before making it ready for sale .") }}
</p>
{%else%}
<p class="mb-0 flex-1">
{{ _("This car information is not complete , please add finances before making it ready for sale .") }}
</p>
{%endif%}
<button class="btn-close" <button class="btn-close"
type="button" type="button"
data-bs-dismiss="alert" data-bs-dismiss="alert"
@ -247,7 +237,7 @@
</tr> </tr>
<tr> <tr>
<th>{% trans "Discount Amount"|capfirst %}</th> <th>{% trans "Discount Amount"|capfirst %}</th>
<td>{{ car.finances.discount_amount|floatformat:2 }}</td> <td>{{ car.finances.discount_amount|floatformat:2 }} -</td>
</tr> </tr>
<tr> <tr>
<th>{% trans "Additional Fee"|capfirst %}</th> <th>{% trans "Additional Fee"|capfirst %}</th>
@ -295,8 +285,6 @@
<div class="card-body"> <div class="card-body">
<div class="table-responsive scrollbar mb-3"> <div class="table-responsive scrollbar mb-3">
<table class="table table-sm fs-9 mb-0 overflow-hidden"> <table class="table table-sm fs-9 mb-0 overflow-hidden">
<!--test-->
{% if car.colors %} {% if car.colors %}
<tr> <tr>
<th>{% trans 'Exterior' %}</th> <th>{% trans 'Exterior' %}</th>
@ -321,27 +309,32 @@
<tr> <tr>
<td colspan="2"> <td colspan="2">
{% if not car.get_transfer %} {% comment %} {% if not car.get_transfer %}
<a href="{% url 'car_colors_update' car.slug %}" <a href="{% url 'car_finance_update' 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>
{% endif %} {% endif %}
{% else %}
<p>{% trans "No finance details available." %}</p>
{% if perms.inventory.add_carfinance %}
<a href="{% url 'car_finance_create' car.slug %}"
class="btn btn-phoenix-success btn-sm mb-3">{% trans "Add" %}</a>
{% endif %} {% endcomment %}
</td> </td>
</tr> </tr>
{% else %} {% comment %} <tr>
<td colspan="2">{% trans "No colors available for this car." %}</td>
</tr>
<tr> <tr>
<td colspan="2">
<td colspan="2"> {% if perms.inventory.change_carcolors %}
<p>{% trans "No color details available." %}</p> <a href="{% url 'add_color' car.slug %}"
{% if perms.inventory.add_carcolors %} class="btn btn-phoenix-success btn-sm">{% trans "Add" %}</a>
<a class="btn btn-phoenix-success btn-sm mb-3" href="{% url 'add_color' car.slug %}">{{ _("Add Color") }}</a>
{% endif %} {% endif %}
</td> </td>
</tr> </tr> {% endcomment %}
{% endif %} {% endif %}
<!--test-->
</table> </table>
</div> </div>
</div> </div>