130 lines
5.5 KiB
HTML
130 lines
5.5 KiB
HTML
{% extends "base.html" %}
|
|
{% load custom_filters %}
|
|
{% load i18n %}
|
|
{% block content %}
|
|
<!-- Custom Card Modal -->
|
|
<div class="modal fade" id="customCardModal" tabindex="-1" aria-labelledby="customCardModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-sm">
|
|
<div class="modal-content">
|
|
<div class="modal-header bg-primary">
|
|
<h5 class="modal-title text-light" id="customCardModalLabel">{% trans 'Custom Card' %}</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
{% trans 'Confirm Approve?' %}
|
|
|
|
<div class="modal-footer">
|
|
<button type="button"
|
|
class="btn btn-sm btn-danger"
|
|
data-bs-dismiss="modal">
|
|
{% trans 'No' %}
|
|
</button>
|
|
<form method="POST" action="{% url 'confirm_quotation' quotation.id %}" class="d-inline">
|
|
{% csrf_token %}
|
|
<button type="submit" class="btn btn-success btn-sm">{% trans "Yes" %}</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container mt-4">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4>{% trans "Quotation Details" %} - {{ quotation.id }}</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<h5>{% trans "Customer Details" %}</h5>
|
|
<p>
|
|
<strong>{% trans "Name" %}:</strong>
|
|
{{ quotation.customer.get_full_name }}</p>
|
|
<p><strong>{% trans "Address" %}:</strong> {{ quotation.customer.address }}</p>
|
|
<p><strong>{% trans "VAT No" %}:</strong> {{ quotation.customer.vat_number }}</p>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<h5>{% trans "Quotation Information" %}</h5>
|
|
<p><strong>{% trans "Quotation No" %}:</strong> {{ quotation.id }}</p>
|
|
<p><strong>{% trans "Date" %}:</strong> {{ quotation.created_at|date }}</p>
|
|
<p><strong>{% trans "Remarks" %}:</strong> {{ quotation.remarks }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<h5 class="mt-4">{% trans "Car Details" %}</h5>
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "VIN" %}</th>
|
|
<th>{% trans "Model" %}</th>
|
|
<th>{% trans "Year" %}</th>
|
|
<th>{% trans "Quantity" %}</th>
|
|
<th>{% trans "Price" %}</th>
|
|
<th>{% trans "VAT" %}</th>
|
|
<th>{% trans "Total" %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in quotation.quotation_cars.all %}
|
|
<tr>
|
|
<td>{{ item.car.vin }}</td>
|
|
<td>{{ item.car.id_car_model.get_local_name }}</td>
|
|
<td>{{ item.car.year }}</td>
|
|
<td>{{ item.quantity }}</td>
|
|
<td>{{ item.car.finances.selling_price }}</td>
|
|
<td>{{ 0.15 }}</td>
|
|
<td>{{ item.total }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th colspan="3">{% trans "Totals" %}</th>
|
|
<th>{{ quotation.total_quantity }}</th>
|
|
<th>{{ total_sales_before_vat }}</th>
|
|
<th>{{ vat_amount }}</th>
|
|
<th>{{ total_sales_after_vat }}</th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
|
|
<h5 class="mt-4">{% trans "Additional Costs" %}</h5>
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "Additions" %}</th>
|
|
<th>{% trans "Cost" %}</th>
|
|
<th>{% trans "VAT %" %}</th>
|
|
<th>{% trans "Total Cost with VAT" %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for service in services %}
|
|
<tr>
|
|
<td>{{service.name}}</td>
|
|
<td>{{ service.price }}</td>
|
|
<td>{{ service.vated }}</td>
|
|
<td>{{ service.total_price_vat }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
<tr>
|
|
<td></td>
|
|
<td>{{ total_cost }}</td>
|
|
<td>{{ total_vat }}</td>
|
|
<td>{{ total_cost_vat }}</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="card-footer text-end">
|
|
<a href="{% url 'quotation_list' %}" class="btn btn-secondary">{% trans "Back to Quotations" %}</a>
|
|
{% if perms.inventory.change_carfinance and quotation.status == 'DRAFT' %}
|
|
<button class="btn btn-success" data-bs-toggle="modal" data-bs-target="#customCardModal">{% trans "Approve Quotation" %}</button>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |