From 021a5a40812dd47261e85e411a1814330c8106c1 Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 19 Jun 2023 20:01:00 +1000 Subject: [PATCH] Fixes for purchase order receive buttons (#5072) --- .../order/templates/order/order_base.html | 20 ------------------- .../order/purchase_order_detail.html | 3 ++- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/InvenTree/order/templates/order/order_base.html b/InvenTree/order/templates/order/order_base.html index dfa2d4f871..4f42be86d4 100644 --- a/InvenTree/order/templates/order/order_base.html +++ b/InvenTree/order/templates/order/order_base.html @@ -80,10 +80,6 @@ {% trans "Issue Order" %} {% elif order.is_open %} - @@ -277,22 +273,6 @@ $("#edit-order").click(function() { }); }); -$("#receive-order").click(function() { - - // Auto select items which have not been fully allocated - var items = getTableData('#po-line-table'); - - receivePurchaseOrderItems( - {{ order.id }}, - items, - { - success: function() { - $("#po-line-table").bootstrapTable('refresh'); - } - } - ); -}); - $("#complete-order").click(function() { completePurchaseOrder( diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index 1994be41da..2918bd616f 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -187,8 +187,9 @@ $('#new-po-line').click(function() { } }); }); +{% endif %} -{% elif order.status == PurchaseOrderStatus.PLACED %} +{% if order.status == PurchaseOrderStatus.PLACED %} $('#receive-selected-items').click(function() { let items = getTableData('#po-line-table');