This commit is contained in:
Faheedkhan 2025-06-17 20:00:59 +03:00
parent 45c13c815a
commit 5cd5636740
2 changed files with 8 additions and 6 deletions

View File

@ -9254,7 +9254,7 @@ def upload_cars(request,pk=None):
manufacturer_name, model_name, year_model = result.values()
car_make = get_make(manufacturer_name)
car_model = get_model(model_name, car_make)
if not all([car_make, car_model]) or (make.pk != car_make.pk) or (model.pk != car_model.pk) or (int(year) != int(year_model)):
if not all([car_make, car_model]) or (make.pk != car_make.pk) or (model.pk != car_model.pk):
messages.error(request, f"invalid data at vin {row['vin']}, Please upload a valid CSV file")
return response
@ -9267,7 +9267,7 @@ def upload_cars(request,pk=None):
id_car_model=model,
id_car_serie=serie,
id_car_trim=trim,
year=int(year),
year=int(year_model),
vendor=vendor,
receiving_date=receiving_date,
)

View File

@ -1,12 +1,13 @@
{% extends "base.html" %}
{% block content %}
<h1>{{po.po_number}}</h1>
<h4>{{po.po_status|capfirst}}</h4>
<div class="table-responsive">
<div class="mt-4">
<h1><i class="fa-solid fa-cart-shopping me-1"></i>{{po.po_number}}</h1>
<h4>Satus:{{po.po_status|capfirst}}</h4>
<div class="table-responsive mt-3">
<table class="table table-striped table-hover align-middle">
<thead>
<tr>
<tr class="bg-body-highlight">
<th scope="col">Name</th>
<th scope="col">Quatnity</th>
<th scope="col">Unit Cost</th>
@ -33,4 +34,5 @@
</tbody>
</table>
</div>
<div>
{% endblock content %}