Financial Ui improved #41

Merged
ismail merged 3 commits from frontend into main 2025-05-21 19:50:13 +03:00
10 changed files with 613 additions and 432 deletions

View File

@ -4,48 +4,101 @@
{% block title %}{{ _("Expenses") }}{% endblock title %}
{% block content %}
<div class="row mt-4 mx-4">
<div class="d-flex justify-content-between mb-2 p-6">
<span></span>
<h3 class="text-center">{% trans "Expenses" %}</h3>
<div class="row mt-4">
<div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Expenses" %}</h3>
<a href="{% url 'item_expense_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans "Add Expense" %}</a>
</div>
<div class="mx-n4 px-4 mx-lg-n6 px-lg-6 pt-7 border-y">
<div class="table-responsive mx-n1 px-1 scrollbar">
<table class="table fs-9 mb-0 border-top border-translucent">
<thead>
<tr>
<div class="col-12">
<form method="get" class=" mb-4">
<div class="input-group input-group-sm">
<button class="btn btn-sm btn-secondary rounded-start" type="submit">
{% trans "search" %}
</button>
<input type="text"
name="q"
class="form-control form-control-sm rounded-end"
value="{{ request.GET.q }}"
placeholder="{% trans 'Search bank accounts...' %}" />
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}"
class="btn btn-sm btn-outline-danger ms-1 rounded">
<i class="bi bi-x-lg"></i>
</a>
{% endif %}
</div>
</form>
</div>
{% if page_obj.object_list %}
<div class="table-responsive px-1 scrollbar mt-3">
<table class="table align-items-center table-flush">
<thead>
<tr class="bg-body-highlight">
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Item Number" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Name" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Unit of Measure" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
</tr>
</thead>
<tbody class="list">
{% for expense in expenses %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap py-0">{{ expense.item_number }}</td>
<td class="align-middle product white-space-nowrap">{{ expense.name }}</td>
<td class="align-middle product white-space-nowrap">{{ expense.uom }}</td>
<td class="">
<a href="{% url 'item_expense_update' expense.pk %}"
<tbody class="list">
{% for expense in expenses %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap">
{{ expense.item_number }}
</td>
<td class="align-middle product white-space-nowrap">
{{ expense.name }}
</td>
<td class="align-middle product white-space-nowrap">
{{ expense.uom }}
</td>
<td class="align-middle product white-space-nowrap">
<a href="{% url 'item_expense_update' expense.pk %}"
class="btn btn-sm btn-phoenix-success">
{% trans "Update" %}
</a>
</td>
</tr>
</td>
<td class="align-middle product white-space-nowrap">
</td>
<td class="align-middle white-space-nowrap text-start">
</td>
</tr>
{% empty %}
<tr>
<td colspan="6" class="text-center">{% trans "No Invoice Found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-center">
<tr>
<td colspan="6" class="text-center text-muted">{% trans "No Accounts Found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-between mt-3"><span class="d-none d-sm-inline-block" data-list-info="data-list-info">{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }}<span class="text-body-tertiary"> {{ _("Items of")}} </span>{{ page_obj.paginator.count }}</span>
<div class="d-flex">
{% if is_paginated %}
{% include 'partials/pagination.html' %}
{% endif %}
</div>
</div>
{% endif %}
</div>
{% endblock %}

View File

@ -1,22 +1,44 @@
{% extends "base.html" %}
{% load i18n static %}
{% block title %}{{ _("Expenses") }}{% endblock title %}
{% block title %}{{ _("Services") }}{% endblock title %}
{% block content %}
<div class="row">
<div class="d-flex justify-content-between">
<div class="row mt-4">
<h3 class="mb-2">{% trans "Services" %}</h3>
<a href="{% url 'item_service_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans "Add Service" %}</a>
<div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Services" %}</h3>
<a href="{% url 'item_service_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans "Add Service" %}</a>
</div>
<div class="col-12">
<form method="get" class=" mb-4">
<div class="input-group input-group-sm">
<button class="btn btn-sm btn-secondary rounded-start" type="submit">
{% trans "search" %}
</button>
<input type="text"
name="q"
class="form-control form-control-sm rounded-end"
value="{{ request.GET.q }}"
placeholder="{% trans 'Search bank accounts...' %}" />
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}"
class="btn btn-sm btn-outline-danger ms-1 rounded">
<i class="bi bi-x-lg"></i>
</a>
{% endif %}
</div>
</form>
</div>
<div class="table-responsive scrollbar transition">
<table class="table table-sm fs-9 mb-0 border-translucent">
{% if page_obj.object_list %}
<div class="table-responsive px-1 scrollbar mt-3">
<table class="table align-items-center table-flush">
<thead>
<tr>
<tr class="bg-body-highlight">
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Item Number" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Name" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Unit of Measure" %}</th>
@ -25,36 +47,61 @@
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
</tr>
</thead>
<tbody class="list">
{% for service in services %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap py-0">{{ service.pk }}</td>
<td class="align-middle product white-space-nowrap">{{ service.get_local_name }}</td>
<td class="align-middle product white-space-nowrap">{{ service.uom }}</td>
<td class="align-middle product white-space-nowrap">
{% if service.taxable %}
Yes
{% else %}
No
{% endif %}
{{ service.pk }}
</td>
<td class="align-middle product white-space-nowrap">{{ service.item.co }}</td>
<td class="text-center">
<a href="{% url 'item_service_update' service.pk %}"
<td class="align-middle product white-space-nowrap">
{{ service.get_local_name }}
</td>
<td class="align-middle product white-space-nowrap">
{{ service.uom }}
</td>
<td class="align-middle product white-space-nowrap">
{% if service.taxable %}
Yes
{% else %}
No
{% endif %}
</td>
<td class="align-middle product white-space-nowrap">
{{ service.item.co }}
</td>
<td class="align-middle white-space-nowrap text-start">
<a href="{% url 'item_service_update' service.pk %}"
class="btn btn-sm btn-phoenix-success">
{% trans "Update" %}
</a>
</td>
</tr>
{% empty %}
{% empty %}
<tr>
<td colspan="6" class="text-center">{% trans "No Invoice Found" %}</td>
<td colspan="6" class="text-center text-muted">{% trans "No Accounts Found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-center">
<div class="d-flex justify-content-between mt-3"><span class="d-none d-sm-inline-block" data-list-info="data-list-info">{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }}<span class="text-body-tertiary"> {{ _("Items of")}} </span>{{ page_obj.paginator.count }}</span>
<div class="d-flex">
{% if is_paginated %}
{% include 'partials/pagination.html' %}
{% endif %}
</div>
</div>
{% endif %}
</div>
{% endblock %}

View File

@ -5,52 +5,89 @@
{% block content %}
<div class="row mt-4">
<div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Bank Accounts" %}</h3>
<div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Bank Accounts" %}</h3>
<a href="{% url 'bank_account_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans "Add Bank Account" %}</a>
</div>
<div class="col-12">
<form method="get" class=" mb-4">
<div class="input-group input-group-sm">
<button class="btn btn-sm btn-secondary rounded-start" type="submit">
{% trans "search" %}
</button>
<input type="text"
name="q"
class="form-control form-control-sm rounded-end"
value="{{ request.GET.q }}"
placeholder="{% trans 'Search bank accounts...' %}" />
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}"
class="btn btn-sm btn-outline-danger ms-1 rounded">
<i class="bi bi-x-lg"></i>
</a>
{% endif %}
</div>
</form>
</div>
{% if page_obj.object_list %}
<div class="table-responsive px-1 scrollbar mt-3">
<table class="table align-items-center table-flush">
<thead>
<tr class="bg-body-highlight">
<th class="border-top border-translucent ps-3">{% trans "Name" %}</th>
<th class="border-top border-translucent ps-3">{% trans "Account Number" %}</th>
<th class="border-top border-translucent text-end pe-3">{% trans "Type" %}</th>
<th class="border-top border-translucent text-end pe-3" scope="col">{% trans "Action" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Name" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Account Number" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Type" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
</tr>
</thead>
<tbody class="list">
{% for bank in bank_accounts %}
{% for bank in bank_accounts %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle ps-3">{{ bank.name }}</td>
<td class="align-middle ps-3">{{ bank.account_number }}</td>
<td class="align-middle product text-end pe-3 ">{{ bank.account_type|capfirst }}</td>
<td class="align-middle product text-end pe-3 ">
<a href="{% url 'bank_account_update' bank.pk %}"
<td class="align-middle product white-space-nowrap">
{{ bank.name }}
</td>
<td class="align-middle product white-space-nowrap">
{{ bank.account_number }}
</td>
<td class="align-middle product white-space-nowrap">
{{ bank.account_type|capfirst }}
</td>
<td class="align-middle product white-space-nowrap">
<a href="{% url 'bank_account_update' bank.pk %}"
class="btn btn-sm btn-phoenix-success">
{% trans "Update" %}
</a>
</td>
</td>
</tr>
{% empty %}
<tr>
<td colspan="6" class="text-center">{% trans "No Bank Accounts Found" %}</td>
<td colspan="6" class="text-center text-muted">{% trans "No Accounts Found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-center">
<div class="d-flex justify-content-between mt-3"><span class="d-none d-sm-inline-block" data-list-info="data-list-info">{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }}<span class="text-body-tertiary"> {{ _("Items of")}} </span>{{ page_obj.paginator.count }}</span>
<div class="d-flex">
{% if is_paginated %}
{% include 'partials/pagination.html' %}
{% endif %}
</div>
</div>
{% endif %}
</div>
{% endblock %}

View File

@ -10,129 +10,102 @@
</a>
{% endblock %}
{% block content %}
<div class="d-flex flex-column min-vh-100">
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
<a href="{% url 'bill_create' %}" class="btn btn-md btn-phoenix-primary">
<i class="fa fa-plus me-2"></i>
{% trans 'New Bill' %}</a>
</div>
<div class="d-flex flex-column flex-sm-grow-1 p-4">
<main class="d-grid gap-4 p-1">
<!-- Search Bar -->
<div class="row g-4">
<div class="col-12">
<div class="row-fluid p-2">
<form method="get">
<div class="row mt-4">
<div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Bills" %}</h3>
<a href="{% url 'bill_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans 'New Bill' %}</a>
</div>
<div class="col-12">
<form method="get" class=" mb-4">
<div class="input-group input-group-sm">
<button class="btn btn-sm btn-secondary rounded-start" type="submit">{% trans 'search' %}</button>
<input type="text" name="q" class="form-control form-control-sm rounded-end" value="{{ request.GET.q }}" placeholder="{% trans 'Search bills...' %}" />
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}" class="btn btn-sm btn-outline-danger ms-1 rounded"><i class="bi bi-x-lg"></i></a>
{% endif %}
</div>
</form>
</div>
</div>
</div>
<!-- Customer Table -->
<div id="accountsTable">
<div class="table-responsive">
<table class="table table-sm fs-9 mb-0">
<thead>
<tr class="bg-body-highlight">
<th class="border-top border-translucent ps-3">
{% trans 'Bill Number' %}
</th>
<th class="border-top border-translucent">
{% trans 'Bill Status' %}
</th>
<th class="border-top border-translucent text-end pe-3">
{% trans 'Vendor' %}
</th>
<th class="border-top border-translucent text-end pe-3" scope="col">Action</th>
</tr>
</thead>
<tbody class="list">
{% for bill in bills %}
<tr>
<td class="align-middle ps-3">{{ bill.bill_number }}</td>
<td class="align-middle">
{% if bill.is_draft %}
<span class="badge badge-phoenix badge-phoenix-warning">
{% elif bill.is_review %}
<span class="badge badge-phoenix badge-phoenix-info">
{% elif bill.is_approved %}
<span class="badge badge-phoenix badge-phoenix-success">
{% elif bill.is_paid %}
<span class="badge badge-phoenix badge-phoenix-success">
{% endif %}
{{ bill.bill_status }}
</span>
</td>
<td class="align-middle text-end py-3 pe-3">
{{bill.vendor.vendor_name}}
</td>
<td class="align-middle text-end py-3 pe-3">
<div class="btn-reveal-trigger position-static">
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2">
<a href="{% url 'bill_detail' bill.pk %}" class="dropdown-item text-success-dark">{% trans 'View' %}</a>
</div>
</div>
</td>
</tr>
{% empty %}
<tr>
<td colspan="5" class="text-center text-muted">
{% trans 'No bill found.' %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-between mt-3">
<span class="d-none d-sm-inline-block" data-list-info="data-list-info">{{ page_obj.start_index }} {{ _('to') }} {{ page_obj.end_index }}<span class="text-body-tertiary">{{ _('Items of') }}</span>{{ page_obj.paginator.count }}</span>
<div class="d-flex">
<nav aria-label="Page navigation">
<ul class="pagination mb-0">
{% if page_obj.has_previous %}
<li class="page-item py-0">
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" aria-label="Previous"><span aria-hidden="true"><span class="fas fa-chevron-left"></span></span></a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Previous"><span aria-hidden="true"><span class="fas fa-chevron-left"></span></span></a>
</li>
{% endif %}
{% for num in page_obj.paginator.page_range %}
{% if page_obj.number == num %}
<li class="page-item active">
<a class="page-link" href="?page={{ num }}">{{ num }}</a>
</li>
{% else %}
<li class="page-item">
<a class="page-link" href="?page={{ num }}">{{ num }}</a>
</li>
<button class="btn btn-sm btn-secondary rounded-start" type="submit">
{% trans "search" %}
</button>
<input type="text"
name="q"
class="form-control form-control-sm rounded-end"
value="{{ request.GET.q }}"
placeholder="{% trans 'Search bills...' %}" />
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}"
class="btn btn-sm btn-outline-danger ms-1 rounded">
<i class="bi bi-x-lg"></i>
</a>
{% endif %}
{% endfor %}
{% if page_obj.has_next %}
<li class="page-item">
<a class="page-link" href="?page={{ page_obj.next_page_number }}" aria-label="Next"><span aria-hidden="true"><span class="fas fa-chevron-right"></span></span></a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Next"><span aria-hidden="true"><span class="fas fa-chevron-right"></span></span></a>
</li>
{% endif %}
</ul>
</nav>
</div>
</div>
</div>
</form>
</div>
</main>
<div class="table-responsive px-1 scrollbar mt-3">
<table class="table align-items-center table-flush">
<thead>
<tr class="bg-body-highlight">
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Bill Number' %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Bill Status' %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Vendor' %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Action'%}</th>
</tr>
</thead>
<tbody class="list">
{% for bill in bills %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap">
{{ bill.bill_number }}
</td>
<td class="align-middle product white-space-nowrap">
{% if bill.is_draft %}
<span class="badge badge-phoenix badge-phoenix-warning">
{% elif bill.is_review %}
<span class="badge badge-phoenix badge-phoenix-info">
{% elif bill.is_approved %}
<span class="badge badge-phoenix badge-phoenix-success">
{% elif bill.is_paid %}
<span class="badge badge-phoenix badge-phoenix-success">
{% endif %}
{{ bill.bill_status }}
</span>
</td>
<td class="align-middle product white-space-nowrap">
{{bill.vendor.vendor_name}}
</td>
<td class="align-middle product white-space-nowrap">
<div class="btn-reveal-trigger position-static">
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2">
<a href="{% url 'bill_detail' bill.pk %}" class="dropdown-item text-success-dark">{% trans 'View' %}</a>
</div>
</div>
</tr>
{% empty %}
<tr>
<td colspan="5" class="text-center text-muted">
{% trans 'No bill found.' %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-between mt-3"><span class="d-none d-sm-inline-block" data-list-info="data-list-info">{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }}<span class="text-body-tertiary"> {{ _("Items of")}} </span>{{ page_obj.paginator.count }}</span>
<div class="d-flex">
{% if is_paginated %}
{% include 'partials/pagination.html' %}
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -6,7 +6,7 @@
{% endblock %}
{% block content %}
<!-- Delete Modal -->
<div class="modal fade" id="deleteModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content rounded">
@ -56,58 +56,82 @@
</p>
</div>
</div>
<div class="row">
<div class="table-responsive">
<table class="table table-sm fs-9 mb-0">
<tr>
<th class="has-text-centered">{{ _('JE Number') }}</th>
<th class="has-text-centered">{{ _('Date') }}</th>
<th class="has-text-centered">{{ _('Debit') }}</th>
<th class="has-text-centered">{{ _('Credit') }}</th>
<th class="has-text-centered">{{ _('Description') }}</th>
<div class="row mt-4">
<div class="table-responsive px-1 scrollbar mt-3">
<table class="table align-items-center table-flush">
<thead>
<tr class="bg-body-highlight">
<th class="sort white-space-nowrap align-middle" scope="col">{{ _('JE Number') }}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{{ _('Date') }}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{{ _('Debit') }}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{{ _('Credit') }}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{{ _('Description') }}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{{ _('Actions') }}</th>
</tr>
</thead>
<tbody class="list">
{% for tx in account.transactionmodel_set.all %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap">
{{ tx.journal_entry.je_number }}
</td>
<td class="align-middle product white-space-nowrap">
{{ tx.journal_entry.timestamp }}
</td>
<td class="align-middle product white-space-nowrap">
{% if tx.tx_type == 'debit' %}
<i class="fa-solid fa-circle-up"></i> {{ tx.amount }}
{% endif %}
</td>
<td class="align-middle product white-space-nowrap">
{% if tx.tx_type == 'credit' %}
<i class="fa-solid fa-circle-down"></i> {{ tx.amount }}
{% endif %}
</td>
<td class="align-middle product white-space-nowrap">
{{ tx.description }}
</td>
<td class="align-middle white-space-nowrap text-start">
<div class="btn-reveal-trigger position-static">
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2">
<a class="dropdown-item" href="{% url 'payment_details' tx.journal_entry.pk %}">{% trans 'view'|capfirst %}</a>
</div>
</div>
</td>
</tr>
{% endfor %}
<th class="has-text-centered">{{ _('Actions') }}</th>
</tr>
{% for tx in account.transactionmodel_set.all %}
<tr class="has-text-centered">
<td>{{ tx.journal_entry.je_number }}</td>
<td>{{ tx.journal_entry.timestamp }}</td>
<td class="text-success">
{% if tx.tx_type == 'debit' %}
<i class="fa-solid fa-circle-up"></i> {{ tx.amount }}
{% endif %}
</td>
<td class="text-danger">
{% if tx.tx_type == 'credit' %}
<i class="fa-solid fa-circle-down"></i> {{ tx.amount }}
{% endif %}
</td>
<td>{{ tx.description }}</td>
<td>
<div class="btn-reveal-trigger position-static">
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2">
<a class="dropdown-item" href="{% url 'payment_details' tx.journal_entry.pk %}">{% trans 'view'|capfirst %}</a>
</div>
</div>
</td>
</tr>
{% endfor %}
<tr class="has-text-weight-bold">
<td></td>
<td class="has-text-right"><span class="fw-bold fs-8">{{ _("Total") }}</span></td>
<td class="has-text-centered"><span class="fw-bold fs-8 text-success">{{ total_debits }} <span class="currency">{{ CURRENCY }}</span></span></td>
<td class="has-text-centered"><span class="fw-bold fs-8 text-danger">{{ total_credits }} <span class="currency">{{ CURRENCY }}</span></span></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap">
</td>
<td class="align-middle product white-space-nowrap">
<span class="fw-bold fs-8">{{ _("Total") }}</span>
</td>
<td class="align-middle product white-space-nowrap">
<span class="fw-bold fs-8 text-success">{{ total_debits }} <span class="currency">{{ CURRENCY }}</span></span>
</td>
<td class="align-middle product white-space-nowrap">
<span class="fw-bold fs-8 text-danger">{{ total_credits }} <span class="currency">{{ CURRENCY }}</span></span>
</td>
<td class="align-middle product white-space-nowrap">
</td>
<td class="align-middle white-space-nowrap text-start">
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="mt-3 d-flex">
<a class="btn btn-sm btn-phoenix-primary me-1" href="{% url 'account_update' account.pk %}">
<!-- <i class="bi bi-pencil-square"></i> -->
@ -122,6 +146,8 @@
<i class="fa-regular fa-circle-left"></i> {% trans 'Back to List' %}
</a>
</div>
</div>
</div>
<!--test-->
{% endblock %}

View File

@ -8,16 +8,12 @@
</a>
{% endblock %}
{% block content %}
<!-- Search Bar -->
<!--test-->
<div class="row mt-4">
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
<a href="{% url 'account_create' %}" class="btn btn-md btn-phoenix-primary">
<i class="fa fa-plus me-2"></i>
{% trans 'New Account' %}</a>
<div class="d-flex justify-content-between mb-2">
<h3 class=""><i class="fa-solid fa-book"></i> {% trans "Accounts" %}</h3>
<a href="{% url 'account_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans 'New Account' %}</a>
</div>
<h3 class="mb-3">
<i class="fa-solid fa-book"></i> {% trans "Accounts" %}</h3>
<div class="col-12">
<form method="get" class=" mb-4">
<div class="input-group input-group-sm">
@ -38,25 +34,24 @@
</div>
</form>
</div>
</div>
{% if page_obj.object_list %}
{% if page_obj.object_list %}
<div class="table-responsive px-1 scrollbar mt-3">
<table class="table align-items-center table-flush">
<thead>
<tr class="bg-body-highlight">
<th class="border-top border-translucent">{% trans "Type" %}</th>
<th class="border-top border-translucent ps-3">{% trans "Account Name" %}</th>
<th class="border-top border-translucent">{% trans "Code" %}</th>
<th class="border-top border-translucent text-end pe-3">{% trans "Balance Type" %}</th>
<th class="border-top border-translucent text-end pe-3">{% trans "Active" %}</th>
<th class="border-top border-translucent text-end align-middle pe-0 ps-4" scope="col"></th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Type" %}</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 "Code" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Balance Type" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Active" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col"></th>
</tr>
</thead>
<tbody class="list">
{% for account in accounts %}
{% for account in accounts %}
<div class="modal fade" id="deleteModal"
data-bs-backdrop="static"
@ -91,26 +86,33 @@
</div>
</div>
</div>
<tr>
<td class="align-middle ps-3 fw-lighter">{{ account.role_bs|upper }}</td>
<td class="align-middle ps-3">{{ account.name }}</td>
<td class="align-middle">{{ account.code }}</td>
<td class="align-middle text-end py-3 pe-3">
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap">
{{ account.role_bs|upper }}
</td>
<td class="align-middle product white-space-nowrap">
{{ account.name }}
</td>
<td class="align-middle product white-space-nowrap">
{{ account.code }}
</td>
<td class="align-middle product white-space-nowrap">
{% if account.balance_type == 'debit' %}
<div class="badge badge-phoenix fs-10 badge-phoenix-success"><span class="fw-bold"><i class="fa-solid fa-circle-up"></i> {{ _("Debit") }}</span></div>
{% else %}
<div class="badge badge-phoenix fs-10 badge-phoenix-danger"><span class="fw-bold"><i class="fa-solid fa-circle-down"></i> {{ _("Credit") }}</span></div>
{% endif %}
</td>
<td class="align-middle text-end py-3 pe-3">
{% if account.active %}
<td class="align-middle product white-space-nowrap">
{% if account.active %}
<span class="fw-bold text-success fas fa-check-circle"></span>
{% else %}
<span class="fw-bold text-danger far fa-times-circle"></span>
{% endif %}
</td>
<td>
<td class="align-middle white-space-nowrap text-start">
<div class="btn-reveal-trigger position-static">
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2"><a href="{% url 'account_detail' account.uuid %}" class="dropdown-item text-success-dark">
@ -118,21 +120,17 @@
</a>
<div class="dropdown-divider"></div><button class="dropdown-item text-danger" data-bs-toggle="modal" data-bs-target="#deleteModal">{% trans "Delete" %}</button>
</div>
</div>
</div>
</td>
</tr>
{% empty %}
<tr>
<td colspan="5" class="text-center text-muted">
{% trans "No account found." %}
</td>
<td colspan="6" class="text-center text-muted">{% trans "No Accounts Found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-between mt-3"><span class="d-none d-sm-inline-block" data-list-info="data-list-info">{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }}<span class="text-body-tertiary"> {{ _("Items of")}} </span>{{ page_obj.paginator.count }}</span>
<div class="d-flex">
@ -142,7 +140,11 @@
</div>
</div>
{% endif %}
{% endblock %}
</div>
<!--test-->
{% endblock %}

View File

@ -31,33 +31,20 @@
</div>
</div>
<!--test-->
<div class="row mt-4">
<div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Journal Entries" %}</h3>
<div class="d-flex gap-2">
{% comment %} {% if ledger.is_posted %}
{% if ledger.is_locked %}
<a class="btn btn-sm btn-phoenix-danger" href="{% url 'unlock_all_journals' ledger.entity_slug ledger.pk %} ">{% trans 'UnLock All' %}</a>
{% else %}
<a class="btn btn-sm btn-phoenix-danger" href="{% url 'lock_all_journals' ledger.entity_slug ledger.pk %} ">{% trans 'Lock All' %}</a>
{% endif %}
{% endif %}
{% if not ledger.is_locked %}
{% if ledger.is_posted %}
<a class="btn btn-sm btn-phoenix-success" href="{% url 'unpost_all_journals' ledger.entity_slug ledger.pk %} ">{% trans 'UnPost All' %}</a>
{% else %}
<a class="btn btn-sm btn-phoenix-success" href="{% url 'post_all_journals' ledger.entity_slug ledger.pk %} ">{% trans 'Post All' %}</a>
{% endif %}
{% endif %} {% endcomment %}
<a href="{% url 'journalentry_create' ledger.pk %}" class="btn btn-sm btn-phoenix-primary">{% trans "Add Journal Entry" %}</a>
</div>
</div>
</div>
<div class="table-responsive px-1 scrollbar">
<table class="table fs-9 mb-0 border-top border-translucent">
<div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Journal Entries" %}</h3>
<a href="{% url 'journalentry_create' ledger.pk %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans "Add Journal Entry" %}</a>
</div>
<div class="table-responsive px-1 scrollbar">
<table class="table align-items-center table-flush">
<thead>
<tr>
<tr class="bg-body-highlight">
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Document Number" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Timestamp" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Activity" %}</th>
@ -126,8 +113,10 @@
</tbody>
</table>
</div>
<div class="d-flex justify-content-center">
</div>
</div>
<!--test-->
{% endblock %}

View File

@ -11,9 +11,9 @@
<h3 class="mb-3 mt-5"><i class="fa-solid fa-right-left"></i> {% trans "Transactions" %}</h3>
<div class="table-responsive px-1 scrollbar">
<table class="table fs-9 mb-0 border-top border-translucent">
<table class="table align-items-center table-flush">
<thead>
<tr>
<tr class="bg-body-highlight">
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "#" %}</th>
<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 Name" %}</th>

View File

@ -4,18 +4,41 @@
{% block title %}{{ _("Ledger") }}{% endblock title %}
{% block content %}
<div class="row mt-4">
<div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Ledger" %}</h3>
<h3 class="">{% trans "Ledger" %}</h3>
<a href="{% url 'ledger_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans 'Create Ledger' %}</a>
</div>
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
<a href="{% url 'ledger_create' %}" class="btn btn-md btn-phoenix-primary">
<i class="fa fa-plus me-2"></i>
{% trans 'Create Ledger' %}</a>
<div class="col-12">
<form method="get" class=" mb-4">
<div class="input-group input-group-sm">
<button class="btn btn-sm btn-secondary rounded-start" type="submit">
{% trans "search" %}
</button>
<input type="text"
name="q"
class="form-control form-control-sm rounded-end"
value="{{ request.GET.q }}"
placeholder="{% trans 'Search ledgers...' %}" />
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}"
class="btn btn-sm btn-outline-danger ms-1 rounded">
<i class="bi bi-x-lg"></i>
</a>
{% endif %}
</div>
</form>
</div>
<div class="table-responsive px-1 scrollbar mt-3">
<table class="table fs-9 mb-0 border-top border-translucent">
<table class="table align-items-center table-flush">
<thead>
<tr class="bg-body-highlight">
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Ledger Name" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Journal Entries" %}</th>
@ -25,11 +48,13 @@
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
</tr>
</thead>
<tbody class="list">
{% for ledger in ledgers %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap">
{% if ledger.invoicemodel %}
{% if ledger.invoicemodel %}
<a href="{% url 'invoice_detail' ledger.invoicemodel.pk %}">{{ ledger.get_wrapped_model_instance }}</a>
{% elif ledger.billmodel %}
<a href="{% url 'bill_detail' ledger.billmodel.pk %}">{{ ledger.get_wrapped_model_instance }}</a>
@ -38,7 +63,7 @@
{% endif %}
</td>
<td class="align-middle product white-space-nowrap">
<a class="btn btn-sm btn-primary"
<a class="btn btn-sm btn-primary"
href="{% url 'journalentry_list' ledger.pk %}">
<i class="fa-solid fa-right-left"></i>
<span>
@ -48,21 +73,21 @@
</a>
</td>
<td class="align-middle product white-space-nowrap">
{{ ledger.created |date }}
{{ ledger.created |date }}
</td>
<td class="align-middle product white-space-nowrap">
{% if ledger.is_posted %}
{% if ledger.is_posted %}
<i class="fa-solid fa-square-check text-success"></i>
{% else %}
<i class="fa-solid fa-circle-xmark text-danger"></i>
{% endif %}
</td>
<td class="align-middle product white-space-nowrap">
{% if ledger.is_locked %}
{% if ledger.is_locked %}
<i class="fa-solid fa-lock text-success"></i>
{% else %}
<i class="fa-solid fa-unlock text-danger"></i>
{% endif %}
{% endif %}
</td>
<td class="align-middle white-space-nowrap text-start">
<div class="btn-reveal-trigger position-static">
@ -108,19 +133,30 @@
class="dropdown-item has-text-danger has-text-weight-bold">{% trans 'Delete' %}</a>
{% endif %}
</div>
</div>
</div>
</td>
</tr>
{% empty %}
<tr>
<td colspan="6" class="text-center">{% trans "No Bank Accounts Found" %}</td>
<td colspan="6" class="text-center">{% trans "No Entries found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-center">
<div class="d-flex justify-content-between mt-3"><span class="d-none d-sm-inline-block" data-list-info="data-list-info">{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }}<span class="text-body-tertiary"> {{ _("Items of")}} </span>{{ page_obj.paginator.count }}</span>
<div class="d-flex">
{% if is_paginated %}
{% include 'partials/pagination.html' %}
{% endif %}
</div>
</div>
</div>
{% endblock %}

View File

@ -5,125 +5,143 @@
{% block vendors %}<a class="nav-link active">{{ _("Vendors")|capfirst }}</a>{% endblock %}
{% block content %}
<section class="pt-5 pb-9">
<div class="row">
<h2 class="mb-4">{{ _("Vendors")|capfirst }}</h2>
<div class="row g-3 justify-content-between mb-4">
<div class="col-auto">
<div class="d-md-flex justify-content-between">
<div>
<a href="{% url 'vendor_create' %}" class="btn btn-md btn-phoenix-primary"><span class="fas fa-plus me-2"></span>{{ _("Add Vendor") }}</a>
</div>
</div>
<div class="row mt-4">
<div class="d-flex justify-content-between mb-2">
<h3 class="">{{ _("Vendors")|capfirst }}</h2>
<a href="{% url 'vendor_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{{ _("Add Vendor") }}</a>
</div>
<div class="col-auto">
<div class="d-flex">
<div class="search-box me-2">
<form method="get" class="d-inline-block position-relative">
<input name="q" class="form-control search-input search" type="search" placeholder="{{ _('Enter vendor name') }}" aria-label="Search" value="{{ request.GET.q }}"/>
<span class="fas fa-search search-box-icon"></span>
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}" class="btn btn-outline-danger ms-1">
<i class="bi bi-x-lg"></i>
</a>
{% endif %}
</form>
</div>
</div>
</div>
</div>
<div class="table-responsive scrollbar mx-n1 px-1">
<table class="table table-hover fs-9 mb-0">
<thead>
<tr>
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" data-sort="name" style="width:25%;">{{ _("Name")|capfirst }}</th>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="email" style="width:15%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-success-subtle rounded me-2"><span class="text-success-dark" data-feather="mail"></span></div><span>{{ _("email")|capfirst }}</span>
</div>
</th>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="phone" style="width:15%; min-width: 180px;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-primary-subtle rounded me-2"><span class="text-primary-dark" data-feather="phone"></span></div><span>{{ _("Phone") }}</span>
</div>
</th>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="contact" style="width:15%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-info-subtle rounded me-2"><span class="text-info-dark" data-feather="user"></span></div><span>{{ _("Contact name")|capfirst }}</span>
</div>
</th>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="company" style="width:15%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-warning-subtle rounded me-2"><span class="text-warning-dark" data-feather="grid"></span></div><span>{{ _("Address")|capfirst }}</span>
</div>
</th>
<th class="sort align-middle ps-4 pe-5 text-uppercase" scope="col" data-sort="date" style="width:15%;">
{{ _("Create date") }}</th>
<th class="sort text-end align-middle pe-0 ps-4" scope="col"></th>
</tr>
</thead>
<tbody class="list" id="leal-tables-body">
{% for vendor in vendors %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="name align-middle white-space-nowrap ps-0">
<div class="d-flex align-items-center">
{% if vendor.logo %}
<div class="avatar avatar-xl me-3"><img class="rounded-circle" src="{{ vendor.logo.url }}" alt="" />
{% else %}
<div class="avatar avatar-xl me-3"><img class="rounded-circle" src="{% static 'images/icons/picture.svg' %}" alt="" />
{% endif %}
</div>
<div><a class="fs-8 fw-bold" href="{% url 'vendor_detail' vendor.slug %}">{{ vendor.arabic_name }}</a>
<div class="d-flex align-items-center">
<p class="mb-0 text-body-highlight fw-semibold fs-9 me-2">{{ vendor.name}}</p><!--<span class="badge badge-phoenix badge-phoenix-primary">{{ vendor.vendor_model.uuid }}</span>-->
</div>
</div>
</div>
</td>
<td class="email align-middle white-space-nowrap fw-semibold ps-4 border-end border-translucent"><a class="text-body-highlight" href="">{{ vendor.email }}</a></td>
<td class="phone align-middle white-space-nowrap fw-semibold ps-4 border-end border-translucent"><a class="text-body-highlight" href="tel:{{ vendor.phone }}">{{ vendor.phone_number }}</a></td>
<td class="contact align-middle white-space-nowrap ps-4 border-end border-translucent fw-semibold text-body-highlight">{{ vendor.contact_person }}</td>
<td class="company align-middle white-space-nowrap text-body-tertiary text-opacity-85 ps-4 border-end border-translucent fw-semibold text-body-highlight">
{{ vendor.address }}</td>
<td class="date align-middle white-space-nowrap text-body-tertiary text-opacity-85 ps-4 text-body-tertiary">{{ vendor.created_at|date }}</td>
<td class="align-middle white-space-nowrap text-end pe-0 ps-4">
<div class="btn-reveal-trigger position-static">
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2">
<a href="{% url 'vendor_update' vendor.slug %}" class="dropdown-item text-success-dark">
{% trans "Edit" %}
</a>
<div class="dropdown-divider"></div>
<button class="delete-btn dropdown-item text-danger"
data-url="{% url 'vendor_delete' vendor.slug %}"
data-message="{{ _("Are you sure you want to delete this vendor")}}?"
data-bs-toggle="modal" data-bs-target="#deleteModal">
{{ _("Delete") }}
<div class="col-12">
<form method="get" class=" mb-4">
<div class="input-group input-group-sm">
<button class="btn btn-sm btn-secondary rounded-start" type="submit">
{% trans "search" %}
</button>
</div>
<input type="text"
name="q"
class="form-control form-control-sm rounded-end"
value="{{ request.GET.q }}"
placeholder="{{ _('Enter vendor name') }}" />
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}"
class="btn btn-sm btn-outline-danger ms-1 rounded">
<i class="bi bi-x-lg"></i>
</a>
{% endif %}
</div>
</td>
</tr>
{% endfor %}
</tbody>
</form>
</div>
{% if page_obj.object_list %}
<div class="table-responsive px-1 scrollbar mt-3">
<table class= "table align-items-center table-flush table-hover">
<thead>
<tr class="bg-body-highlight">
<th class="sort white-space-nowrap align-middle" scope="col" data-sort="name" style="width:25%;">{{ _("Name")|capfirst }}</th>
<th class="sort white-space-nowrap align-middle" scope="col" data-sort="email" style="width:15%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-success-subtle rounded me-2"><span class="text-success-dark" data-feather="mail"></span></div><span>{{ _("email")|capfirst }}</span>
</div>
</th>
<th class="sort white-space-nowrap align-middle" scope="col" data-sort="phone" style="width:15%; min-width: 180px;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-primary-subtle rounded me-2"><span class="text-primary-dark" data-feather="phone"></span></div><span>{{ _("Phone") }}</span>
</div>
</th>
<th class="sort white-space-nowrap align-middle" scope="col" data-sort="contact" style="width:15%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-info-subtle rounded me-2"><span class="text-info-dark" data-feather="user"></span></div><span>{{ _("Contact name")|capfirst }}</span>
</div>
</th>
<th class="sort white-space-nowrap align-middle" scope="col" data-sort="company" style="width:15%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-warning-subtle rounded me-2"><span class="text-warning-dark" data-feather="grid"></span></div><span>{{ _("Address")|capfirst }}</span>
</div>
</th>
<th class="sort white-space-nowrap align-middle" scope="col" data-sort="date" style="width:15%;">{{ _("Create date") }}</th>
<th class="sort white-space-nowrap align-middle" scope="col"></th>
</tr>
</thead>
<tbody class="list">
{% for vendor in vendors %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap">
<div class="d-flex align-items-center">
{% if vendor.logo %}
<div class="avatar avatar-xl me-3"><img class="rounded-circle" src="{{ vendor.logo.url }}" alt="" />
{% else %}
<div class="avatar avatar-xl me-3"><img class="rounded-circle" src="{% static 'images/icons/picture.svg' %}" alt="" />
{% endif %}
</div>
<div><a class="fs-8 fw-bold" href="{% url 'vendor_detail' vendor.slug %}">{{ vendor.arabic_name }}</a>
<div class="d-flex align-items-center">
<p class="mb-0 text-body-highlight fw-semibold fs-9 me-2">{{ vendor.name}}</p><!--<span class="badge badge-phoenix badge-phoenix-primary">{{ vendor.vendor_model.uuid }}</span>-->
</div>
</div>
</div>
</td>
<td class="align-middle product white-space-nowrap">
<a class="text-body-highlight" href="">{{ vendor.email }}</a>
</td>
<td class="align-middle product white-space-nowrap">
<a class="text-body-highlight" href="tel:{{ vendor.phone }}">{{ vendor.phone_number }}</a>
</td>
<td class="align-middle product white-space-nowrap">
{{ vendor.contact_person }}
</td>
<td class="align-middle product white-space-nowrap">
{{ vendor.address }}
</td>
<td class="align-middle product white-space-nowrap">
{{ vendor.created_at|date }}
</td>
<td class="align-middle product white-space-nowrap">
<div class="btn-reveal-trigger position-static">
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2">
<a href="{% url 'vendor_update' vendor.slug %}" class="dropdown-item text-success-dark">
{% trans "Edit" %}
</a>
<div class="dropdown-divider"></div>
<button class="delete-btn dropdown-item text-danger"
data-url="{% url 'vendor_delete' vendor.slug %}"
data-message="{{ _("Are you sure you want to delete this vendor")}}?"
data-bs-toggle="modal" data-bs-target="#deleteModal">
{{ _("Delete") }}
</button>
</div>
</div>
</td>
</tr>
{% empty %}
<tr>
<td colspan="6" class="text-center text-muted">{% trans "No Accounts Found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-between mt-3"><span class="d-none d-sm-inline-block" data-list-info="data-list-info">{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }}<span class="text-body-tertiary"> {{ _("Items of")}} </span>{{ page_obj.paginator.count }}</span>
<div class="d-flex">
{% if is_paginated %}
{% include 'partials/pagination.html' %}
{% endif %}
</div>
</div>
{% endif %}
</table>
</div>
<div class="row align-items-center justify-content-end py-4 pe-0 fs-9">
<!-- Optional: Pagination -->
{% if is_paginated %}
{% include 'partials/pagination.html' %}
{% endif %}
</div>
</div>
</section>
{% include 'modal/delete_modal.html' %}
{% endblock %}