Update from usntable branch.
[fa-stable.git] / manufacturing / includes / db / work_centres_db.inc
index 31736af58b70e6ff23794098e1b7ca5b2e507dc3..18adc74fdaceba36c7d3d5f195a11f05ab3bd00b 100644 (file)
@@ -25,9 +25,10 @@ function update_work_centre($type_id, $name, $description)
        db_query($sql, "could not update work centre");
 }
 
-function get_all_work_centres()
+function get_all_work_centres($all=false)
 {
        $sql = "SELECT * FROM ".TB_PREF."workcentres";
+       if (!$all) $sql .= " WHERE !inactive";
 
        return db_query($sql, "could not get all work centres");
 }