Merge pull request 'New Update' (#75) from frontend into main
Reviewed-on: #75 Reviewed-by: ismail <ismail.mosa.ibrahim@gmail.com>
This commit is contained in:
commit
2c0e40598a
@ -6094,7 +6094,7 @@ class BillListView(LoginRequiredMixin, PermissionRequiredMixin, ListView):
|
||||
|
||||
def get_queryset(self):
|
||||
dealer = get_user_type(self.request)
|
||||
qs = dealer.entity.get_bills()
|
||||
qs = dealer.entity.get_bills()
|
||||
return qs
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
@ -6121,7 +6121,7 @@ class BillDetailView(LoginRequiredMixin, PermissionRequiredMixin, DetailView):
|
||||
"""
|
||||
|
||||
model = BillModel
|
||||
template_name = "ledger/bills/bill_detail.html"
|
||||
template_name = "bill/bill_detail.html"
|
||||
context_object_name = "bill"
|
||||
permission_required = ["django_ledger.view_billmodel"]
|
||||
|
||||
@ -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,
|
||||
)
|
||||
|
||||
BIN
static/images/logos/vendors/Screenshot_2025-04-09_124932.png
vendored
Normal file
BIN
static/images/logos/vendors/Screenshot_2025-04-09_124932.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@ -12,7 +12,7 @@
|
||||
<div class="row mt-4">
|
||||
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<h3 class=""><i class="fa-solid fa-book"></i> {% trans "Audit Log Dashboard" %}</h3>
|
||||
<h3 class=""><i class="fas fa-right-to-bracket me-2"></i> {% trans "Audit Log Dashboard" %}</h3>
|
||||
</div>
|
||||
|
||||
<!-- Log Type Tabs -->
|
||||
@ -55,7 +55,7 @@
|
||||
<div class="d-flex">
|
||||
{% include 'partials/pagination.html' with q='loginEvents' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<p>No authentication audit events found.</p>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<div class="row mt-4">
|
||||
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<h3 class=""><i class="fa-solid fa-book"></i> {% trans "Audit Log Dashboard" %}</h3>
|
||||
<h3 class=""><i class="fas fa-history me-2"></i>{% trans "Audit Log Dashboard" %}</h3>
|
||||
</div>
|
||||
|
||||
<!-- Log Type Tabs -->
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<div class="row mt-4">
|
||||
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<h3 class=""><i class="fa-solid fa-book"></i> {% trans "Audit Log Dashboard" %}</h3>
|
||||
<h3 class=""><i class="fas fa-file-alt me-2"></i> {% trans "Audit Log Dashboard" %}</h3>
|
||||
</div>
|
||||
|
||||
<!-- Log Type Tabs -->
|
||||
|
||||
@ -27,8 +27,8 @@
|
||||
}
|
||||
|
||||
#djl-vendor-card-widget{
|
||||
height:30rem;
|
||||
|
||||
max-height:30rem;
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
<div class="row g-4" >
|
||||
<!-- Left Sidebar -->
|
||||
<div class="col-lg-4">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card shadow-sm" >
|
||||
<div class="card-body">
|
||||
{% include 'bill/includes/card_bill.html' with bill=bill entity_slug=view.kwargs.entity_slug style='bill-detail' %}
|
||||
<hr class="my-4">
|
||||
@ -141,18 +141,18 @@
|
||||
</div>
|
||||
<div class="card-body px-0 pt-0 pb-2">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-items-center mb-0">
|
||||
<table class="table table-hover">
|
||||
<thead >
|
||||
<tr>
|
||||
<tr class="bg-body-highlight">
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Item' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Entity Unit' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Unit Cost' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Quantity' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Total' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'PO' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle " scope="col">{% trans 'PO' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="list" id="project-list-table-body">
|
||||
{% for bill_item in itemtxs_qs %}
|
||||
<tr>
|
||||
<td class="align-middle white-space-nowrap">
|
||||
@ -182,7 +182,7 @@
|
||||
{% currency_symbol %}{{ bill_item.total_amount | currency_format }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="align-middle white-space-nowrap">
|
||||
<td class="align-middle white-space-nowrap pe-2">
|
||||
{% if bill_item.po_model_id %}
|
||||
<a class="btn btn-sm btn-phoenix-primary"
|
||||
href="{% url 'purchase_order_detail' bill_item.po_model_id %}">
|
||||
@ -218,7 +218,7 @@
|
||||
<h5 class="mb-0">{% trans 'Bill Transactions' %}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body px-0 pt-0 pb-2">
|
||||
<div class="card-body px-0 pt-0 pb-2 table-responsive">
|
||||
{% transactions_table bill %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -3,45 +3,45 @@
|
||||
|
||||
{% if style == 'detail' %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>{% trans 'Timestamp' %}</th>
|
||||
<th>{% trans 'Account' %}</th>
|
||||
<th>{% trans 'Account Name' %}</th>
|
||||
<th>{% trans 'Unit' %}</th>
|
||||
<th>{% trans 'Credit' %}</th>
|
||||
<th>{% trans 'Debit' %}</th>
|
||||
<th>{% trans 'Description' %}</th>
|
||||
<table class="table table-hover">
|
||||
<thead >
|
||||
<tr class="bg-body-highlight">
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Timestamp' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Account' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Account Name' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Unit' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Credit' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Debit' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Description' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for transaction_model in transaction_model_qs %}
|
||||
<tr>
|
||||
<td>{{ transaction_model.timestamp }}</td>
|
||||
<td>{{ transaction_model.account_code }}</td>
|
||||
<td>{{ transaction_model.account_name }}</td>
|
||||
<td>{% if transaction_model.entity_unit_name %}{{ transaction_model.entity_unit_name }}{% endif %}</td>
|
||||
<td>{% if transaction_model.is_credit %}${{ transaction_model.amount | currency_format }}{% endif %}</td>
|
||||
<td>{% if transaction_model.is_debit %}${{ transaction_model.amount | currency_format }}{% endif %}</td>
|
||||
<td>{% if transaction_model.description %}{{ transaction_model.description }}{% endif %}</td>
|
||||
<td class="sort white-space-nowrap align-middle ps-1" scope="col" >{{ transaction_model.timestamp }}</td>
|
||||
<td class="sort white-space-nowrap align-middle" scope="col">{{ transaction_model.account_code }}</td>
|
||||
<td class="sort white-space-nowrap align-middle" scope="col">{{ transaction_model.account_name }}</td>
|
||||
<td class="sort white-space-nowrap align-middle" scope="col">{% if transaction_model.entity_unit_name %}{{ transaction_model.entity_unit_name }}{% endif %}</td>
|
||||
<td class="sort white-space-nowrap align-middle" scope="col">{% if transaction_model.is_credit %}${{ transaction_model.amount | currency_format }}{% endif %}</td>
|
||||
<td class="sort white-space-nowrap align-middle" scope="col">{% if transaction_model.is_debit %}${{ transaction_model.amount | currency_format }}{% endif %}</td>
|
||||
<td class="sort white-space-nowrap align-middle pe-1" scope="col">{% if transaction_model.description %}{{ transaction_model.description }}{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr class="fw-bold">
|
||||
<td colspan="3"></td>
|
||||
<td class="text-end">{% trans 'Total' %}</td>
|
||||
<td>{% currency_symbol %}{{ total_credits | currency_format }}</td>
|
||||
<td>{% currency_symbol %}{{ total_debits | currency_format }}</td>
|
||||
<td></td>
|
||||
<td class="sort white-space-nowrap align-middle" colspan="3"></td>
|
||||
<td class="class="sort white-space-nowrap align-middle" " scope="col">{% trans 'Total' %}</td>
|
||||
<td class="sort white-space-nowrap align-middle" scope="col">{% currency_symbol %}{{ total_credits | currency_format }}</td>
|
||||
<td class="sort white-space-nowrap align-middle" scope="col">{% currency_symbol %}{{ total_debits | currency_format }}</td>
|
||||
<td class="sort white-space-nowrap align-middle" scope="col"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% elif style == 'compact' %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr class="bg-body-highlight">
|
||||
<th>{% trans 'Account' %}</th>
|
||||
<th>{% trans 'Account Name' %}</th>
|
||||
<th>{% trans 'Credit' %}</th>
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
<div class="col-auto">
|
||||
{% if perms.django_ledger.change_customermodel %}
|
||||
<a href="{% url 'customer_update' customer.slug %}" class="btn btn-sm btn-phoenix-warning"><span class="fa-solid fa-pen-to-square me-2"></span>{{_("Update")}}</a>
|
||||
<a href="{% url 'customer_update' customer.slug %}" class="btn btn-sm btn-phoenix-primary"><span class="fa-solid fa-pen-to-square me-2"></span>{{_("Update")}}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -62,7 +62,7 @@
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td>{% trans "No Permissions" %}</td>
|
||||
<td>{% trans "No User" %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
<div class="text-danger">{{ error }}</div>
|
||||
{% endfor %}
|
||||
<div class="d-flex mb-3">
|
||||
<a href="{% url 'group_detail' group.pk %}" class="btn btn-phoenix-primary me-2 px-6"><i class="fa-solid fa-ban"></i> {% trans "Cancel"|capfirst %}</a>
|
||||
<a href="{% url 'group_detail' group.pk %}" class="btn btn-phoenix-primary me-2 "><i class="fa-solid fa-ban"></i> {% trans "Cancel"|capfirst %}</a>
|
||||
<button class="btn btn-phoenix-primary" type="submit">
|
||||
<i class="fa-solid fa-floppy-disk"></i>
|
||||
{{ _("Save") }}
|
||||
|
||||
@ -7,14 +7,14 @@
|
||||
<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' %}">
|
||||
<span class="fas fa-angle-double-left" aria-hidden="true"></span>
|
||||
<span class="">{% trans 'First' %}</span>
|
||||
{% if LANGUAGE_CODE == 'ar' %}الأول{% else %}First{% endif %}
|
||||
</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 class="">{% trans 'First' %}</span>
|
||||
{% if LANGUAGE_CODE == 'ar' %}الأول{% else %}First{% endif %}
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
@ -75,14 +75,14 @@
|
||||
<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' %}">
|
||||
<span class="fas fa-angle-double-right" aria-hidden="true"></span>
|
||||
<span class="">{% trans 'Last' %}</span>
|
||||
{% if LANGUAGE_CODE == 'ar' %}الأخير{% else %}Last{% endif %}
|
||||
</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-right" aria-hidden="true"></span>
|
||||
<span class="">{% trans 'Last' %}</span>
|
||||
{% if LANGUAGE_CODE == 'ar' %}الأخير{% else %}Last{% endif %}
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
@ -106,8 +106,6 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row g-4 mt-4">
|
||||
<div class="col">
|
||||
<p class="fs-5 mb-2">{% trans 'Exterior Colors' %}</p>
|
||||
|
||||
@ -1,12 +1,35 @@
|
||||
{% 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>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
<h4>Status:</h4>
|
||||
{% comment %} Apply appropriate text color based on po.po_status {% endcomment %}
|
||||
{% if po.po_status == 'draft' %}
|
||||
<h4 class="ms-2 text-warning mb-0">{{ po.po_status|capfirst }}</h4>
|
||||
{% elif po.po_status == 'in_review' %}
|
||||
<h4 class="ms-2 text-primary mb-0">{{ po.po_status|capfirst }}</h4>
|
||||
{% elif po.po_status == 'approved' %}
|
||||
<h4 class="ms-2 text-info mb-0">{{ po.po_status|capfirst }}</h4>
|
||||
{% elif po.po_status == 'fulfilled' %}
|
||||
<h4 class="ms-2 text-success mb-0">{{ po.po_status|capfirst }}</h4>
|
||||
{% elif po.po_status == 'void' %}
|
||||
<h4 class="ms-2 text-danger mb-0">{{ po.po_status|capfirst }}</h4>
|
||||
{% else %}
|
||||
<h4 class="ms-2 text-muted mb-0">{{ po.po_status|capfirst }}</h4> {# Use muted for unknown/default status #}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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 +56,5 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
{% endblock content %}
|
||||
Loading…
x
Reference in New Issue
Block a user