Fix for PurchaseOrder template (#4885)

- Fixes bug which removes javascript incorrectly
This commit is contained in:
Oliver 2023-05-24 16:18:54 +10:00 committed by GitHub
parent 4d00c471e1
commit 4079224658
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,6 +129,7 @@
{% endblock page_content %}
{% block js_ready %}
{% settings_value "PURCHASEORDER_EDIT_COMPLETED_ORDERS" as allow_extra_editing %}
{{ block.super }}
@ -173,7 +174,7 @@
filterkey: "postock"
});
{% if order.status == PurchaseOrderStatus.PENDING %}
{% if order.is_open or allow_extra_editing %}
$('#new-po-line').click(function() {
createPurchaseOrderLineItem({{ order.pk }}, {