} $_SESSION['inventario'] = serialize($inventario); } else { $operation['ejecution'] = true; $operation['result'] = false; $operation['message'] = "Por favor diligencie todos los campos del formulario."; } echo json_encode($operation); } } if ($get->buscar) { $get->fecha = base64_decode($get->fecha); $get->item = base64_decode($get->item); if ($get->fecha != "" && $get->item != "") { $conexion = new Conexion(); $operation = Inventario::buscar($get->item, $get->fecha, $conexion); if (count($operation['result']) == 1) { $operation['message'] = "Se encontro " . count($operation['result']) . " registro."; } elseif (count($operation['result']) > 1) { $operation['message'] = "Se encontraron " . count($operation['result']) . " registros."; } else { $operation['message'] = "No se encuentran registros con los parametros ingresados."; } } else { $operation['ejecution'] = true; $operation['result'] = false; $operation['message'] = "Por favor diligencie los campos de busqueda."; } echo json_encode($operation); } if ($get->instanciar) {