118 lines
5.2 KiB
HTML
118 lines
5.2 KiB
HTML
{% extends 'base.html' %}
|
|
{% load indonesian_filters %}
|
|
|
|
{% block title %}Goods Receipts - Manufacturing App{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container-fluid mt-4">
|
|
<!-- Header -->
|
|
<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">Goods Receipts</h1>
|
|
<div class="btn-toolbar mb-2 mb-md-0">
|
|
<a href="{% url 'purchasing:po_list' %}" class="btn btn-sm btn-outline-primary">
|
|
<i class="fas fa-arrow-left"></i> Back to Purchase 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 %}
|
|
|
|
<!-- Goods Receipts Table -->
|
|
<div class="card">
|
|
<div class="card-body">
|
|
{% if grs %}
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>GR Number</th>
|
|
<th>PO Number</th>
|
|
<th>Supplier</th>
|
|
<th>Receipt Date</th>
|
|
<th>Received By</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for gr in grs %}
|
|
<tr>
|
|
<td>
|
|
<strong>{{ gr.gr_number }}</strong>
|
|
</td>
|
|
<td>
|
|
<a href="{% url 'purchasing:po_detail' gr.po.po_number %}">
|
|
{{ gr.po.po_number }}
|
|
</a>
|
|
</td>
|
|
<td>{{ gr.po.supplier.name }}</td>
|
|
<td>{{ gr.receipt_date|date:"M d, Y" }}</td>
|
|
<td>
|
|
{% if gr.received_by %}
|
|
{{ gr.received_by.get_full_name|default:gr.received_by.username }}
|
|
{% else %}
|
|
<span class="text-muted">Not specified</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<div class="btn-group" role="group">
|
|
<a href="{% url 'purchasing:gr_detail' gr.gr_number %}"
|
|
class="btn btn-sm btn-outline-primary"
|
|
title="View goods receipt">
|
|
<i class="fas fa-eye"></i>
|
|
</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- Summary Statistics -->
|
|
<div class="mt-3 row">
|
|
<div class="col-md-4">
|
|
<div class="card bg-light">
|
|
<div class="card-body text-center">
|
|
<h6 class="card-title">Total Receipts</h6>
|
|
<h4 class="text-primary">{{ grs.count }}</h4>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="card bg-light">
|
|
<div class="card-body text-center">
|
|
<h6 class="card-title">This Month</h6>
|
|
<h4 class="text-info">{{ grs.count }}</h4>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="card bg-light">
|
|
<div class="card-body text-center">
|
|
<h6 class="card-title">Active Suppliers</h6>
|
|
<h4 class="text-success">{{ grs.count }}</h4>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="text-center text-muted py-5">
|
|
<i class="fas fa-truck-loading fa-4x mb-4"></i>
|
|
<h4>No Goods Receipts Found</h4>
|
|
<p>Start by creating a goods receipt for a purchase order.</p>
|
|
<a href="{% url 'purchasing:po_list' %}" class="btn btn-primary btn-lg">
|
|
<i class="fas fa-shopping-cart"></i> View Purchase Orders
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |