mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Optionally include javascript code based on barcode feature
This commit is contained in:
parent
4641123cd8
commit
5e5bced0c7
@ -6,6 +6,7 @@
|
|||||||
* Requires api.js to be loaded first
|
* Requires api.js to be loaded first
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
{% settings_value 'BARCODE_ENABLE' as barcodes %}
|
||||||
|
|
||||||
function stockStatusCodes() {
|
function stockStatusCodes() {
|
||||||
return [
|
return [
|
||||||
@ -635,7 +636,9 @@ function loadStockTable(table, options) {
|
|||||||
table,
|
table,
|
||||||
[
|
[
|
||||||
'#stock-print-options',
|
'#stock-print-options',
|
||||||
|
{% if barcodes %}
|
||||||
'#stock-barcode-options',
|
'#stock-barcode-options',
|
||||||
|
{% endif %}
|
||||||
'#stock-options',
|
'#stock-options',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
@ -701,6 +704,7 @@ function loadStockTable(table, options) {
|
|||||||
printTestReports(items);
|
printTestReports(items);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
{% if barcodes %}
|
||||||
$('#multi-item-barcode-scan-into-location').click(function() {
|
$('#multi-item-barcode-scan-into-location').click(function() {
|
||||||
var selections = $('#stock-table').bootstrapTable('getSelections');
|
var selections = $('#stock-table').bootstrapTable('getSelections');
|
||||||
|
|
||||||
@ -712,6 +716,7 @@ function loadStockTable(table, options) {
|
|||||||
|
|
||||||
scanItemsIntoLocation(items);
|
scanItemsIntoLocation(items);
|
||||||
});
|
});
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
$('#multi-item-stocktake').click(function() {
|
$('#multi-item-stocktake').click(function() {
|
||||||
stockAdjustment('count');
|
stockAdjustment('count');
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load inventree_extras %}
|
{% load inventree_extras %}
|
||||||
|
|
||||||
|
{% settings_value 'BARCODE_ENABLE' as barcodes %}
|
||||||
|
|
||||||
{% setting_object 'STOCK_OWNERSHIP_CONTROL' as owner_control %}
|
{% setting_object 'STOCK_OWNERSHIP_CONTROL' as owner_control %}
|
||||||
{% if owner_control.value == "True" %}
|
{% if owner_control.value == "True" %}
|
||||||
{% authorized_owners location.owner as owners %}
|
{% authorized_owners location.owner as owners %}
|
||||||
@ -19,7 +21,6 @@
|
|||||||
<span class='fas fa-plus-circle'></span>
|
<span class='fas fa-plus-circle'></span>
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% settings_value 'BARCODE_ENABLE' as barcodes %}
|
|
||||||
{% if barcodes %}
|
{% if barcodes %}
|
||||||
<!-- Barcode actions menu -->
|
<!-- Barcode actions menu -->
|
||||||
<div class='btn-group'>
|
<div class='btn-group'>
|
||||||
|
Loading…
Reference in New Issue
Block a user