mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Selective display of sales order ilne buttons
This commit is contained in:
parent
429bb688d0
commit
41a4033427
@ -89,8 +89,10 @@ $("#so-lines-table").inventreeTable({
|
|||||||
var html = "<div class='btn-group float-right' role='group'>";
|
var html = "<div class='btn-group float-right' role='group'>";
|
||||||
var pk = row.pk;
|
var pk = row.pk;
|
||||||
|
|
||||||
|
{% if order.status == SalesOrderStatus.PENDING %}
|
||||||
html += makeIconButton('fa-edit', 'button-allocation-edit', pk, '{% trans "Edit stock allocation" %}');
|
html += makeIconButton('fa-edit', 'button-allocation-edit', pk, '{% trans "Edit stock allocation" %}');
|
||||||
html += makeIconButton('fa-trash-alt', 'button-allocation-delete', pk, '{% trans "Delete stock allocation" %}');
|
html += makeIconButton('fa-trash-alt', 'button-allocation-delete', pk, '{% trans "Delete stock allocation" %}');
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
|
|
||||||
@ -178,6 +180,7 @@ $("#so-lines-table").inventreeTable({
|
|||||||
|
|
||||||
var pk = row.pk;
|
var pk = row.pk;
|
||||||
|
|
||||||
|
{% if order.status == SalesOrderStatus.PENDING %}
|
||||||
if (row.part) {
|
if (row.part) {
|
||||||
var part = row.part_detail;
|
var part = row.part_detail;
|
||||||
|
|
||||||
@ -190,12 +193,13 @@ $("#so-lines-table").inventreeTable({
|
|||||||
}
|
}
|
||||||
|
|
||||||
html += makeIconButton('fa-plus', 'button-add', pk, '{% trans "Allocate parts" %}');
|
html += makeIconButton('fa-plus', 'button-add', pk, '{% trans "Allocate parts" %}');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
html += makeIconButton('fa-edit', 'button-edit', pk, '{% trans "Edit line item" %}');
|
html += makeIconButton('fa-edit', 'button-edit', pk, '{% trans "Edit line item" %}');
|
||||||
html += makeIconButton('fa-trash-alt', 'button-delete', pk, '{% trans "Delete line item " %}');
|
html += makeIconButton('fa-trash-alt', 'button-delete', pk, '{% trans "Delete line item " %}');
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
html += `</div>`;
|
html += `</div>`;
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
|
Loading…
Reference in New Issue
Block a user