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