update on the report table
This commit is contained in:
parent
4cc61a6fa3
commit
08dbd10465
@ -742,7 +742,9 @@ class Car(Base):
|
||||
)
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
@property
|
||||
def invoice(self):
|
||||
return self.item_model.invoicemodel_set.first if self.item_model.invoicemodel_set.first() else None
|
||||
def get_transfer(self):
|
||||
return self.transfer_logs.filter(active=True).first()
|
||||
|
||||
|
||||
@ -1276,8 +1276,8 @@ urlpatterns = [
|
||||
),
|
||||
path('car-sale-report/<slug:dealer_slug>/csv/', views.car_sale_report_csv_export, name='car-sale-report-csv-export'),
|
||||
|
||||
path('feature/recalls/', views.RecallListView.as_view(), name='recall_list'),
|
||||
path('feature/recall/', views.RecallFilterView, name='recall_filter'),
|
||||
path('feature/recall/', views.RecallListView.as_view(), name='recall_list'),
|
||||
path('feature/recall/filter/', views.RecallFilterView, name='recall_filter'),
|
||||
path('feature/recall/<int:pk>/view/', views.RecallDetailView.as_view(), name='recall_detail'),
|
||||
path('feature/recall/create/', views.RecallCreateView.as_view(), name='recall_create'),
|
||||
path('feature/recall/success/', views.RecallSuccessView.as_view(), name='recall_success'),
|
||||
|
||||
@ -47,13 +47,13 @@
|
||||
{% endif %}
|
||||
|
||||
{% if perms.inventory.add_car %}
|
||||
<li class="nav-item">
|
||||
{% comment %} <li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'upload_cars' request.dealer.slug %}">
|
||||
<div class="d-flex align-items-center">
|
||||
<span class="nav-link-icon"><span class="fas fa-file-import"></span></span><span class="nav-link-text">{% trans "Bulk Upload"|capfirst %}</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</li> {% endcomment %}
|
||||
{% endif %}
|
||||
{% if perms.django_ledger.view_purchaseordermodel %}
|
||||
<li class="nav-item">
|
||||
|
||||
@ -42,11 +42,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
<section id="purchase-details" class="mb-3">
|
||||
@ -59,46 +59,46 @@
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover table-bordered table-sm">
|
||||
<thead >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans 'VIN' %}</th>
|
||||
<th>{% trans 'Make' %}</th>
|
||||
<th>{% trans 'Model' %}</th>
|
||||
<th>{% trans 'Year' %}</th>
|
||||
<th>{% trans 'Serie' %}</th>
|
||||
<th>{% trans 'Trim' %}</th>
|
||||
<th>{% trans 'Mileage' %}</th>
|
||||
<th>{% trans 'Stock Type' %}</th>
|
||||
<th>{% trans 'Created Date' %}</th>
|
||||
<th>{% trans 'Sold Date' %}</th>
|
||||
<th>{% trans 'Cost Price' %}</th>
|
||||
<th>{% trans 'Marked Price' %}</th>
|
||||
<th>{% trans 'Discount Amount' %}</th>
|
||||
<th>{% trans 'Selling Price' %}</th>
|
||||
<th>{% trans 'Tax Amount' %}</th>
|
||||
<th>{% trans 'Invoice Number' %}</th>
|
||||
<th class="fs-9">{% trans 'VIN' %}</th>
|
||||
<th class="fs-9">{% trans 'Make' %}</th>
|
||||
<th class="fs-9">{% trans 'Model' %}</th>
|
||||
<th class="fs-9">{% trans 'Year' %}</th>
|
||||
<th class="fs-9">{% trans 'Serie' %}</th>
|
||||
<th class="fs-9">{% trans 'Trim' %}</th>
|
||||
<th class="fs-9">{% trans 'Mileage' %}</th>
|
||||
<th class="fs-9">{% trans 'Stock Type' %}</th>
|
||||
<th class="fs-9">{% trans 'Created Date' %}</th>
|
||||
<th class="fs-9">{% trans 'Sold Date' %}</th>
|
||||
<th class="fs-9">{% trans 'Cost Price' %}</th>
|
||||
<th class="fs-9">{% trans 'Marked Price' %}</th>
|
||||
<th class="fs-9">{% trans 'Discount Amount' %}</th>
|
||||
<th class="fs-9">{% trans 'Selling Price' %}</th>
|
||||
<th class="fs-9">{% trans 'Tax Amount' %}</th>
|
||||
<th class="fs-9">{% trans 'Invoice Number' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for car in cars_sold%}
|
||||
{% for car in cars_sold %}
|
||||
|
||||
<tr>
|
||||
<td class="ps-1">{{car.vin}}</td>
|
||||
<td>{{car.id_car_make.name}}</td>
|
||||
<td>{{car.id_car_model.name}}</td>
|
||||
<td>{{car.year}}</td>
|
||||
<td>{{car.id_car_serie.name}}</td>
|
||||
<td>{{car.id_car_trim.name}}</td>
|
||||
<td>{{car.mileage}}</td>
|
||||
<td>{{car.stock_type}}</td>
|
||||
<td>{{car.created_at}}</td>
|
||||
<td>{{car.sold_date}}</td>
|
||||
<td>{{car.finances.cost_price}}</td>
|
||||
<td>{{car.finances.marked_price}}</td>
|
||||
<td>{{car.finances.discount_amount}}</td>
|
||||
<td>{{car.finances.selling_price}}</td>
|
||||
<td>{{car.finances.vat_amount}}</td>
|
||||
<td>{{car.item_model.invoicemodel_set.first.invoice_number}}</td>
|
||||
<td class="ps-1 fs-9">{{ car.vin }}</td>
|
||||
<td class="fs-9">{{ car.id_car_make.name }}</td>
|
||||
<td class="fs-9">{{ car.id_car_model.name }}</td>
|
||||
<td class="fs-9">{{ car.year }}</td>
|
||||
<td class="fs-9">{{ car.id_car_serie.name }}</td>
|
||||
<td class="fs-9">{{ car.id_car_trim.name }}</td>
|
||||
<td class="fs-9">{{ car.mileage }}</td>
|
||||
<td class="fs-9">{{ car.stock_type }}</td>
|
||||
<td class="fs-9">{{ car.created_at|date }}</td>
|
||||
<td class="fs-9">{{ car.invoice.date_paid|date|default_if_none:"-" }}</td>
|
||||
<td class="fs-9">{{ car.finances.cost_price }}</td>
|
||||
<td class="fs-9">{{ car.finances.marked_price }}</td>
|
||||
<td class="fs-9">{{ car.finances.discount_amount }}</td>
|
||||
<td class="fs-9">{{ car.finances.selling_price }}</td>
|
||||
<td class="fs-9">{{ car.finances.vat_amount }}</td>
|
||||
<td class="fs-9">{{ car.invoice.invoice_number }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
@ -4,8 +4,10 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-4">
|
||||
<h2>{% trans "Recall History" %}</h2>
|
||||
|
||||
<div class="d-flex justify-content-between mb-3">
|
||||
<h2>{% trans "Recall History" %}</h2>
|
||||
<a href="{% url 'recall_filter' %}" class="btn btn-primary">{% trans "Create Recall" %}</a>
|
||||
</div>
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
@ -13,7 +15,7 @@
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>{% trans "Title" %}</th>
|
||||
<th>{% trans "Sent" %}</th>
|
||||
<th>{% trans "Sent At" %}</th>
|
||||
<th>{% trans "Make" %}</th>
|
||||
<th>{% trans "Model" %}</th>
|
||||
<th>{% trans "Series" %}</th>
|
||||
@ -28,7 +30,7 @@
|
||||
<td>{{ recall.title }}</td>
|
||||
<td>
|
||||
<span title="{{ recall.created_at }}">
|
||||
{{ recall.created_at|naturaltime }}
|
||||
{{ recall.created_at|date }}
|
||||
</span>
|
||||
</td>
|
||||
<td><img src="{{ recall.make.logo.url }}" width="50" height="50"> {{ recall.make|default:"-" }}</td>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<h4 class="alert-heading">{% trans "Recall Initiated Successfully!" %}</h4>
|
||||
<p>{% trans "The recall has been created and notifications have been sent to all affected dealers." %}</p>
|
||||
<hr>
|
||||
<a href="{% url 'recall_filter' %}" class="btn btn-primary">
|
||||
<a href="{% url 'recall_list' %}" class="btn btn-primary">
|
||||
{% trans "Back to Recall Management" %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@ -137,7 +137,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<div class="col-lg-8 col-md-10 needs-validation {% if not items or not customer_count %}d-none{% endif %}">
|
||||
<div class="col-lg-12 col-md-10 needs-validation {% if not items or not customer_count %}d-none{% endif %}">
|
||||
<div class="card shadow-sm border-0 rounded-3">
|
||||
<div class="card-header bg-gray-200 py-3 border-0 rounded-top-3">
|
||||
<h3 class="mb-0 fs-4 text-center">
|
||||
@ -148,7 +148,6 @@
|
||||
|
||||
|
||||
<form id="mainForm" method="post" class="needs-validation {% if not items and not customer_count %}d-none{% endif %}">
|
||||
|
||||
{% csrf_token %}
|
||||
<div class="row g-3 col-12">
|
||||
{{ form|crispy }}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user