/** * Delete batteries on computer * * @param $items_id integer id of the computer * * @return nothing * **/ static function cleanComputer($items_id) { $pfInventoryComputerBatteries = new PluginFusioninventoryInventoryComputerBatteries(); $a_batteries = $pfInventoryComputerBatteries->find("`computers_id`='" . $items_id . "'"); if (count($a_batteries) > 0) { $input = current($a_batteries); $pfInventoryComputerBatteries->delete($input); } }