mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-03 20:20:58 +00:00
Print test report for multiple stock items at once
This commit is contained in:
@ -29,8 +29,17 @@ function selectTestReport(reports, items, options={}) {
|
||||
);
|
||||
|
||||
// Construct form
|
||||
var html = `
|
||||
var html = '';
|
||||
|
||||
if (items.length > 0) {
|
||||
|
||||
html += `
|
||||
<div class='alert alert-block alert-info'>
|
||||
${items.length} {% trans "stock items selected" %}
|
||||
</div>`;
|
||||
}
|
||||
|
||||
html += `
|
||||
<form method='post' action='' class='js-modal-form' enctype='multipart/form-data'>
|
||||
<div class='form-group'>
|
||||
<label class='control-label requiredField' for='id_report'>
|
||||
|
@ -665,6 +665,7 @@ function loadStockTable(table, options) {
|
||||
}
|
||||
|
||||
// Automatically link button callbacks
|
||||
|
||||
$('#multi-item-print-label').click(function() {
|
||||
var selections = $('#stock-table').bootstrapTable('getSelections');
|
||||
|
||||
@ -677,6 +678,18 @@ function loadStockTable(table, options) {
|
||||
printStockItemLabels(items);
|
||||
});
|
||||
|
||||
$('#multi-item-print-test-report').click(function() {
|
||||
var selections = $('#stock-table').bootstrapTable('getSelections');
|
||||
|
||||
var items = [];
|
||||
|
||||
selections.forEach(function(item) {
|
||||
items.push(item.pk);
|
||||
});
|
||||
|
||||
printTestReports(items);
|
||||
})
|
||||
|
||||
$('#multi-item-stocktake').click(function() {
|
||||
stockAdjustment('count');
|
||||
});
|
||||
|
Reference in New Issue
Block a user