Fixes for purchase order receive buttons (#5072)

This commit is contained in:
Oliver 2023-06-19 20:01:00 +10:00 committed by GitHub
parent 617ad6c233
commit 021a5a4081
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 21 deletions

View File

@ -80,10 +80,6 @@
<span class='fas fa-paper-plane'></span> {% trans "Issue Order" %}
</button>
{% elif order.is_open %}
<button type='button' class='btn btn-primary' id='receive-order' title='{% trans "Receive items" %}'>
<span class='fas fa-sign-in-alt'></span>
{% trans "Receive Items" %}
</button>
<button type='button' class='btn btn-success' id='complete-order' title='{% trans "Mark order as complete" %}'>
<span class='fas fa-check-circle'></span> {% trans "Complete Order" %}
</button>
@ -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(

View File

@ -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');