diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index 4262a810e0..2bc2c29617 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -18,13 +18,19 @@
- {% if order.status == PurchaseOrderStatus.PENDING and roles.purchase_order.change %} + {% if roles.purchase_order.change %} + {% if order.status == PurchaseOrderStatus.PENDING %} {% trans "Upload File" %} + {% elif order.status == PurchaseOrderStatus.PLACED %} + + {% endif %} {% endif %}
@@ -207,6 +213,22 @@ $('#new-po-line').click(function() { }); }); +{% elif order.status == PurchaseOrderStatus.PLACED %} + + $('#receive-selected-items').click(function() { + var items = $("#po-line-table").bootstrapTable('getSelections'); + + receivePurchaseOrderItems( + {{ order.id }}, + items, + { + success: function() { + $("#po-line-table").bootstrapTable('refresh'); + } + } + ); + }); + {% endif %} loadPurchaseOrderLineItemTable('#po-line-table', {