File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2807,7 +2807,7 @@ public static function searchParts(
28072807
28082808 $ keyword = trim ($ keyword );
28092809
2810- $ current_user ->tryDo (PermissionManager::PARTS , PartPermission::SEARCH );#
2810+ $ current_user ->tryDo (PermissionManager::PARTS , PartPermission::SEARCH );
28112811
28122812 //Let the user only search properties, for which he has access
28132813 $ part_name = $ part_name
@@ -2866,6 +2866,8 @@ public static function searchParts(
28662866
28672867
28682868 $ query = 'SELECT parts.* FROM parts ' ;
2869+
2870+ $ query .= ' LEFT JOIN categories ON parts.id_category=categories.id ' ;
28692871 if ($ footprint_name ) {
28702872 $ query .= ' LEFT JOIN footprints ON parts.id_footprint=footprints.id ' ;
28712873 }
@@ -2875,9 +2877,6 @@ public static function searchParts(
28752877 if ($ manufacturer_name ) {
28762878 $ query .= ' LEFT JOIN manufacturers ON parts.id_manufacturer=manufacturers.id ' ;
28772879 }
2878- if ($ category_name ) {
2879- $ query .= ' LEFT JOIN categories ON parts.id_category=categories.id ' ;
2880- }
28812880 if ($ supplierpartnr || $ supplier_name ) {
28822881 $ query .= ' LEFT JOIN orderdetails ON parts.id=orderdetails.part_id ' ;
28832882 $ query .= ' LEFT JOIN suppliers ON orderdetails.id_supplier=suppliers.id ' ;
You can’t perform that action at this time.
0 commit comments