diff --git a/src/storage_locations.php b/src/storage_locations.php index 2f41bf0..09d079b 100644 --- a/src/storage_locations.php +++ b/src/storage_locations.php @@ -353,6 +353,28 @@ window.renderAllBarcodes = function() { container.appendChild(col); }); } + +window.printDiv = function(divId) { + var printContents = document.getElementById(divId).innerHTML; + var originalContents = document.body.innerHTML; + document.body.innerHTML = ` + + + `; + + setTimeout(function() { + window.print(); + document.body.innerHTML = originalContents; + window.location.reload(); + }, 500); +}