From 87f1bd87e7a6da30d98d53fb58f593770e2c54d2 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 5 Oct 2021 16:52:24 +1100 Subject: [PATCH] Add button to receive selected items --- .../order/purchase_order_detail.html | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) 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', {