mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Added count/add/remove to Part Stock Detail Page
This commit is contained in:
parent
3b6ef3f008
commit
002c047105
@ -16,8 +16,10 @@
|
|||||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options
|
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options
|
||||||
<span class="caret"></span></button>
|
<span class="caret"></span></button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href='#' id='multi-item-take' title='Take items from stock'>Take items</a></li>
|
||||||
|
<li><a href='#' id='multi-item-give' title='Give items to stock'>Add items</a></li>
|
||||||
<li><a href="#" id='multi-item-stocktake' title='Stocktake selected stock items'>Stocktake</a></li>
|
<li><a href="#" id='multi-item-stocktake' title='Stocktake selected stock items'>Stocktake</a></li>
|
||||||
<li><a href='#' id='multi-item-move' title='Move selected stock items'>Move</a></li>
|
<li><a href='#' id='multi-item-move' title='Move selected stock items'>Move items</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -110,16 +112,29 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#multi-item-stocktake").click(function() {
|
function _stock(action) {
|
||||||
var items = selectedStock();
|
adjustStock({
|
||||||
|
action: action,
|
||||||
countStockItems(items, {
|
items: selectedStock(),
|
||||||
success: function() {
|
success: function() {
|
||||||
$("#stock-table").bootstrapTable('refresh');
|
$('#stock-table').bootstrapTable('refresh');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#multi-item-stocktake").click(function() {
|
||||||
|
_stock('stocktake');
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#multi-item-take").click(function() {
|
||||||
|
_stock('remove');
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#multi-item-give").click(function() {
|
||||||
|
_stock('add');
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user