diff --git a/include/stock.php b/include/stock.php index 1e52d7c8..00dd1105 100644 --- a/include/stock.php +++ b/include/stock.php @@ -13,8 +13,6 @@ function () use ($action, &$cmsmain) { if (!$ajax) { initlist(); - listsetting('maxlimit', 500); - $cmsmain->assign('title', 'Manage Boxes'); listsetting('search', ['box_id', 'l.label', 's.label', 'g.label', 'p.name', 'stock.comments']); @@ -115,7 +113,8 @@ function get_filter2_query($applied_filter, $custom_outgoing_locations) ($_SESSION['filter4']['stock'] ? ' AND (p.category_id = '.$_SESSION['filter4']['stock'].')' : ''); $data = getlistdata($query); - + $totalboxes = 0; + $totalitems = 0; foreach ($data as $key => $value) { if ($data[$key]['ordered']) { $data[$key]['order'] = '1'; @@ -124,13 +123,8 @@ function get_filter2_query($applied_filter, $custom_outgoing_locations) } else { $data[$key]['order'] = '0'; } - } - - $totalboxes = 0; - $totalitems = 0; - foreach ($data as $key => $d) { ++$totalboxes; - $totalitems += $d['items']; + $totalitems += $value['items']; } addcolumn('text', 'Box ID', 'box_id'); @@ -154,11 +148,6 @@ function get_filter2_query($applied_filter, $custom_outgoing_locations) addbutton('order', 'Order from warehouse', ['icon' => 'fa-shopping-cart', 'disableif' => true]); addbutton('undo-order', 'Undo order', ['icon' => 'fa-undo']); - // Notify the user of the limit on the number of records - if (count($data) >= 500) { - $cmsmain->assign('notification', 'Only the first 500 boxes are shown. Use the filter and search to find the rest.'); - } - $cmsmain->assign('firstline', ['Total', '', '', '', $totalboxes.' boxes', $totalitems.' items', '', '']); $cmsmain->assign('listfooter', ['Total', '', '', '', $totalboxes.' boxes', $totalitems.' items', '', '']);