mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	Refactor purchase order page
This commit is contained in:
		@@ -53,15 +53,17 @@
 | 
				
			|||||||
    <span class='fas fa-shopping-cart icon-blue'></span>
 | 
					    <span class='fas fa-shopping-cart icon-blue'></span>
 | 
				
			||||||
</button>
 | 
					</button>
 | 
				
			||||||
{% elif order.status == PurchaseOrderStatus.PLACED %}
 | 
					{% elif order.status == PurchaseOrderStatus.PLACED %}
 | 
				
			||||||
<button type='button' class='btn btn-outline-secondary' id='receive-order' title='{% trans "Receive items" %}'>
 | 
					<button type='button' class='btn btn-primary' id='receive-order' title='{% trans "Receive items" %}'>
 | 
				
			||||||
    <span class='fas fa-sign-in-alt icon-blue'></span>
 | 
					    <span class='fas fa-sign-in-alt'></span>
 | 
				
			||||||
 | 
					    {% trans "Receive Items" %}
 | 
				
			||||||
</button>
 | 
					</button>
 | 
				
			||||||
<button type='button' class='btn btn-outline-secondary' id='complete-order' title='{% trans "Mark order as complete" %}'>
 | 
					<button type='button' class='btn btn-success' id='complete-order' title='{% trans "Mark order as complete" %}'>
 | 
				
			||||||
    <span class='fas fa-check-circle icon-green'></span>
 | 
					    <span class='fas fa-check-circle'></span>
 | 
				
			||||||
 | 
					    {% trans "Complete Order" %}
 | 
				
			||||||
</button>
 | 
					</button>
 | 
				
			||||||
{% endif %}
 | 
					{% endif %}
 | 
				
			||||||
{% endif %}
 | 
					{% endif %}
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock actions %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block thumbnail %}
 | 
					{% block thumbnail %}
 | 
				
			||||||
<img class='part-thumb'
 | 
					<img class='part-thumb'
 | 
				
			||||||
@@ -75,24 +77,18 @@ src="{% static 'img/blank_image.png' %}"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
{% block details %}
 | 
					{% block details %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<h4>
 | 
					<table class='table table-striped table-condensed'>
 | 
				
			||||||
    {% purchase_order_status_label order.status large=True %}
 | 
					 | 
				
			||||||
    {% if order.is_overdue %}
 | 
					 | 
				
			||||||
    <span class='badge rounded-pill bg-danger'>{% trans "Overdue" %}</span>
 | 
					 | 
				
			||||||
    {% endif %}
 | 
					 | 
				
			||||||
</h4>
 | 
					 | 
				
			||||||
<p>{{ order.description }}{% include "clip.html"%}</p>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% endblock %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% block details_right %}
 | 
					 | 
				
			||||||
<table class='table'>
 | 
					 | 
				
			||||||
    <col width='25'>
 | 
					    <col width='25'>
 | 
				
			||||||
    <tr>
 | 
					    <tr>
 | 
				
			||||||
        <td><span class='fas fa-hashtag'></span></td>
 | 
					        <td><span class='fas fa-hashtag'></span></td>
 | 
				
			||||||
        <td>{% trans "Order Reference" %}</td>
 | 
					        <td>{% trans "Order Reference" %}</td>
 | 
				
			||||||
        <td>{% settings_value 'PURCHASEORDER_REFERENCE_PREFIX' %}{{ order.reference }}{% include "clip.html"%}</td>
 | 
					        <td>{% settings_value 'PURCHASEORDER_REFERENCE_PREFIX' %}{{ order.reference }}{% include "clip.html"%}</td>
 | 
				
			||||||
    </tr>
 | 
					    </tr>
 | 
				
			||||||
 | 
					    <tr>
 | 
				
			||||||
 | 
					        <td><span class='fas fa-info-circle'></span></td>
 | 
				
			||||||
 | 
					        <td>{% trans "Order Description" %}</td>
 | 
				
			||||||
 | 
					        <td>{{ order.description }}{% include "clip.html" %}</td>
 | 
				
			||||||
 | 
					    </tr>
 | 
				
			||||||
    <tr>
 | 
					    <tr>
 | 
				
			||||||
        <td><span class='fas fa-info'></span></td>
 | 
					        <td><span class='fas fa-info'></span></td>
 | 
				
			||||||
        <td>{% trans "Order Status" %}</td>
 | 
					        <td>{% trans "Order Status" %}</td>
 | 
				
			||||||
@@ -103,6 +99,14 @@ src="{% static 'img/blank_image.png' %}"
 | 
				
			|||||||
            {% endif %}
 | 
					            {% endif %}
 | 
				
			||||||
        </td>
 | 
					        </td>
 | 
				
			||||||
    </tr>
 | 
					    </tr>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% block details_right %}
 | 
				
			||||||
 | 
					<table class='table table-condensed table-striped'>
 | 
				
			||||||
 | 
					    <col width='25'>
 | 
				
			||||||
    <tr>
 | 
					    <tr>
 | 
				
			||||||
        <td><span class='fas fa-building'></span></td>
 | 
					        <td><span class='fas fa-building'></span></td>
 | 
				
			||||||
        <td>{% trans "Supplier" %}</td>
 | 
					        <td>{% trans "Supplier" %}</td>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,7 +27,7 @@
 | 
				
			|||||||
                    <span class='fas fa-plus-circle'></span> {% trans "Add Line Item" %}
 | 
					                    <span class='fas fa-plus-circle'></span> {% trans "Add Line Item" %}
 | 
				
			||||||
                </button>
 | 
					                </button>
 | 
				
			||||||
                {% elif order.status == PurchaseOrderStatus.PLACED %}
 | 
					                {% elif order.status == PurchaseOrderStatus.PLACED %}
 | 
				
			||||||
                <button type='button' class='btn btn-success' id='receive-selected-items' title='{% trans "Receive selected items" %}'>
 | 
					                <button type='button' class='btn btn-primary' id='receive-selected-items' title='{% trans "Receive selected items" %}'>
 | 
				
			||||||
                    <span class='fas fa-sign-in-alt'></span> {% trans "Receive Items" %}
 | 
					                    <span class='fas fa-sign-in-alt'></span> {% trans "Receive Items" %}
 | 
				
			||||||
                </button>
 | 
					                </button>
 | 
				
			||||||
                {% endif %}
 | 
					                {% endif %}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -68,7 +68,7 @@ src="{% static 'img/blank_image.png' %}"
 | 
				
			|||||||
</button>
 | 
					</button>
 | 
				
			||||||
{% endif %}
 | 
					{% endif %}
 | 
				
			||||||
{% endif %}
 | 
					{% endif %}
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock actions %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block details %}
 | 
					{% block details %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -84,6 +84,16 @@ src="{% static 'img/blank_image.png' %}"
 | 
				
			|||||||
        <td>{% trans "Order Description" %}</td>
 | 
					        <td>{% trans "Order Description" %}</td>
 | 
				
			||||||
        <td>{{ order.description }}{% include "clip.html" %}</td>
 | 
					        <td>{{ order.description }}{% include "clip.html" %}</td>
 | 
				
			||||||
    </tr>
 | 
					    </tr>
 | 
				
			||||||
 | 
					    <tr>
 | 
				
			||||||
 | 
					        <td><span class='fas fa-info'></span></td>
 | 
				
			||||||
 | 
					        <td>{% trans "Order Status" %}</td>
 | 
				
			||||||
 | 
					        <td>
 | 
				
			||||||
 | 
					            {% sales_order_status_label order.status %}
 | 
				
			||||||
 | 
					            {% if order.is_overdue %}
 | 
				
			||||||
 | 
					            <span class='badge rounded-pill bg-danger'>{% trans "Overdue" %}</span>
 | 
				
			||||||
 | 
					            {% endif %}
 | 
				
			||||||
 | 
					        </td>
 | 
				
			||||||
 | 
					    </tr>
 | 
				
			||||||
</table>
 | 
					</table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div class='info-messages'>
 | 
					<div class='info-messages'>
 | 
				
			||||||
@@ -99,16 +109,6 @@ src="{% static 'img/blank_image.png' %}"
 | 
				
			|||||||
{% block details_right %}
 | 
					{% block details_right %}
 | 
				
			||||||
<table class='table table-striped table-condensed'>
 | 
					<table class='table table-striped table-condensed'>
 | 
				
			||||||
    <col width='25'>
 | 
					    <col width='25'>
 | 
				
			||||||
    <tr>
 | 
					 | 
				
			||||||
        <td><span class='fas fa-info'></span></td>
 | 
					 | 
				
			||||||
        <td>{% trans "Order Status" %}</td>
 | 
					 | 
				
			||||||
        <td>
 | 
					 | 
				
			||||||
            {% sales_order_status_label order.status %}
 | 
					 | 
				
			||||||
            {% if order.is_overdue %}
 | 
					 | 
				
			||||||
            <span class='badge rounded-pill bg-danger'>{% trans "Overdue" %}</span>
 | 
					 | 
				
			||||||
            {% endif %}
 | 
					 | 
				
			||||||
        </td>
 | 
					 | 
				
			||||||
    </tr>
 | 
					 | 
				
			||||||
    {% if order.customer %}
 | 
					    {% if order.customer %}
 | 
				
			||||||
    <tr>
 | 
					    <tr>
 | 
				
			||||||
        <td><span class='fas fa-building'></span></td>
 | 
					        <td><span class='fas fa-building'></span></td>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user