mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add some more functionality to StockLocation page
This commit is contained in:
parent
2ea4824030
commit
e9bf4b4cef
@ -63,7 +63,7 @@
|
||||
<li>
|
||||
<a href='#' id='part-move'>
|
||||
<span class='fas fa-exchange-alt'></span>
|
||||
{% trans "Move part stock" %}
|
||||
{% trans "Transfer part stock" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -69,6 +69,12 @@
|
||||
{% trans "Count stock" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='#' id='location-move'>
|
||||
<span class='fas fa-exchange-alt'></span>
|
||||
{% trans "Transfer stock" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
@ -221,8 +227,8 @@
|
||||
});
|
||||
|
||||
{% if location %}
|
||||
$("#location-count").click(function() {
|
||||
|
||||
function adjustLocationStock(action) {
|
||||
inventreeGet(
|
||||
'{% url "api-stock-list" %}',
|
||||
{
|
||||
@ -233,7 +239,7 @@
|
||||
},
|
||||
{
|
||||
success: function(items) {
|
||||
adjustStock('count', items, {
|
||||
adjustStock(action, items, {
|
||||
onSuccess: function() {
|
||||
location.reload();
|
||||
}
|
||||
@ -241,6 +247,14 @@
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
$("#location-count").click(function() {
|
||||
adjustLocationStock('count');
|
||||
});
|
||||
|
||||
$("#location-move").click(function() {
|
||||
adjustLocationStock('move');
|
||||
});
|
||||
|
||||
$('#print-label').click(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user