62 lines
3.1 KiB
HTML
62 lines
3.1 KiB
HTML
{% extends "module_base.html" %}
|
|
{% load static %}
|
|
|
|
{% block title %}{{ action }} Manufacturing Order{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container-fluid">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4 class="card-title mb-0">
|
|
<i class="fas fa-question-circle text-warning me-2"></i>{{ action }} Manufacturing Order
|
|
</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
<p>Are you sure you want to {{ action|lower }} the following Manufacturing Order?</p>
|
|
|
|
<div class="alert alert-info">
|
|
<strong>MO Number:</strong> {{ mo.mo_number }}<br>
|
|
<strong>BOM:</strong> {{ mo.bom.bom_code }} - {{ mo.bom.product.name }}<br>
|
|
<strong>Quantity:</strong> {{ mo.quantity_to_produce|floatformat:2 }}<br>
|
|
<strong>Current Status:</strong> {{ mo.get_status_display }}
|
|
</div>
|
|
|
|
{% if action == 'Start' %}
|
|
<div class="alert alert-success">
|
|
<i class="fas fa-info-circle me-2"></i>
|
|
Starting this manufacturing order will change its status to "In Progress" and record the start date.
|
|
</div>
|
|
{% elif action == 'Complete' %}
|
|
<div class="alert alert-success">
|
|
<i class="fas fa-info-circle me-2"></i>
|
|
Completing this manufacturing order will change its status to "Completed" and record the completion date.
|
|
This will also update the inventory with the produced items.
|
|
</div>
|
|
{% elif action == 'Cancel' %}
|
|
<div class="alert alert-warning">
|
|
<i class="fas fa-exclamation-triangle me-2"></i>
|
|
Canceling this manufacturing order will change its status to "Cancelled".
|
|
This action cannot be undone.
|
|
</div>
|
|
{% endif %}
|
|
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
<div class="d-flex justify-content-end">
|
|
<a href="{% url 'manufacturing:mo_detail' mo.mo_number %}" class="btn btn-secondary me-2">
|
|
<i class="fas fa-times me-2"></i>Cancel
|
|
</a>
|
|
<button type="submit" class="btn btn-{% if action == 'Cancel' %}danger{% else %}success{% endif %}">
|
|
<i class="fas fa-{% if action == 'Start' %}play{% elif action == 'Complete' %}check{% else %}times{% endif %} me-2"></i>
|
|
Yes, {{ action }} MO
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |