107 lines
4.0 KiB
HTML
107 lines
4.0 KiB
HTML
{% extends 'base.html' %}
|
|
{% load static %}
|
|
{% load indonesian_filters %}
|
|
|
|
{% block title %}Delivery List - Manufacturing App{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
|
<h1 class="h2">Delivery List</h1>
|
|
<div class="btn-toolbar mb-2 mb-md-0">
|
|
<a href="{% url 'sales:so_list' %}" class="btn btn-sm btn-outline-primary">
|
|
<i class="fas fa-arrow-left"></i> Back to Sales Orders
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
{% if messages %}
|
|
{% for message in messages %}
|
|
<div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
|
|
{{ message }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-hover">
|
|
<thead class="table-dark">
|
|
<tr>
|
|
<th>Delivery Number</th>
|
|
<th>Sales Order</th>
|
|
<th>Customer</th>
|
|
<th>Delivery Date</th>
|
|
<th>Total Items</th>
|
|
<th>Total Value</th>
|
|
<th>Status</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for delivery in deliveries %}
|
|
<tr>
|
|
<td><strong>{{ delivery.delivery_number }}</strong></td>
|
|
<td>
|
|
<a href="{% url 'sales:so_detail' delivery.so.so_number %}">
|
|
{{ delivery.so.so_number }}
|
|
</a>
|
|
</td>
|
|
<td>{{ delivery.so.customer.name }}</td>
|
|
<td>{{ delivery.delivery_date|date:"M d, Y" }}</td>
|
|
<td>{{ delivery.items.count }} items</td>
|
|
<td>{{ delivery.total_value|format_rupiah }}</td>
|
|
<td>
|
|
<span class="badge bg-success">Completed</span>
|
|
</td>
|
|
<td>
|
|
<div class="btn-group" role="group">
|
|
<a href="{% url 'sales:delivery_detail' delivery.delivery_number %}"
|
|
class="btn btn-sm btn-outline-primary" title="View">
|
|
<i class="fas fa-eye"></i>
|
|
</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="8" class="text-center text-muted">
|
|
No deliveries found.
|
|
<a href="{% url 'sales:so_list' %}">Create your first delivery from a sales order</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mt-4">
|
|
<div class="col-md-4">
|
|
<div class="card">
|
|
<div class="card-body text-center">
|
|
<h3 class="text-primary">{{ total_deliveries }}</h3>
|
|
<h6 class="text-muted">Total Deliveries</h6>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="card">
|
|
<div class="card-body text-center">
|
|
<h3 class="text-success">{{ total_value|format_rupiah }}</h3>
|
|
<h6 class="text-muted">Total Delivery Value</h6>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="card">
|
|
<div class="card-body text-center">
|
|
<h3 class="text-info">{{ deliveries|length }}</h3>
|
|
<h6 class="text-muted">Active Deliveries</h6>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |