Adds ability to export stock "assigned" to a particular customer

This commit is contained in:
Oliver 2022-03-03 17:31:25 +11:00
parent 10cc72910d
commit 73a32f66c8

View File

@ -169,8 +169,13 @@
</div> </div>
<div class='panel-content'> <div class='panel-content'>
<div id='assigned-stock-button-toolbar'> <div id='assigned-stock-button-toolbar'>
<div class='btn-group' role='group'>
<button class='btn btn-outline-secondary filter-button' id='assigned-stock-export' title='{% trans "Export Stock Information" %}'>
<span class='fas fa-download'></span>
</button>
{% include "filter_list.html" with id="customerstock" %} {% include "filter_list.html" with id="customerstock" %}
</div> </div>
</div>
<table class='table table-striped table-condensed' id='assigned-stock-table' data-toolbar='#assigned-stock-button-toolbar'></table> <table class='table table-striped table-condensed' id='assigned-stock-table' data-toolbar='#assigned-stock-button-toolbar'></table>
@ -228,6 +233,10 @@
filterTarget: '#filter-list-customerstock', filterTarget: '#filter-list-customerstock',
}); });
$('#assigned-stock-export').click(function() {
downloadTableData($('#assigned-stock-table'));
});
{% if company.is_customer %} {% if company.is_customer %}
loadSalesOrderTable("#sales-order-table", { loadSalesOrderTable("#sales-order-table", {
url: "{% url 'api-so-list' %}", url: "{% url 'api-so-list' %}",