email modifiied
This commit is contained in:
parent
b9f6018e9a
commit
150eea38df
@ -6762,27 +6762,37 @@ def send_lead_email(request, dealer_slug, slug, email_pk=None):
|
|||||||
# return response
|
# return response
|
||||||
# return redirect("lead_list", dealer_slug=dealer_slug)
|
# return redirect("lead_list", dealer_slug=dealer_slug)
|
||||||
msg = f"""
|
msg = f"""
|
||||||
السلام عليكم
|
السلام عليكم {lead.full_name},
|
||||||
Dear {lead.full_name},
|
|
||||||
|
|
||||||
أود أن أشارككم تقدير المشروع الذي ناقشناه. يرجى العثور على الوثيقة التفصيلية للمقترح المرفقة.
|
شكراً لزيارتك لـ {lead.dealer.name}! لقد كان من دواعي سرورنا مساعدتك اليوم.
|
||||||
|
|
||||||
I hope this email finds you well. I wanted to share with you the estimate for the project we discussed. Please find the detailed estimate document attached.
|
لقد أنشأنا ملفاً شخصياً لك في نظامنا لتتبع تفضيلاتك والسيارات التي تهتم بها. سنتواصل معك قريباً للمتابعة والإجابة على أي أسئلة أخرى قد تكون لديك.
|
||||||
|
|
||||||
يرجى مراجعة المقترح وإعلامي إذا كانت لديك أي أسئلة أو مخاوف. إذا كانت كل شيء يبدو جيدًا، يمكننا المضي قدمًا في المشروع.
|
في هذه الأثناء، لا تتردد في الاتصال بنا مباشرة على {lead.dealer.phone_number} أو زيارتنا مرة أخرى في أي وقت يناسبك.
|
||||||
|
|
||||||
Please review the estimate and let me know if you have any questions or concerns. If everything looks good, we can proceed with the project.
|
نتطلع إلى مساعدتك في العثور على سيارتك القادمة!
|
||||||
|
|
||||||
شكراً لاهتمامكم بهذا الأمر.
|
تحياتي،
|
||||||
Thank you for your attention to this matter.
|
{lead.dealer.arabic_name}
|
||||||
|
{lead.dealer.address}
|
||||||
|
{lead.dealer.phone_number}
|
||||||
|
-----
|
||||||
|
Dear {lead.full_name},
|
||||||
|
|
||||||
تحياتي,
|
Thank you for visiting {lead.dealer.name}! It was a pleasure to assist you today.
|
||||||
Best regards,
|
|
||||||
[Your Name]
|
We've created a profile for you in our system to keep track of your preferences and the vehicles you're interested in. We'll be in touch shortly to follow up and answer any further questions you may have.
|
||||||
[Your Position]
|
|
||||||
[Your Company]
|
In the meantime, feel free to contact us directly at {lead.dealer.phone_number} or visit us again at your convenience.
|
||||||
[Your Contact Information]
|
|
||||||
"""
|
We look forward to helping you find your next car!
|
||||||
|
|
||||||
|
Best regards,
|
||||||
|
{lead.dealer.name}
|
||||||
|
{lead.dealer.address}
|
||||||
|
{lead.dealer.phone_number}
|
||||||
|
|
||||||
|
"""
|
||||||
subject = ""
|
subject = ""
|
||||||
if email_pk:
|
if email_pk:
|
||||||
email = get_object_or_404(models.Email, pk=email_pk)
|
email = get_object_or_404(models.Email, pk=email_pk)
|
||||||
@ -7034,17 +7044,11 @@ class OpportunityListView(LoginRequiredMixin, PermissionRequiredMixin, ListView)
|
|||||||
staff = self.request.staff
|
staff = self.request.staff
|
||||||
queryset = models.Opportunity.objects.filter(dealer=dealer, lead__staff=staff)
|
queryset = models.Opportunity.objects.filter(dealer=dealer, lead__staff=staff)
|
||||||
|
|
||||||
# Search filter
|
|
||||||
search = self.request.GET.get("q")
|
|
||||||
if search:
|
|
||||||
queryset = queryset.filter(
|
|
||||||
Q(customer__first_name__icontains=search)
|
|
||||||
| Q(customer__last_name__icontains=search)
|
|
||||||
| Q(customer__email__icontains=search)
|
|
||||||
)
|
|
||||||
|
|
||||||
# Stage filter
|
# Stage filter
|
||||||
stage = self.request.GET.get("stage")
|
stage = self.request.GET.get("stage")
|
||||||
|
print(stage)
|
||||||
if stage:
|
if stage:
|
||||||
queryset = queryset.filter(stage=stage)
|
queryset = queryset.filter(stage=stage)
|
||||||
|
|
||||||
@ -7055,7 +7059,16 @@ class OpportunityListView(LoginRequiredMixin, PermissionRequiredMixin, ListView)
|
|||||||
elif sort == "highest":
|
elif sort == "highest":
|
||||||
queryset = queryset.order_by("-expected_revenue")
|
queryset = queryset.order_by("-expected_revenue")
|
||||||
elif sort == "closing":
|
elif sort == "closing":
|
||||||
queryset = queryset.order_by("closing_date")
|
queryset = queryset.order_by("expected_close_date")
|
||||||
|
|
||||||
|
# Search filter
|
||||||
|
search = self.request.GET.get("q")
|
||||||
|
if search:
|
||||||
|
queryset = queryset.filter(
|
||||||
|
Q(customer__first_name__icontains=search)
|
||||||
|
| Q(customer__last_name__icontains=search)
|
||||||
|
| Q(customer__email__icontains=search)
|
||||||
|
)
|
||||||
|
|
||||||
return queryset
|
return queryset
|
||||||
|
|
||||||
@ -7799,27 +7812,44 @@ def send_email_view(request, dealer_slug, pk):
|
|||||||
)
|
)
|
||||||
|
|
||||||
msg = f"""
|
msg = f"""
|
||||||
السلام عليكم
|
السلام عليكم،
|
||||||
Dear {estimate.customer.customer_name},
|
|
||||||
|
|
||||||
أود أن أشارككم عرض السعر.
|
عزيزي {estimate.customer.customer_name}،
|
||||||
|
|
||||||
I wanted to share with you the quotation.
|
يسعدني أن أشارككم عرض السعر الذي طلبتموه. يرجى الاطلاع على التفاصيل الكاملة والأسعار من خلال الرابط أدناه.
|
||||||
|
|
||||||
يرجى مراجعة عرض السعر وإعلامي إذا كانت لديك أي استفسارات أو ملاحظات. إذا كان كل شيء على ما يرام، يمكننا المتابعة في الإجراءات.
|
حرصنا على أن يكون عرضنا مناسباً وشفافاً. إذا كانت لديكم أي استفسارات أو ملاحظات، فلا تترددوا في التواصل معنا.
|
||||||
|
|
||||||
Please review the quotation and let me know if you have any questions or concerns. If everything looks good, we can proceed with the process.
|
رابط عرض السعر:
|
||||||
|
{link}
|
||||||
|
|
||||||
رابط عرض السعر:
|
نأمل أن ينال العرض إعجابكم ونتطلع إلى بدء العمل قريباً!
|
||||||
{link}
|
|
||||||
|
|
||||||
|
تحياتي،
|
||||||
|
|
||||||
تحياتي,
|
{dealer.get_local_name}
|
||||||
Best regards,
|
{dealer.phone_number}
|
||||||
{dealer.get_local_name}
|
Haikal | هيكل
|
||||||
{dealer.phone_number}
|
-----
|
||||||
هيكل | Haikal
|
Dear {estimate.customer.customer_name},
|
||||||
"""
|
|
||||||
|
I hope this email finds you well.
|
||||||
|
|
||||||
|
Following up on our conversation, I'm excited to share the quotation for your review. Please find the detailed pricing and information by clicking on the link below.
|
||||||
|
|
||||||
|
We've done our best to provide you with a fair and competitive offer. If you have any questions or would like to discuss it further, please don't hesitate to reach out.
|
||||||
|
|
||||||
|
Quotation Link:
|
||||||
|
{link}
|
||||||
|
|
||||||
|
We look forward to hearing from you and hopefully moving forward with your project!
|
||||||
|
|
||||||
|
Best regards,
|
||||||
|
|
||||||
|
{dealer.get_local_name}
|
||||||
|
{dealer.phone_number}
|
||||||
|
Haikal
|
||||||
|
"""
|
||||||
# subject = _("Quotation")
|
# subject = _("Quotation")
|
||||||
|
|
||||||
send_email(
|
send_email(
|
||||||
@ -10687,13 +10717,69 @@ def purchase_report_csv_export(request,dealer_slug):
|
|||||||
])
|
])
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
# @login_required
|
||||||
|
# def car_sale_report_view(request,dealer_slug):
|
||||||
|
# dealer = get_object_or_404(models.Dealer, slug=dealer_slug)
|
||||||
|
# cars_sold = models.Car.objects.filter(dealer=dealer,status='sold')
|
||||||
|
# current_time = timezone.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||||
|
# context={'cars_sold':cars_sold,'current_time':current_time }
|
||||||
|
# return render(request,'ledger/reports/car_sale_report.html',context)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def car_sale_report_view(request,dealer_slug):
|
def car_sale_report_view(request, dealer_slug):
|
||||||
dealer = get_object_or_404(models.Dealer, slug=dealer_slug)
|
dealer = get_object_or_404(models.Dealer, slug=dealer_slug)
|
||||||
cars_sold = models.Car.objects.filter(dealer=dealer,status='sold')
|
cars_sold = models.Car.objects.filter(dealer=dealer, status='sold')
|
||||||
current_time = timezone.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
||||||
context={'cars_sold':cars_sold,'current_time':current_time }
|
# Get filter parameters from the request
|
||||||
return render(request,'ledger/reports/car_sale_report.html',context)
|
selected_make = request.GET.get('make')
|
||||||
|
selected_model = request.GET.get('model')
|
||||||
|
selected_serie = request.GET.get('serie')
|
||||||
|
selected_year = request.GET.get('year')
|
||||||
|
|
||||||
|
# Apply filters to the queryset
|
||||||
|
if selected_make:
|
||||||
|
cars_sold = cars_sold.filter(id_car_make__name=selected_make)
|
||||||
|
if selected_model:
|
||||||
|
cars_sold = cars_sold.filter(id_car_model__name=selected_model)
|
||||||
|
if selected_serie:
|
||||||
|
cars_sold = cars_sold.filter(id_car_serie__name=selected_serie)
|
||||||
|
if selected_year:
|
||||||
|
cars_sold = cars_sold.filter(year=selected_year)
|
||||||
|
|
||||||
|
# Get distinct values for filter dropdowns
|
||||||
|
makes = models.Car.objects.filter(dealer=dealer, status='sold').values_list('id_car_make__name', flat=True).distinct()
|
||||||
|
models_qs = models.Car.objects.filter(dealer=dealer, status='sold').values_list('id_car_model__name', flat=True).distinct()
|
||||||
|
series = models.Car.objects.filter(dealer=dealer, status='sold').values_list('id_car_serie__name', flat=True).distinct()
|
||||||
|
years = models.Car.objects.filter(dealer=dealer, status='sold').values_list('year', flat=True).distinct().order_by('-year')
|
||||||
|
|
||||||
|
# # Calculate summary data for the filtered results
|
||||||
|
|
||||||
|
total_revenue = cars_sold.aggregate(total_revenue=Sum('finances__marked_price'))['total_revenue'] or 0
|
||||||
|
# total_vat = cars_sold.aggregate(total_vat=Sum('finances__vat_amount'))['total_vat'] or 0
|
||||||
|
total_discount = cars_sold.aggregate(total_discount=Sum('finances__discount_amount'))['total_discount'] or 0
|
||||||
|
|
||||||
|
current_time = timezone.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||||
|
|
||||||
|
context = {
|
||||||
|
'cars_sold': cars_sold,
|
||||||
|
'current_time': current_time,
|
||||||
|
'dealer': dealer,
|
||||||
|
'total_revenue': total_revenue,
|
||||||
|
# 'total_vat': total_vat,
|
||||||
|
'total_discount': total_discount,
|
||||||
|
'makes': makes,
|
||||||
|
'models': models_qs,
|
||||||
|
'series': series,
|
||||||
|
'years': years,
|
||||||
|
'selected_make': selected_make,
|
||||||
|
'selected_model': selected_model,
|
||||||
|
'selected_serie': selected_serie,
|
||||||
|
'selected_year': selected_year,
|
||||||
|
}
|
||||||
|
|
||||||
|
return render(request, 'ledger/reports/car_sale_report.html', context)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def car_sale_report_csv_export(request,dealer_slug):
|
def car_sale_report_csv_export(request,dealer_slug):
|
||||||
@ -10737,10 +10823,10 @@ def car_sale_report_csv_export(request,dealer_slug):
|
|||||||
car.year,
|
car.year,
|
||||||
car.id_car_serie.name,
|
car.id_car_serie.name,
|
||||||
car.id_car_trim.name,
|
car.id_car_trim.name,
|
||||||
car.mileage,
|
car.mileage if car.mileage else '0',
|
||||||
car.stock_type,
|
car.stock_type,
|
||||||
car.created_at.strftime("%Y-%m-%d %H:%M:%S") if car.created_at else '',
|
car.created_at.strftime("%Y-%m-%d %H:%M:%S") if car.created_at else '',
|
||||||
car.sold_date.strftime("%Y-%m-%d %H:%M:%S") if car.created_at else '',
|
car.sold_date.strftime("%Y-%m-%d %H:%M:%S") if car.sold_date else '',
|
||||||
car.finances.cost_price,
|
car.finances.cost_price,
|
||||||
car.finances.marked_price,
|
car.finances.marked_price,
|
||||||
car.finances.discount_amount,
|
car.finances.discount_amount,
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans 'Admin Management' %} {% endblock %}
|
{% trans 'Admin Management' %} {% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<h3 class="my-4">{% trans "Admin Management" %}<li class="fa fa-user-cog ms-2 text-primary"></li></h3>
|
||||||
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-4 g-4 mt-10">
|
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-4 g-4 mt-10">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<a href="{% url 'user_management' request.dealer.slug %}">
|
<a href="{% url 'user_management' request.dealer.slug %}">
|
||||||
|
|||||||
@ -84,7 +84,7 @@
|
|||||||
{% include "plans/expiration_messages.html" %}
|
{% include "plans/expiration_messages.html" %}
|
||||||
{% block period_navigation %}
|
{% block period_navigation %}
|
||||||
{% endblock period_navigation %}
|
{% endblock period_navigation %}
|
||||||
<div id="main_content" class="fade-me-in" hx-boost="true" hx-target="#main_content" hx-select="#main_content" hx-swap="outerHTML transition:true" hx-select-oob="#toast-container" hx-history-elt>
|
<div id="main_content" class="fade-me-in" hx-boost="false" hx-target="#main_content" hx-select="#main_content" hx-swap="outerHTML transition:true" hx-select-oob="#toast-container" hx-history-elt>
|
||||||
<div id="spinner" class="htmx-indicator spinner-bg">
|
<div id="spinner" class="htmx-indicator spinner-bg">
|
||||||
<img src="{% static 'spinner.svg' %}" width="100" height="100" alt="">
|
<img src="{% static 'spinner.svg' %}" width="100" height="100" alt="">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -30,19 +30,11 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination">
|
{% if page_obj.paginator.num_pages > 1 %}
|
||||||
<span class="step-links">
|
<div class="d-flex justify-content-end mt-3">
|
||||||
{% if notifications.has_previous %}
|
<div class="d-flex">{% include 'partials/pagination.html' %}</div>
|
||||||
<a href="?page=1">« first</a>
|
</div>
|
||||||
<a href="?page={{ notifications.previous_page_number }}">previous</a>
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
<span class="current">Page {{ notifications.number }} of {{ notifications.paginator.num_pages }}.</span>
|
|
||||||
{% if notifications.has_next %}
|
|
||||||
<a href="?page={{ notifications.next_page_number }}">next</a>
|
|
||||||
<a href="?page={{ notifications.paginator.num_pages }}">last »</a>
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>No notifications found.</p>
|
<p>No notifications found.</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@ -5,13 +5,28 @@
|
|||||||
{{ _("Opportunities") }}
|
{{ _("Opportunities") }}
|
||||||
{% endblock title %}
|
{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% if opportunities or request.GET.q%}
|
{% if opportunities or request.GET.q%}
|
||||||
<div class="row g-3 mt-4">
|
<div class="row g-3 mt-4">
|
||||||
<div class="col-12">
|
<div class="row g-3 justify-content-between mb-4">
|
||||||
<h2 class="mb-3">
|
<div class="col-auto">
|
||||||
{{ _("Opportunities") }}
|
<div class="d-md-flex justify-content-between">
|
||||||
<li class="fas fas fa-rocket text-primary ms-2"></li>
|
<h2 class="mb-3">
|
||||||
</h2>
|
{{ _("Opportunities") }}
|
||||||
|
<li class="fas fas fa-rocket text-primary ms-2"></li>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
{% if perms.inventory.add_opportunity %}
|
||||||
|
<div class="d-flex justify-content-between">
|
||||||
|
<a class="btn btn-phoenix-primary btn-sm"
|
||||||
|
href="{% url 'opportunity_create' request.dealer.slug %}">
|
||||||
|
<span class="fas fa-plus me-2"></span>{{ _("Add Opportunity") }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="d-flex flex-column flex-md-row justify-content-between align-items-md-center gap-3 mb-4">
|
<div class="d-flex flex-column flex-md-row justify-content-between align-items-md-center gap-3 mb-4">
|
||||||
@ -19,29 +34,38 @@
|
|||||||
<div class="d-flex flex-column flex-lg-row align-items-start align-items-lg-center gap-3 w-100"
|
<div class="d-flex flex-column flex-lg-row align-items-start align-items-lg-center gap-3 w-100"
|
||||||
id="filter-container">
|
id="filter-container">
|
||||||
<!-- Search Input - Wider and properly aligned -->
|
<!-- Search Input - Wider and properly aligned -->
|
||||||
<div class="search-box position-relative flex-grow-1 me-2"
|
<div class="search-box position-relative flex-grow-1 me-2" style="min-width: 200px">
|
||||||
style="min-width: 200px">
|
<form class="position-relative show" id="search-form"
|
||||||
<form class="position-relative show" id="search-form">
|
hx-get=""
|
||||||
<input name="q"
|
hx-boost="false"
|
||||||
id="search-input"
|
hx-trigger="keyup changed delay:500ms, search">
|
||||||
class="form-control form-control-sm search-input search"
|
|
||||||
type="search"
|
<input name="q"
|
||||||
aria-label="Search"
|
id="search-input"
|
||||||
placeholder="{{ _("Search") }}"
|
class="form-control form-control-sm search-input search"
|
||||||
value="{{ request.GET.q }}" />
|
type="search"
|
||||||
<span class="fa fa-magnifying-glass search-box-icon"></span>
|
aria-label="Search"
|
||||||
{% if request.GET.q %}
|
placeholder="{{ _("Search") }}..."
|
||||||
<button type="button"
|
value="{{ request.GET.q}}" />
|
||||||
class="btn-close position-absolute end-0 top-50 translate-middle cursor-pointer shadow-none"
|
|
||||||
id="clear-search"
|
<span class="fa fa-magnifying-glass search-box-icon"></span>
|
||||||
aria-label="Close"></button>
|
|
||||||
{% endif %}
|
{% if request.GET.q %}
|
||||||
</form>
|
<button type="button"
|
||||||
|
class="btn-close position-absolute end-0 top-50 translate-middle cursor-pointer shadow-none"
|
||||||
|
id="clear-search"
|
||||||
|
aria-label="Clear Search"></button>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Filter Dropdowns - Aligned in a row -->
|
<!-- Filter Dropdowns - Aligned in a row -->
|
||||||
<div class="d-flex flex-column flex-sm-row gap-3 w-100"
|
<div class="d-flex flex-column flex-sm-row gap-3 w-100"
|
||||||
style="max-width: 400px">
|
style="max-width: 400px">
|
||||||
<!-- Stage Filter -->
|
<!-- Stage Filter -->
|
||||||
|
<!-- Stage Filter -->
|
||||||
|
|
||||||
<div class="flex-grow-1">
|
<div class="flex-grow-1">
|
||||||
<select class="form-select"
|
<select class="form-select"
|
||||||
name="stage"
|
name="stage"
|
||||||
@ -78,14 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if perms.inventory.add_opportunity %}
|
|
||||||
<div class="d-flex justify-content-between">
|
|
||||||
<a class="btn btn-phoenix-primary btn-sm"
|
|
||||||
href="{% url 'opportunity_create' request.dealer.slug %}">
|
|
||||||
<span class="fas fa-plus me-2"></span>{{ _("Add Opportunity") }}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -103,22 +120,21 @@
|
|||||||
{% include "empty-illustration-page.html" with value="opportunity" url=create_opportunity_url %}
|
{% include "empty-illustration-page.html" with value="opportunity" url=create_opportunity_url %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block customJS %}
|
{% block customJS %}
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
const searchInput = document.getElementById("search-input");
|
const searchInput = document.getElementById("search-input");
|
||||||
const clearButton = document.getElementById("clear-search");
|
const clearButton = document.getElementById("clear-search");
|
||||||
|
const searchForm = document.getElementById("search-form");
|
||||||
|
|
||||||
if (clearButton) {
|
if (clearButton) {
|
||||||
clearButton.addEventListener("click", function(event) {
|
clearButton.addEventListener("click", function() {
|
||||||
event.preventDefault();
|
searchInput.value = "";
|
||||||
searchInput.value = ""; // Clear input field
|
// This clears the search and triggers the htmx search
|
||||||
// Remove query parameter without reloading the page
|
// by submitting the form with an empty query.
|
||||||
const newUrl = window.location.pathname;
|
searchForm.submit();
|
||||||
history.replaceState(null, "", newUrl);
|
});
|
||||||
window.location.reload();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@ -5,223 +5,221 @@
|
|||||||
{% endblock title %}
|
{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include 'modal/delete_modal.html' %}
|
{% include 'modal/delete_modal.html' %}
|
||||||
|
{% include 'components/note_modal.html' with content_type="customer" slug=customer.slug %}
|
||||||
|
|
||||||
<!---->
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<!--heading -->
|
|
||||||
<div class="row align-items-center justify-content-between g-3 mb-4">
|
<div class="row align-items-center justify-content-between g-3 mb-4">
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<h3 class="mb-0">{% trans 'Customer details' %}<li class="fas fa-user ms-2 text-primary"></li></h3>
|
<h3 class="mb-0">{% trans 'Customer details' %}<i class="fas fa-user ms-2 text-primary"></i></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto d-flex gap-2">
|
||||||
<div class="row g-3">
|
{% if perms.inventory.change_customer %}
|
||||||
<div class="col-auto">
|
<a href="{% url 'customer_update' request.dealer.slug customer.slug %}"
|
||||||
{% if perms.inventory.change_customer %}
|
class="btn btn-sm btn-phoenix-primary">
|
||||||
<a href="{% url 'customer_update' request.dealer.slug customer.slug %}"
|
<span class="fa-solid fa-pen-to-square me-2"></span>{{ _("Edit") }}
|
||||||
class="btn btn-sm btn-phoenix-primary"><span class="fa-solid fa-pen-to-square me-2"></span>{{ _("Update") }}</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
{% if perms.inventory.delete_customer %}
|
||||||
{% if perms.inventory.delete_customer %}
|
<button class="btn btn-sm btn-phoenix-danger delete-btn"
|
||||||
<div class="col-auto">
|
data-url="{% url 'customer_delete' request.dealer.slug customer.slug %}"
|
||||||
<button class="btn btn-phoenix-danger btn-sm delete-btn"
|
data-message="{% trans 'Are you sure you want to delete this customer?' %}"
|
||||||
data-url="{% url 'customer_delete' request.dealer.slug customer.slug %}"
|
data-bs-toggle="modal"
|
||||||
data-message="Are you sure you want to delete this customer?"
|
data-bs-target="#deleteModal">
|
||||||
data-bs-toggle="modal"
|
<i class="fas fa-trash me-1"></i>{{ _("Delete") }}
|
||||||
data-bs-target="#deleteModal">
|
</button>
|
||||||
<i class="fas fa-trash me-1"> </i>{{ _("Delete") }}
|
{% endif %}
|
||||||
</button>
|
</div>
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row g-4 mb-4">
|
||||||
|
<div class="col-12 col-lg-4">
|
||||||
<!--cards-->
|
<div class="card h-100 shadow-sm">
|
||||||
<div class="row">
|
<div class="card-body d-flex flex-column justify-content-between pb-3">
|
||||||
|
<div class="row align-items-center g-5 mb-3 text-center text-sm-start">
|
||||||
<div class="col m-2">
|
<div class="col-12 col-sm-auto mb-sm-2">
|
||||||
<div class="card h-100">
|
<div class="avatar avatar-5xl">
|
||||||
<div class="card-body d-flex flex-column justify-content-between pb-3">
|
{% if customer.image %}
|
||||||
<div class="row align-items-center g-5 mb-3 text-center text-sm-start">
|
<img class="rounded-circle border border-2 border-primary" src="{{ customer.image.url }}" alt="{{ customer.full_name }}"/>
|
||||||
<div class="col-12 col-sm-auto mb-sm-2">
|
{% else %}
|
||||||
<div class="avatar avatar-5xl">
|
<div class="avatar-text rounded-circle bg-secondary text-white border border-2 border-primary">
|
||||||
{% if customer.image %}<img class="rounded-circle" src="{{ customer.image.url }}" alt="" />{% endif %}
|
<span class="fs-4">{{ customer.full_name|first|default:"?" }}</span>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-sm-auto flex-1">
|
|
||||||
<h3>{{ customer.full_name }}</h3>
|
|
||||||
<p class="text-body-secondary">{{ customer.created|timesince }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex justify-content-between border-top border-dashed pt-4">
|
|
||||||
<div>
|
|
||||||
<h6>{% trans 'Invoices' %}</h6>
|
|
||||||
<p class="fs-7 text-body-secondary mb-0">{{ invoices.count }}</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h6>{% trans 'Quotations' %}</h6>
|
|
||||||
<p class="fs-7 text-body-secondary mb-0">{{ estimates.count }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col m-2">
|
|
||||||
<div class="card h-100">
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="d-flex align-items-center mb-3">
|
|
||||||
<h3 class="me-1">{% trans 'Default Address' %}</h3>
|
|
||||||
<button class="btn btn-link p-0">
|
|
||||||
<span class="fas fa-pen fs-8 ms-3 text-body-quaternary"></span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<h5 class="text-body-secondary">{{ _("Address") }}</h5>
|
|
||||||
<p class="text-body-secondary">{{ customer.address }}</p>
|
|
||||||
<div class="mb-3">
|
|
||||||
<h5 class="text-body-secondary">{% trans 'Email' %}</h5>
|
|
||||||
<a href="{{ customer.email }}">{{ customer.email }}</a>
|
|
||||||
</div>
|
|
||||||
<h5 class="text-body-secondary">{% trans 'Phone Number' %}</h5>
|
|
||||||
<a class="text-body-secondary" href="#">{{ customer.phone_number }}</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col m-2">
|
|
||||||
<div class="card h-100">
|
|
||||||
<div class="card-body">
|
|
||||||
{% if perms.inventory.change_customer %}
|
|
||||||
<div class="d-flex align-items-center justify-content-end">
|
|
||||||
{% if perms.inventory.change_lead %}
|
|
||||||
<button class="btn btn-phoenix-primary btn-sm"
|
|
||||||
type="button"
|
|
||||||
onclick=""
|
|
||||||
data-bs-toggle="modal"
|
|
||||||
data-bs-target="#noteModal">
|
|
||||||
<span class="fas fa-plus me-1"></span>{{ _("Add Note") }}
|
|
||||||
</button>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<table class="table fs-9 mb-0 table-responsive">
|
|
||||||
<tr>
|
|
||||||
<th class="align-middle pe-6 text-start" scope="col">{{ _("Note") }}</th>
|
|
||||||
<th class="align-middle pe-6 text-start" scope="col">{{ _("Date") }}</th>
|
|
||||||
</tr>
|
|
||||||
<tbody id="notesTable">
|
|
||||||
{% for note in notes %}
|
|
||||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
|
||||||
<td class="align-middle text-start fw-bold text-body-tertiary ps-1">{{ note.note }}</td>
|
|
||||||
<td class="align-middle text-body-tertiary text-start white-space-nowrap">{{ note.created }}</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-12 col-sm-auto flex-1">
|
||||||
<div class="col-12 mt-3">
|
<h3>{{ customer.full_name }}</h3>
|
||||||
<div class="mb-6">
|
<p class="text-body-secondary">{% trans "Member since:" %} {{ customer.created|date:"d M Y" }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div>
|
<div class="d-flex justify-content-between border-top border-dashed pt-4 mt-auto">
|
||||||
<div class="table-responsive scrollbar">
|
<div class="text-center">
|
||||||
<table class="table table-sm fs-9 mb-0">
|
<h6 class="mb-1 text-uppercase text-body-secondary fs-8">{% trans 'Invoices' %}</h6>
|
||||||
<thead class="bg-body-highlight">
|
<p class="fs-6 fw-bold mb-0">{{ invoices.count }}</p>
|
||||||
<tr>
|
</div>
|
||||||
<th class="sort align-middle" scope="col" >{% trans 'Leads'|upper %}</th>
|
<div class="text-center">
|
||||||
<th class="sort align-middle " scope="col" >{% trans 'Opportunities'|upper %}</th>
|
<h6 class="mb-1 text-uppercase text-body-secondary fs-8">{% trans 'Quotations' %}</h6>
|
||||||
<th class="sort align-middle " scope="col">{% trans 'Estimates'|upper %}</th>
|
<p class="fs-6 fw-bold mb-0">{{ estimates.count }}</p>
|
||||||
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="list" id="customer-order-table-body">
|
|
||||||
{% for lead in leads %}
|
|
||||||
<tr>
|
|
||||||
<td><a href="{% url 'lead_detail' request.dealer.slug lead.slug%}">{{lead}} ({{ forloop.counter }})<a></td>
|
|
||||||
<td><a href="{% url 'opportunity_detail' request.dealer.slug lead.opportunity.slug%}">{{lead.opportunity}} ({{ forloop.counter }})</a></td>
|
|
||||||
|
|
||||||
<td>
|
|
||||||
{% for estimate in lead.customer.customer_model.estimatemodel_set.all %}
|
|
||||||
<h4 class="me-2 my-1"><a href="{% url 'estimate_detail' request.dealer.slug estimate.pk %}"><span class="me-2">#{{forloop.counter }}</span>{{estimate}}</a></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="table table-sm">
|
|
||||||
<thead class="bg-body-highlight">
|
|
||||||
<tr>
|
|
||||||
<th class="sort align-middle " scope="col">{% trans 'Sale orders'|upper %}</th>
|
|
||||||
<th class="sort align-middle " scope="col">{% trans 'Invoices'|upper %}</th>
|
|
||||||
<th class="sort align-middle " scope="col">{% trans 'Car VIN'|upper %}</th>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
{% for sale_order in estimate.sale_orders.all %}
|
|
||||||
|
|
||||||
<div><a href={% url 'order_detail' request.dealer.slug sale_order.pk%}>{{estimate.sale_orders.first}}</a></div>
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
|
|
||||||
<td>
|
|
||||||
{% for invoice in estimate.invoicemodel_set.all %}
|
|
||||||
|
|
||||||
{% if invoice.is_paid %}
|
|
||||||
<span class="badge badge-phoenix fs-10 badge-phoenix-success">
|
|
||||||
<div><a href="{% url 'invoice_detail' request.dealer.slug request.entity.slug invoice.pk %}">{{invoice}}</a></div>
|
|
||||||
</span>
|
|
||||||
{%else%}
|
|
||||||
<span class="badge badge-phoenix fs-10 badge-phoenix-info">
|
|
||||||
<div><a href="{% url 'invoice_detail' request.dealer.slug request.entity.slug invoice.pk %}">{{invoice}}</a></div>
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td>
|
|
||||||
|
|
||||||
<div><a href="#">{{estimate.itemtransactionmodel_set.first.item_model.name}}</a></div>
|
|
||||||
|
|
||||||
<td>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="col-12 col-lg-8">
|
||||||
|
<div class="card h-100 shadow-sm">
|
||||||
|
<div class="card-body p-4">
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||||
|
<h5 class="card-title mb-0">{% trans 'Default Information' %}</h5>
|
||||||
|
</div>
|
||||||
|
<ul class="list-unstyled mb-0">
|
||||||
|
<li class="mb-2">
|
||||||
|
<strong class="text-body-secondary d-block">{% trans 'Address' %}:</strong>
|
||||||
|
<p class="mb-0">{{ customer.address|default:_("N/A") }}</p>
|
||||||
|
</li>
|
||||||
|
<li class="mb-2">
|
||||||
|
<strong class="text-body-secondary d-block">{% trans 'Email' %}:</strong>
|
||||||
|
<a href="mailto:{{ customer.email|default:"" }}" class="text-decoration-none">{{ customer.email|default:_("N/A") }}</a>
|
||||||
|
</li>
|
||||||
|
<li class="mb-0">
|
||||||
|
<strong class="text-body-secondary d-block">{% trans 'Phone Number' %}:</strong>
|
||||||
|
<a href="tel:{{ customer.phone_number|default:"" }}" class="text-decoration-none">{{ customer.phone_number|default:_("N/A") }}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row g-4 mb-4">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card shadow-sm">
|
||||||
|
<div class="card-body p-4">
|
||||||
|
<div class="d-flex align-items-center justify-content-between mb-3">
|
||||||
|
<h5 class="card-title mb-0">{% trans 'Notes' %}</h5>
|
||||||
|
{% if perms.inventory.change_customer %}
|
||||||
|
<button class="btn btn-phoenix-primary btn-sm d-flex align-items-center"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="modal"
|
||||||
|
data-bs-target="#noteModal">
|
||||||
|
<i class="fas fa-plus me-1"></i>{{ _("Add Note") }}
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover table-striped mb-0">
|
||||||
|
<thead class="bg-body-tertiary">
|
||||||
|
<tr>
|
||||||
|
<th scope="col" style="width: 60%;">{% trans 'Note' %}</th>
|
||||||
|
<th scope="col" style="width: 15%;">{% trans 'Date' %}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for note in notes %}
|
||||||
|
<tr class="align-middle">
|
||||||
|
<td class="text-body-secondary">{{ note.note|default_if_none:""|linebreaksbr }}</td>
|
||||||
|
<td class="text-body-secondary text-nowrap">{{ note.created|date:"d M Y" }}</td>
|
||||||
|
</tr>
|
||||||
|
{% empty %}
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" class="text-center text-body-secondary">
|
||||||
|
<i class="fas fa-info-circle me-2"></i>{% trans 'No notes found for this customer.' %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row g-4 mb-3">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card shadow-sm">
|
||||||
|
<div class="card-body p-4">
|
||||||
|
<h5 class="card-title mb-3">{% trans 'Sales History' %}</h5>
|
||||||
|
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||||
|
<li class="nav-item me-6" role="presentation">
|
||||||
|
<button class="nav-link active" id="leads-tab" data-bs-toggle="tab" data-bs-target="#leads-tab-pane" type="button" role="tab" aria-controls="leads-tab-pane" aria-selected="true">{% trans 'Leads' %}</button>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item me-6" role="presentation">
|
||||||
|
<button class="nav-link" id="opportunities-tab" data-bs-toggle="tab" data-bs-target="#opportunities-tab-pane" type="button" role="tab" aria-controls="opportunities-tab-pane" aria-selected="false">{% trans 'Opportunities' %}</button>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link" id="estimates-tab" data-bs-toggle="tab" data-bs-target="#estimates-tab-pane" type="button" role="tab" aria-controls="estimates-tab-pane" aria-selected="false">{% trans 'Estimates' %}</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="tab-content pt-3" id="myTabContent">
|
||||||
|
<div class="tab-pane fade show active" id="leads-tab-pane" role="tabpanel" aria-labelledby="leads-tab" tabindex="0">
|
||||||
|
{% for lead in leads %}
|
||||||
|
<div class="d-flex align-items-center mb-2">
|
||||||
|
<i class="fas fa-handshake me-2 text-primary"></i>
|
||||||
|
<a href="{% url 'lead_detail' request.dealer.slug lead.slug %}" class="fw-bold">{{ lead }}</a>
|
||||||
|
</div>
|
||||||
|
{% empty %}
|
||||||
|
<p class="text-body-secondary">{% trans 'No leads found for this customer.' %}</p>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="opportunities-tab-pane" role="tabpanel" aria-labelledby="opportunities-tab" tabindex="0">
|
||||||
|
{% for lead in leads %}
|
||||||
|
{% if lead.opportunity %}
|
||||||
|
<div class="d-flex align-items-center mb-2">
|
||||||
|
<i class="fas fa-chart-line me-2 text-success"></i>
|
||||||
|
<a href="{% url 'opportunity_detail' request.dealer.slug lead.opportunity.slug %}" class="fw-bold">{{ lead.opportunity }}</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% empty %}
|
||||||
|
<p class="text-body-secondary">{% trans 'No opportunities found for this customer.' %}</p>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="estimates-tab-pane" role="tabpanel" aria-labelledby="estimates-tab" tabindex="0">
|
||||||
|
{% for estimate in estimates %}
|
||||||
|
<div class="card mb-3 shadow-sm">
|
||||||
|
<div class="card-body p-3">
|
||||||
|
<div class="d-flex align-items-center justify-content-between mb-2">
|
||||||
|
<h6 class="mb-0">
|
||||||
|
<i class="fas fa-file-invoice me-2 text-info"></i>
|
||||||
|
<a href="{% url 'estimate_detail' request.dealer.slug estimate.pk %}" class="text-decoration-none">{{ estimate }}</a>
|
||||||
|
</h6>
|
||||||
|
<span class="badge bg-success">{{ estimate.created|date:"d M Y" }}</span>
|
||||||
|
</div>
|
||||||
|
<ul class="list-unstyled mb-0 ms-3">
|
||||||
|
{% for sale_order in estimate.sale_orders.all %}
|
||||||
|
<li>
|
||||||
|
<i class="fas fa-truck-moving me-2 text-success"></i>
|
||||||
|
<a href="{% url 'order_detail' request.dealer.slug sale_order.pk %}">{{ sale_order }}</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
{% for invoice in estimate.invoicemodel_set.all %}
|
||||||
|
<li>
|
||||||
|
<i class="fas fa-receipt me-2 {% if invoice.is_paid %}text-success{% else %}text-warning{% endif %}"></i>
|
||||||
|
<a href="{% url 'invoice_detail' request.dealer.slug request.entity.slug invoice.pk %}" class="text-decoration-none">{{ invoice }}</a>
|
||||||
|
<span class="badge rounded-pill {% if invoice.is_paid %}bg-success{% else %}bg-warning{% endif %} ms-2">{% if invoice.is_paid %}{% trans "Paid" %}{% else %}{% trans "Unpaid" %}{% endif %}</span>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
{% for item in estimate.itemtransactionmodel_set.all %}
|
||||||
|
<li>
|
||||||
|
<i class="fas fa-car me-2 text-primary"></i>
|
||||||
|
{{ item.item_model.name }}
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% empty %}
|
||||||
|
<p class="text-body-secondary">{% trans 'No estimates found for this customer.' %}</p>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% include "components/note_modal.html" with content_type="customer" slug=customer.slug %}
|
{% include "components/note_modal.html" with content_type="customer" slug=customer.slug %}
|
||||||
|
|
||||||
|
|
||||||
@ -254,4 +252,5 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -56,8 +56,8 @@
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<h2>{{ _("Select Car Makes You Sell") }}</h2>
|
<h2 class="text-center text-primary">{{ _("Select Car Makes You Sell") }}</h2>
|
||||||
<form method="post"
|
<form method="post" class="mb-3"
|
||||||
action="{% url 'assign_car_makes' request.dealer.slug %}">
|
action="{% url 'assign_car_makes' request.dealer.slug %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="car-makes-grid">
|
<div class="car-makes-grid">
|
||||||
@ -83,7 +83,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="d-grid gap-2">
|
<div class="d-grid gap-2">
|
||||||
<button class="btn btn-phoenix-primary btn-lg" type="submit">
|
<button class="btn btn-outline-primary btn-lg" type="submit">
|
||||||
<i class="fa fa-save me-2"></i>{{ _("Save") }}
|
<i class="fa fa-save me-2"></i>{{ _("Save") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -21,8 +21,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
<form method="post" novalidate>
|
<form method="post" novalidate>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
<div class="row mb-4">
|
<div class="row mb-4">
|
||||||
|
|||||||
@ -18,9 +18,9 @@
|
|||||||
{% include "partials/search_box.html" %}
|
{% include "partials/search_box.html" %}
|
||||||
{% if page_obj.object_list or request.GET.q%}
|
{% if page_obj.object_list or request.GET.q%}
|
||||||
<div class="table-responsive px-1 scrollbar mt-3">
|
<div class="table-responsive px-1 scrollbar mt-3">
|
||||||
<table class="table align-items-center table-flush">
|
<table class="table align-items-center">
|
||||||
<thead>
|
<thead class="bg-body-highlight">
|
||||||
<tr class="bg-body-highlight">
|
<tr>
|
||||||
<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 "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 "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 "Unit of Measure" %}</th>
|
||||||
@ -35,12 +35,12 @@
|
|||||||
<td class="align-middle product white-space-nowrap">{{ expense.uom }}</td>
|
<td class="align-middle product white-space-nowrap">{{ expense.uom }}</td>
|
||||||
<td class="align-middle product white-space-nowrap">
|
<td class="align-middle product white-space-nowrap">
|
||||||
{% if perms.django_ledger.change_itemmodel %}
|
{% if perms.django_ledger.change_itemmodel %}
|
||||||
|
|
||||||
<a href="{% url 'item_expense_update' request.dealer.slug expense.pk %}"
|
<a href="{% url 'item_expense_update' request.dealer.slug expense.pk %}"
|
||||||
class="btn btn-sm btn-phoenix-success">{% trans "Update" %}</a>
|
class="btn btn-sm btn-phoenix-primary"><li class="fa fa-edit me-1"></li>{% trans "Update" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td class="align-middle product white-space-nowrap"></td>
|
|
||||||
<td class="align-middle white-space-nowrap text-start"></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -16,10 +16,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{% include "partials/search_box.html" %}
|
{% include "partials/search_box.html" %}
|
||||||
{% if page_obj.object_list or request.GET.q %}
|
{% if page_obj.object_list or request.GET.q %}
|
||||||
<div class="table-responsive px-1 scrollbar mt-3">
|
<div class="table-responsive px-1 scrollbar mt-3">
|
||||||
<table class="table align-items-center table-flush">
|
<table class="table align-items-center">
|
||||||
<thead>
|
<thead class="bg-body-highlight">
|
||||||
<tr class="bg-body-highlight">
|
<tr >
|
||||||
<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 "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 "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 "Unit of Measure" %}</th>
|
||||||
@ -39,7 +39,7 @@
|
|||||||
<td class="align-middle white-space-nowrap text-start">
|
<td class="align-middle white-space-nowrap text-start">
|
||||||
{% if perms.inventory.add_additionalservices %}
|
{% if perms.inventory.add_additionalservices %}
|
||||||
<a href="{% url 'item_service_update' request.dealer.slug service.pk %}"
|
<a href="{% url 'item_service_update' request.dealer.slug service.pk %}"
|
||||||
class="btn btn-sm btn-phoenix-success">{% trans "Update" %}</a>
|
class="btn btn-sm btn-phoenix-primary"><li class="fa fa-edit me-1"></li>{% trans "Update" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -7,98 +7,177 @@
|
|||||||
|
|
||||||
{% block content%}
|
{% block content%}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.summary-card {
|
||||||
|
border: 1px solid var(--card-border);
|
||||||
|
border-radius: .5rem;
|
||||||
|
box-shadow: var(--card-shadow);
|
||||||
|
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
|
||||||
|
}
|
||||||
|
.summary-card:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 8px 16px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
.summary-card .card-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.summary-card .card-title {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--secondary-color) !important;
|
||||||
|
}
|
||||||
|
.summary-card .card-text {
|
||||||
|
font-size: 2.25rem;
|
||||||
|
font-weight: 700;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
<div class="container-fluid report-container">
|
<div class="container-fluid report-container">
|
||||||
<header class="report-header text-center">
|
<header class="report-header text-center">
|
||||||
<h1 class="display-4">{% trans 'Car Sale Report' %} <span class="fas fa-car mx-2 text-primary"></span><span class="fas fa-money-bill mx-2 text-primary"></span></h1>
|
<h1 class="display-4">{% trans 'Car Sale Report' %} <span class="fas fa-chart-line mx-2 text-primary"></span></h1>
|
||||||
<p class="lead text-muted"><strong>{{dealer}}</strong></p>
|
<p class="lead text-muted"><strong>{{dealer}}</strong></p>
|
||||||
<p class="text-muted">{% trans 'Report Date' %}: {{current_time}}</p>
|
<p class="text-muted">{% trans 'Report Date' %}: {{current_time}}</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<section id="summary" class="mb-1">
|
<section id="filters" class="mb-5 p-4 rounded border border-primary">
|
||||||
<h2 class="section-heading mb-2">{% trans 'Report Summary' %}</h2>
|
<h2 class="section-heading mb-4">{% trans 'Filters' %} <i class="fas fa-sliders-h ms-2"></i></h2>
|
||||||
<div class="row ">
|
<form method="GET" class="row g-3 align-items-end">
|
||||||
<div class="col-md-6 col-lg-4 mb-2">
|
<div class="col-md-3">
|
||||||
<div class="card summary-card">
|
<label for="make-select" class="form-label">{% trans 'Make' %}</label>
|
||||||
<div class="card-body">
|
<select id="make-select" name="make" class="form-select">
|
||||||
<h5 class="card-title text-primary">{% trans 'Total Revenue Amount' %}<span class="fas fa-solid fa-dollar-sign mx-1"></span><span class="fas fa-car"></span></h5>
|
<option value="">{% trans 'All Makes' %}</option>
|
||||||
<p class="card-text fs-4 fw-bold">120000000</p>
|
{% for make in makes %}
|
||||||
</div>
|
<option value="{{ make }}" {% if make == selected_make %}selected{% endif %}>{{ make }}</option>
|
||||||
</div>
|
{% endfor %}
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-lg-4 mb-2">
|
<div class="col-md-3">
|
||||||
<div class="card summary-card">
|
<label for="model-select" class="form-label">{% trans 'Model' %}</label>
|
||||||
<div class="card-body">
|
<select id="model-select" name="model" class="form-select">
|
||||||
<h5 class="card-title text-primary">{% trans 'Total Vat Amount' %}<span class="fas fa-solid fa-percent mx-1"></span><span class="fas fa-car"></span></h5>
|
<option value="">{% trans 'All Models' %}</option>
|
||||||
<p class="card-text fs-4 fw-bold">12000</p>
|
{% for model in models %}
|
||||||
</div>
|
<option value="{{ model }}" {% if model == selected_model %}selected{% endif %}>{{ model }}</option>
|
||||||
</div>
|
{% endfor %}
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-lg-4 mb-2">
|
<div class="col-md-3">
|
||||||
<div class="card summary-card">
|
<label for="serie-select" class="form-label">{% trans 'Serie' %}</label>
|
||||||
<div class="card-body">
|
<select id="serie-select" name="serie" class="form-select">
|
||||||
<h5 class="card-title text-primary">{% trans 'Total Discount Amount' %} <span class="fas fa-solid fa-tag mx-1"></span><span class="fas fa-car"></span></h5>
|
<option value="">{% trans 'All Series' %}</option>
|
||||||
<p class="card-text fs-4 fw-bold">12000</p>
|
{% for serie in series %}
|
||||||
</div>
|
<option value="{{ serie }}" {% if serie == selected_serie %}selected{% endif %}>{{ serie }}</option>
|
||||||
</div>
|
{% endfor %}
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<label for="year-select" class="form-label">{% trans 'Year' %}</label>
|
||||||
|
<select id="year-select" name="year" class="form-select">
|
||||||
</div>
|
<option value="">{% trans 'All Years' %}</option>
|
||||||
|
{% for year in years %}
|
||||||
|
<option value="{{ year }}" {% if year|stringformat:"s" == selected_year %}selected{% endif %}>{{ year }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<button type="submit" class="btn btn-primary w-100"><i class="fas fa-filter me-2"></i>{% trans 'Filter' %}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="purchase-details" class="mb-3">
|
<section id="summary" class="mb-5">
|
||||||
<h2 class="section-heading">{% trans 'Detailed Purchase List' %}</h2>
|
<h2 class="section-heading mb-4 border-start border-5 border-primary p-2">{% trans 'Report Summary' %}</h2>
|
||||||
|
<div class="row g-4">
|
||||||
<div class="d-flex justify-content-end mb-3 d-print-none">
|
<div class="col-md-6 col-lg-3">
|
||||||
<a href="{% url 'car-sale-report-csv-export' request.dealer.slug %}" class="btn btn-phoenix-primary">
|
<div class="card summary-card">
|
||||||
<i class="bi bi-download me-2"></i>{% trans 'Download as CSV' %}
|
<div class="card-body">
|
||||||
</a>
|
<h5 class="card-title">{% trans 'Total Revenue' %}<i class="fas fa-dollar-sign ms-2"></i></h5>
|
||||||
|
<p class="card-text">{{ total_revenue|floatformat:2 }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 col-lg-3">
|
||||||
|
<div class="card summary-card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">{% trans 'Total VAT Amount' %}<i class="fas fa-percent ms-2"></i></h5>
|
||||||
|
<p class="card-text">{{ total_vat|floatformat:2 }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 col-lg-3">
|
||||||
|
<div class="card summary-card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">{% trans 'Total Discount Amount' %}<i class="fas fa-tag ms-2"></i></h5>
|
||||||
|
<p class="card-text">{{ total_discount|floatformat:2 }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 col-lg-3">
|
||||||
|
<div class="card summary-card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">{% trans 'Total Cars Sold' %}<i class="fas fa-car ms-2"></i></h5>
|
||||||
|
<p class="card-text">{{ cars_sold|length }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive">
|
</section>
|
||||||
<table class="table table-striped table-hover table-bordered table-sm">
|
|
||||||
<thead >
|
<section id="sale-details" class="mb-3">
|
||||||
|
<h2 class="section-heading border-start border-5 border-primary p-2">{% trans 'Detailed Sale List' %}</h2>
|
||||||
|
<div class="d-flex justify-content-end mb-3 d-print-none">
|
||||||
|
<a href="{% url 'car-sale-report-csv-export' dealer.slug %}" class="btn btn-phoenix-primary">
|
||||||
|
<i class="bi bi-download me-2"></i>{% trans 'Download as CSV' %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="table-responsive ">
|
||||||
|
<table class="table table-sm table-striped table-hover ">
|
||||||
|
<thead class="bg-body-highlight">
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans 'VIN' %}</th>
|
<th scope="col">{% trans 'VIN' %}</th>
|
||||||
<th>{% trans 'Make' %}</th>
|
<th scope="col">{% trans 'Make' %}</th>
|
||||||
<th>{% trans 'Model' %}</th>
|
<th scope="col">{% trans 'Model' %}</th>
|
||||||
<th>{% trans 'Year' %}</th>
|
<th scope="col">{% trans 'Year' %}</th>
|
||||||
<th>{% trans 'Serie' %}</th>
|
<th scope="col">{% trans 'Serie' %}</th>
|
||||||
<th>{% trans 'Trim' %}</th>
|
<th scope="col">{% trans 'Trim' %}</th>
|
||||||
<th>{% trans 'Mileage' %}</th>
|
<th scope="col">{% trans 'Mileage' %}</th>
|
||||||
<th>{% trans 'Stock Type' %}</th>
|
<th scope="col">{% trans 'Stock Type' %}</th>
|
||||||
<th>{% trans 'Created Date' %}</th>
|
<th scope="col">{% trans 'Created Date' %}</th>
|
||||||
<th>{% trans 'Sold Date' %}</th>
|
<th scope="col">{% trans 'Sold Date' %}</th>
|
||||||
<th>{% trans 'Cost Price' %}</th>
|
<th scope="col">{% trans 'Cost Price' %}</th>
|
||||||
<th>{% trans 'Marked Price' %}</th>
|
<th scope="col">{% trans 'Marked Price' %}</th>
|
||||||
<th>{% trans 'Discount Amount' %}</th>
|
<th scope="col">{% trans 'Discount Amount' %}</th>
|
||||||
<th>{% trans 'Selling Price' %}</th>
|
<th scope="col">{% trans 'Selling Price' %}</th>
|
||||||
<th>{% trans 'Tax Amount' %}</th>
|
<th scope="col">{% trans 'Tax Amount' %}</th>
|
||||||
<th>{% trans 'Invoice Number' %}</th>
|
<th scope="col">{% trans 'Invoice Number' %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
{% for car in cars_sold %}
|
||||||
{% for car in cars_sold%}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="ps-1">{{car.vin}}</td>
|
<td>{{ car.vin }}</td>
|
||||||
<td>{{car.id_car_make.name}}</td>
|
<td>{{ car.id_car_make.name }}</td>
|
||||||
<td>{{car.id_car_model.name}}</td>
|
<td>{{ car.id_car_model.name }}</td>
|
||||||
<td>{{car.year}}</td>
|
<td>{{ car.year }}</td>
|
||||||
<td>{{car.id_car_serie.name}}</td>
|
<td>{{ car.id_car_serie.name }}</td>
|
||||||
<td>{{car.id_car_trim.name}}</td>
|
<td>{{ car.id_car_trim.name }}</td>
|
||||||
<td>{{car.mileage}}</td>
|
<td>{{ car.mileage }}</td>
|
||||||
<td>{{car.stock_type}}</td>
|
<td>{{ car.stock_type }}</td>
|
||||||
<td>{{car.created_at}}</td>
|
<td>{{ car.created_at }}</td>
|
||||||
<td>{{car.sold_date}}</td>
|
<td>{{ car.sold_date }}</td>
|
||||||
<td>{{car.finances.cost_price}}</td>
|
<td>{{ car.finances.cost_price }}</td>
|
||||||
<td>{{car.finances.marked_price}}</td>
|
<td>{{ car.finances.marked_price }}</td>
|
||||||
<td>{{car.finances.discount_amount}}</td>
|
<td>{{ car.finances.discount_amount }}</td>
|
||||||
<td>{{car.finances.selling_price}}</td>
|
<td>{{ car.finances.selling_price }}</td>
|
||||||
<td>{{car.finances.vat_amount}}</td>
|
<td>{{ car.finances.vat_amount }}</td>
|
||||||
<td>{{car.item_model.invoicemodel_set.first.invoice_number}}</td>
|
<td>{{ car.item_model.invoicemodel_set.first.invoice_number }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@ -8,73 +8,114 @@
|
|||||||
|
|
||||||
{% block content%}
|
{% block content%}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.summary-card {
|
||||||
|
border: 1px solid var(--card-border);
|
||||||
|
border-radius: .5rem;
|
||||||
|
box-shadow: var(--card-shadow);
|
||||||
|
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
|
||||||
|
}
|
||||||
|
.summary-card:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 8px 16px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
.summary-card .card-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.summary-card .card-title {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--secondary-color) !important;
|
||||||
|
}
|
||||||
|
.summary-card .card-text {
|
||||||
|
font-size: 2.25rem;
|
||||||
|
font-weight: 700;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
<div class="container-fluid report-container">
|
<div class="container-fluid report-container">
|
||||||
<header class="report-header text-center">
|
<header class="report-header text-center">
|
||||||
<h1 class="display-4">{% trans 'Car Purchase Report' %} <span class="fas fa-car mx-2 text-primary"></span><span class="fas fa-chart-bar mx-2 text-primary"></span></h1>
|
<h1 class="display-4">{% trans 'Car Purchase Report' %}<i class="fas fa-chart-pie ms-2 text-primary"></i></h1>
|
||||||
<p class="lead text-muted"><strong>{{dealer}}</strong></p>
|
<p class="lead text-muted"><strong>{{dealer}}</strong></p>
|
||||||
<p class="text-muted">Report Date: {{current_time}}</p>
|
<p class="text-muted">{% trans "Report Date" %}: {{current_time}}</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<section id="summary" class="mb-1">
|
<section id="summary" class="mb-5">
|
||||||
<h2 class="section-heading mb-2">{% trans 'Report Summary' %}</h2>
|
<h2 class="section-heading mb-4 border-start border-3 border-primary p-2">{% trans 'Report Summary' %}</h2>
|
||||||
<div class="row ">
|
<div class="row g-4">
|
||||||
<div class="col-md-6 col-lg-4 mb-2">
|
<div class="col-md-6 col-lg-4">
|
||||||
<div class="card summary-card">
|
<div class="card summary-card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title text-primary">{% trans 'Total Purchase Amount' %}<span class="fas fa-money-bill ms-1"><span></h5>
|
<h5 class="card-title">{% trans 'Total Purchase Amount' %}<span class="fas fa-money-bill ms-2"></span></h5>
|
||||||
<p class="card-text fs-4 fw-bold">{{total_po_amount}}</p>
|
<p class="card-text">{{total_po_amount}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-lg-4 mb-2">
|
<div class="col-md-6 col-lg-4">
|
||||||
<div class="card summary-card">
|
<div class="card summary-card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title text-primary">{% trans 'Total Cars Purchased' %}<span class="fas fa-shopping-bag mx-1"></span><span class="fas fa-car"></span></h5>
|
<h5 class="card-title">{% trans 'Total Cars Purchased' %}<span class="fas fa-car ms-2"></span></h5>
|
||||||
<p class="card-text fs-4 fw-bold">{{total_po_cars}}</p>
|
<p class="card-text">{{total_po_cars}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 col-lg-4">
|
||||||
|
<div class="card summary-card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">{% trans 'Total Purchase Orders' %}<span class="fas fa-file-invoice ms-2"></span></h5>
|
||||||
|
<p class="card-text">{{data|length}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="purchase-details" class="mb-3">
|
<section id="purchase-details" class="mb-3">
|
||||||
<h2 class="section-heading">{% trans 'Detailed Purchase List' %}</h2>
|
<h2 class="section-heading border-start border-3 border-primary p-2">{% trans 'Detailed Purchase List' %}</h2>
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mb-3 d-print-none">
|
<div class="d-flex justify-content-end mb-3 d-print-none">
|
||||||
<a href="{% url 'purchase-report-csv-export' request.dealer.slug %}" class="btn btn-phoenix-primary">
|
<a href="{% url 'purchase-report-csv-export' request.dealer.slug %}" class="btn btn-phoenix-primary">
|
||||||
<i class="bi bi-download me-2"></i>{% trans 'Download as CSV' %}
|
<i class="bi bi-download me-2"></i>{% trans 'Download as CSV' %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped table-hover table-bordered table-sm">
|
<table class="table table-striped table-hover">
|
||||||
<thead>
|
<thead class="bg-body-highlight">
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans 'Purchase ID' %}</th>
|
<th scope="col">{% trans 'Purchase ID' %}</th>
|
||||||
<th>{% trans 'Date Created' %}</th>
|
<th scope="col">{% trans 'Date Created' %}</th>
|
||||||
<th>{% trans 'Status' %}</th>
|
<th scope="col">{% trans 'Status' %}</th>
|
||||||
<th>{% trans 'PO Amount' %}</th>
|
<th scope="col">{% trans 'PO Amount' %}</th>
|
||||||
<th>{% trans 'Date Fulfilled' %}</th>
|
<th scope="col">{% trans 'Date Fulfilled' %}</th>
|
||||||
<th>{% trans 'Created By' %}</th>
|
<th scope="col">{% trans 'Created By' %}</th>
|
||||||
<th>{% trans 'Cars Purchased' %}</th>
|
<th scope="col">{% trans 'Cars Purchased' %}</th>
|
||||||
<th>{% trans 'Vendor' %}</th>
|
<th scope="col">{% trans 'Vendor' %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
{% for po in data %}
|
{% for po in data %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="ps-1">{{po.po_number}}</td>
|
<td>{{po.po_number}}</td>
|
||||||
<td>{{po.po_created|date}}</td>
|
<td>{{po.po_created|date}}</td>
|
||||||
<td>{{po.po_status}}</td>
|
<td>{{po.po_status}}</td>
|
||||||
<td>{{po.po_amount}}</td>
|
<td>{{po.po_amount}}</td>
|
||||||
<td>{{po.po_fulfilled_date}}</td>
|
<td>
|
||||||
<td>staff</td>
|
{% if po.po_fulfilled_date%}
|
||||||
|
{{po.po_fulfilled_date}}
|
||||||
|
{%else%}
|
||||||
|
{% trans 'Not fulfilled'%}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>{% firstof po.created_by.get_full_name 'staff' %}</td>
|
||||||
<td>{{po.po_quantity}}</td>
|
<td>{{po.po_quantity}}</td>
|
||||||
<td>
|
<td>
|
||||||
{{po.vendors_str}}
|
{{po.vendors_str}}
|
||||||
@ -82,12 +123,6 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<td colspan="6" class="text-end fw-bold">{% trans 'Total Purchase'%}:</td>
|
|
||||||
<td class="fw-bold text-primary">{{total_po_amount}}</td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@ -1,13 +1,25 @@
|
|||||||
{% load i18n %}{% autoescape off %}
|
{% load i18n %}{% autoescape off %}
|
||||||
{% trans "Hi" %} {% firstof user.get_full_name user.username %},
|
|
||||||
|
مرحباً {% firstof user.get_full_name user.username %}،
|
||||||
|
|
||||||
{% if userplan.expire != None %}
|
{% if userplan.expire != None %}
|
||||||
{% blocktrans with plan_name=plan.name expire=userplan.expire %}Your current plan is {{ plan_name }} and it will expire on {{ expire }}. {% endblocktrans %}
|
خطتك الحالية هي {{ plan.name }} وستنتهي صلاحيتها في {{ userplan.expire }}.
|
||||||
{% else %}
|
{% else %}
|
||||||
{% blocktrans with plan_name=plan.name %}Your current plan is {{ plan_name }}. {% endblocktrans %}
|
خطتك الحالية هي {{ plan.name }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% trans "Thank you" %}
|
شكراً لك،
|
||||||
--
|
فريق تنحل
|
||||||
{% blocktrans %}The Team at {{ site_name }}{% endblocktrans %}
|
---------------------
|
||||||
|
|
||||||
|
Hi {% firstof user.get_full_name user.username %},
|
||||||
|
|
||||||
|
{% if userplan.expire != None %}
|
||||||
|
Your current plan is {{ plan_name }} and it will expire on {{ expire }}. {% endblocktrans %}
|
||||||
|
{% else %}
|
||||||
|
Your current plan is {{ plan_name }}. {% endblocktrans %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
Thank you
|
||||||
|
The Team at Tenhal
|
||||||
{% endautoescape %}
|
{% endautoescape %}
|
||||||
@ -1 +1,3 @@
|
|||||||
{% load i18n %}{% blocktrans with user=user plan=plan.name %}Your account {{ user }} has new plan {{ plan }}{% endblocktrans %}
|
{% load i18n %}
|
||||||
|
Your account {{ user }} has new plan {{ plan }}
|
||||||
|
حسابك {{ user }} لديه خطة جديدة {{ plan }}
|
||||||
@ -1,14 +1,27 @@
|
|||||||
{% load i18n %}{% autoescape off %}
|
{% load i18n %}{% autoescape off %}
|
||||||
{% trans "Hi" %} {% firstof user.get_full_name user.username %},
|
مرحباً {% firstof user.get_full_name user.username %}،
|
||||||
|
|
||||||
{% blocktrans %}Your account has just expired.{% endblocktrans %}
|
لقد انتهت صلاحية حسابك للتو.
|
||||||
|
|
||||||
{% blocktrans with plan_name=userplan.plan.name %}You can restore your current plan {{ plan_name }} here:{% endblocktrans %}
|
يمكنك استعادة خطتك الحالية {{ userplan.plan.name }} من هنا:
|
||||||
http://{{ site_domain }}{% url 'current_plan' %}
|
http://{{ site_domain }}{% url 'current_plan' %}
|
||||||
{% blocktrans %}or you can upgrade your plan here:{% endblocktrans %}
|
أو يمكنك ترقية خطتك من هنا:
|
||||||
http://{{ site_domain }}{% url 'upgrade_plan' %}
|
http://{{ site_domain }}{% url 'upgrade_plan' %}
|
||||||
|
|
||||||
{% trans "Thank you" %}
|
شكراً لك،
|
||||||
--
|
--
|
||||||
{% blocktrans %}The Team at {{ site_name }}{% endblocktrans %}
|
فريق تنحل
|
||||||
|
---------------------
|
||||||
|
Hi {% firstof user.get_full_name user.username %},
|
||||||
|
|
||||||
|
Your account has just expired.
|
||||||
|
|
||||||
|
You can restore your current plan {{ userplan.plan.name }} here:
|
||||||
|
http://{{ site_domain }}{% url 'current_plan' %}
|
||||||
|
or you can upgrade your plan here:
|
||||||
|
http://{{ site_domain }}{% url 'upgrade_plan' %}
|
||||||
|
|
||||||
|
Thank you,
|
||||||
|
--
|
||||||
|
The Team at TENHAL
|
||||||
{% endautoescape %}
|
{% endautoescape %}
|
||||||
@ -1 +1,5 @@
|
|||||||
{% load i18n %}{% blocktrans %}Your account {{ user }} has just expired{% endblocktrans %}
|
{% load i18n %}{% autoescape off %}
|
||||||
|
لقد انتهت صلاحية حسابك {{ user }} للتو.
|
||||||
|
---------------------
|
||||||
|
Your account {{ user }} has just expired.
|
||||||
|
{% endautoescape %}
|
||||||
@ -1,11 +1,20 @@
|
|||||||
{% load i18n %}{% autoescape off %}
|
{% load i18n %}{% autoescape off %}
|
||||||
{% trans "Hi" %} {% firstof user.get_full_name user.username %},
|
مرحباً {% firstof user.get_full_name user.username %}،
|
||||||
|
|
||||||
{% blocktrans with days=pricing.period plan_name=plan.name expire=userplan.expire %}Your account has just been extended by {{ days }} days. Your current plan is {{ plan_name }} and it will expire on {{ expire }}. {% endblocktrans %}
|
تم تمديد صلاحية حسابك للتو لمدة {{ pricing.period }} يوم. خطتك الحالية هي {{plan.name}} وستنتهي في {{userplan.expire}}.
|
||||||
|
|
||||||
{% trans "An invoice will be sent with another e-mail, if billing data was provided." %}
|
سيتم إرسال فاتورة في رسالة بريد إلكتروني أخرى، في حال تم تقديم بيانات الفوترة.
|
||||||
|
شكراً لك
|
||||||
{% trans "Thank you" %}
|
|
||||||
--
|
--
|
||||||
{% blocktrans %}The Team at {{ site_name }}{% endblocktrans %}
|
فريق تنحل
|
||||||
|
---------------------
|
||||||
|
Hi {% firstof user.get_full_name user.username %},
|
||||||
|
|
||||||
|
Your account has just been extended by {{ pricing.period }} days. Your current plan is {{plan.name}} and it will expire on {{userplan.expire}}.
|
||||||
|
|
||||||
|
An invoice will be sent with another e-mail, if billing data was provided.
|
||||||
|
|
||||||
|
Thank you
|
||||||
|
--
|
||||||
|
The Team at Tenhal
|
||||||
{% endautoescape %}
|
{% endautoescape %}
|
||||||
@ -1 +1,14 @@
|
|||||||
{% load i18n %}{% blocktrans with user=user days=pricing.period %}Your account {{ user }} has been extended by {{ days }} days{% endblocktrans %}
|
{% load i18n %}
|
||||||
|
{% autoescape off %}
|
||||||
|
مرحباً {% firstof user.get_full_name user.username %}،
|
||||||
|
تم تمديد حسابك {{ user }} لمدة {{ pricing.period }} يوم
|
||||||
|
شكراً لك
|
||||||
|
--
|
||||||
|
فريق تنحل
|
||||||
|
--------
|
||||||
|
Hi {% firstof user.get_full_name user.username %},
|
||||||
|
Your account {{ user }} has been extended by {{ pricing.period }} days
|
||||||
|
Thank you
|
||||||
|
--
|
||||||
|
The Team at Tenhal
|
||||||
|
{% endautoescape %}
|
||||||
@ -1,14 +1,21 @@
|
|||||||
{% load i18n %}{% autoescape off %}
|
{% load i18n %}{% autoescape off %}
|
||||||
{% trans "Hi" %} {% firstof user.get_full_name user.username %},
|
مرحباً {% firstof user.get_full_name user.username %}،
|
||||||
|
نكتب إليك لإعلامك، أنه قد تم إصدار {{ invoice_type }} رقم {{ invoice_number }}. يمكنك الاطلاع عليها وطباعتها عبر الرابط:
|
||||||
{% blocktrans %}We are writing to inform you, that {{ invoice_type }} {{ invoice_number }} has been issued. You can view it and print it at:
|
|
||||||
http://{{ site_domain }}{{ url }}
|
http://{{ site_domain }}{{ url }}
|
||||||
{% endblocktrans %}
|
يمكنك الاطلاع على تفاصيل الطلب عبر الرابط:
|
||||||
|
|
||||||
{% trans "Details of the order can be see on:" %}:
|
|
||||||
http://{{ site_domain }}{% url 'order' pk=order %}
|
http://{{ site_domain }}{% url 'order' pk=order %}
|
||||||
|
|
||||||
{% trans "Thank you" %}
|
شكراً لك
|
||||||
--
|
--
|
||||||
{% blocktrans %}The Team at {{ site_name }}{% endblocktrans %}
|
فريق تنحل
|
||||||
|
---------------------
|
||||||
|
Hi {% firstof user.get_full_name user.username %},
|
||||||
|
We are writing to inform you, that {{ invoice_type }} {{ invoice_number }} has been issued. You can view it and print it at:
|
||||||
|
http://{{ site_domain }}{{ url }}
|
||||||
|
Details of the order can be see on:
|
||||||
|
http://{{ site_domain }}{% url 'order' pk=order %}
|
||||||
|
|
||||||
|
Thank you
|
||||||
|
--
|
||||||
|
The Team at Tenhal
|
||||||
{% endautoescape %}
|
{% endautoescape %}
|
||||||
@ -1 +1,3 @@
|
|||||||
{% load i18n %}{% trans 'Order' %} {{ order }} - {% blocktrans with invoice_type=invoice_type invoice_number=invoice_number user=user %}{{ invoice_type }} {{ invoice_number }} has been issued for {{ user }}{% endblocktrans %}
|
{% load i18n %}
|
||||||
|
Order {{ order }} - {{ invoice_type }} {{ invoice_number }} has been issued for {{ user }}
|
||||||
|
تم إصدار {{ invoice_type }} {{ invoice_number }} للأمر {{ order }} باسم {{ user }}
|
||||||
|
|||||||
@ -1,15 +1,29 @@
|
|||||||
{% load i18n %}{% autoescape off %}
|
{% load i18n %}{% autoescape off %}
|
||||||
{% trans "Hi" %} {% firstof user.get_full_name user.username %},
|
Hi {% firstof user.get_full_name user.username %},
|
||||||
|
|
||||||
{% blocktrans %}Your account will expire in {{ days }} days.{% endblocktrans %}
|
Your account will expire in {{ days }} days.
|
||||||
|
|
||||||
{% blocktrans with plan_name=userplan.plan.name %}You can extend your current plan {{ plan_name }} on page:{% endblocktrans %}
|
You can extend your current plan {{ userplan.plan.name }} on page:
|
||||||
http://{{ site_domain }}{% url 'current_plan' %}
|
http://{{ site_domain }}{% url 'current_plan' %}
|
||||||
|
|
||||||
{% blocktrans %}or you can upgrade your plan here:{% endblocktrans %}
|
or you can upgrade your plan here:
|
||||||
http://{{ site_domain }}{% url 'upgrade_plan' %}
|
http://{{ site_domain }}{% url 'upgrade_plan' %}
|
||||||
|
|
||||||
{% trans "Thank you" %}
|
Thank you
|
||||||
--
|
--
|
||||||
{% blocktrans %}The Team at {{ site_name }}{% endblocktrans %}
|
The Team at Tenhal
|
||||||
|
----------------
|
||||||
|
مرحباً {% firstof full_name username %}،
|
||||||
|
|
||||||
|
سينتهي حسابك في غضون {{ days }} يوم.
|
||||||
|
|
||||||
|
يمكنك تمديد خطتك الحالية {{ userplan.plan.name }} على الصفحة التالية:
|
||||||
|
http://{{ site_domain }}{% url 'current_plan' %}
|
||||||
|
|
||||||
|
أو يمكنك ترقية خطتك هنا:
|
||||||
|
http://{{ site_domain }}{% url 'upgrade_plan' %}
|
||||||
|
|
||||||
|
شكراً لك
|
||||||
|
--
|
||||||
|
فريق تنحل
|
||||||
{% endautoescape %}
|
{% endautoescape %}
|
||||||
|
|||||||
@ -1 +1,3 @@
|
|||||||
{% load i18n %}{% blocktrans count days as days %}Your account {{ user }} will expire in {{ days }} day{% plural %}Your account {{ user }} will expire in {{ days }} days{% endblocktrans %}
|
{% load i18n %}
|
||||||
|
Your account {{ user }} will expire in {{ days }} day.
|
||||||
|
سينتهي حسابك {{ user }} في غضون {{ days }} يوم.
|
||||||
@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% url "pricing_page" request.dealer.slug as pricing_page_url %}
|
{% url "pricing_page" request.dealer.slug as pricing_page_url %}
|
||||||
{% include "message-illustration.html" with value1="No Active Plan, please create your subscription plan." value2="Buy Plan" url=pricing_page_url %}
|
{% include "message-illustration.html" with value1=_("No active plan, Please create a subscription plan.") value2=_("Buy Plan") url=pricing_page_url %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user