Skip to content

Commit

Permalink
Fix error with item tag filter in items list
Browse files Browse the repository at this point in the history
  • Loading branch information
DidierViret committed Jan 19, 2022
2 parents 7bfac3c + 927ee0c commit e125b83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions orif/stock/Models/Item_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,12 @@ public function get_filtered($filters){
// Remove the last " OR "
$where_itemTagLinks = substr($where_itemTagLinks, 0, -4);

$item_tag_links = $this->item_tag_link_model->get_many_by($where_itemTagLinks);
$item_tag_links = $this->item_tag_link_model->where($where_itemTagLinks)->findAll();

// Prepare WHERE clause for all corresponding items
$where_itemTagsFilter .= '(';
foreach ($item_tag_links as $item_tag_link) {
$where_itemTagsFilter .= 'item_id='.$item_tag_link->item_id.' OR ';
$where_itemTagsFilter .= 'item_id='.$item_tag_link['item_id'].' OR ';
}
// Remove the last " OR "
if($where_itemTagsFilter != "(") {
Expand Down

0 comments on commit e125b83

Please sign in to comment.