From 2b64af0d34d9310701b25c9ea37df01d8612859c Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Mon, 13 Sep 2021 16:17:34 -0500 Subject: [PATCH 1/3] Add a condition in the view 'print all assigned' from locations where it skips the assets in relation of if they're archived and that option is marked in the settings --- resources/views/locations/print.blade.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/views/locations/print.blade.php b/resources/views/locations/print.blade.php index 97fc15d958..3cc565fe03 100644 --- a/resources/views/locations/print.blade.php +++ b/resources/views/locations/print.blade.php @@ -122,11 +122,15 @@ @php - $counter = 1; + $counter = 1;; @endphp @foreach ($assets as $asset) - + @php + if($snipeSettings->show_archived_in_list != 1 && $asset->assetstatus->name === 'Archived'){ + continue; + } + @endphp {{ $counter }} {{ $asset->asset_tag }} From 1b433920f12b0aba636c9915c83e02a738a669d7 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Mon, 13 Sep 2021 16:24:12 -0500 Subject: [PATCH 2/3] Delete an extra semicolon --- resources/views/locations/print.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/locations/print.blade.php b/resources/views/locations/print.blade.php index 3cc565fe03..634f43aa4c 100644 --- a/resources/views/locations/print.blade.php +++ b/resources/views/locations/print.blade.php @@ -122,7 +122,7 @@ @php - $counter = 1;; + $counter = 1; @endphp @foreach ($assets as $asset) From 1ae665b6455ab72633fd2e2a72a55e3881e2bcf4 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Mon, 13 Sep 2021 16:45:05 -0500 Subject: [PATCH 3/3] Use the property 'archived' so if the 'name' one changes it doesn't fails --- resources/views/locations/print.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/locations/print.blade.php b/resources/views/locations/print.blade.php index 634f43aa4c..981c52e575 100644 --- a/resources/views/locations/print.blade.php +++ b/resources/views/locations/print.blade.php @@ -127,7 +127,7 @@ @foreach ($assets as $asset) @php - if($snipeSettings->show_archived_in_list != 1 && $asset->assetstatus->name === 'Archived'){ + if($snipeSettings->show_archived_in_list != 1 && $asset->assetstatus->archived == 1){ continue; } @endphp