diff --git a/public/viewjs/stockoverview.js b/public/viewjs/stockoverview.js
index d94bd5b8..c3ce34a9 100644
--- a/public/viewjs/stockoverview.js
+++ b/public/viewjs/stockoverview.js
@@ -4,9 +4,9 @@
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 },
+ { 'searchable': false, "targets": 0 },
{ 'visible': false, 'targets': 4 },
- { 'visible': false, 'targets': 5 },
- { 'visible': false, 'targets': 6 }
+ { 'visible': false, 'targets': 5 }
],
});
$('#stock-overview-table tbody').removeClass("d-none");
@@ -20,7 +20,7 @@ $("#location-filter").on("change", function()
value = "";
}
- stockOverviewTable.column(4).search(value).draw();
+ stockOverviewTable.column(5).search(value).draw();
});
$("#product-group-filter").on("change", function()
@@ -31,7 +31,7 @@ $("#product-group-filter").on("change", function()
value = "";
}
- stockOverviewTable.column(6).search(value).draw();
+ stockOverviewTable.column(2).search(value).draw();
});
$("#status-filter").on("change", function()
@@ -45,7 +45,7 @@ $("#status-filter").on("change", function()
// Transfer CSS classes of selected element to dropdown element (for background)
$(this).attr("class", $("#" + $(this).attr("id") + " option[value='" + value + "']").attr("class") + " form-control");
- stockOverviewTable.column(5).search(value).draw();
+ stockOverviewTable.column(6).search(value).draw();
});
$(".status-filter-message").on("click", function()
diff --git a/views/stockoverview.blade.php b/views/stockoverview.blade.php
index a1e5077e..d2c87e3f 100644
--- a/views/stockoverview.blade.php
+++ b/views/stockoverview.blade.php
@@ -104,11 +104,11 @@
|
{{ $__t('Product') }} |
+ {{ $__t('Product Group') }} |
{{ $__t('Amount') }} |
{{ $__t('Next best before date') }} |
Hidden location |
Hidden status |
- Hidden product group |
@include('components.userfields_thead', array(
'userfields' => $userfields
@@ -206,6 +206,10 @@
{{ FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name }}
|
+ @php $productGroup = FindObjectInArrayByPropertyValue($productGroups, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->product_group_id) @endphp
+
+ @if($productGroup !== null){{ $productGroup->name }}@endif
+ |
{{ $currentStockEntry->amount }} {{ $__n($currentStockEntry->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name_plural) }}
@if($currentStockEntry->amount_opened > 0){{ $__t('%s opened', $currentStockEntry->amount_opened) }}@endif
@@ -239,10 +243,6 @@
|
@if($currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime('-1 days')) && $currentStockEntry->amount > 0) expired @elseif($currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime("+$nextXDays days")) && $currentStockEntry->amount > 0) expiring @endif @if(FindObjectInArrayByPropertyValue($missingProducts, 'id', $currentStockEntry->product_id) !== null) belowminstockamount @endif
|
- @php $productGroup = FindObjectInArrayByPropertyValue($productGroups, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->product_group_id) @endphp
-
- @if($productGroup !== null){{ $productGroup->name }}@endif
- |
@include('components.userfields_tbody', array(
'userfields' => $userfields,