/** * dispatchedOrders * * @return string Array of id of orders wit all dispathing already done or not required */ function dispatchedOrders() { global $db; $sql = 'SELECT rowid FROM ' . MAIN_DB_PREFIX . 'commande_fournisseur'; $resql = $db->query($sql); $resarray = array(); if ($resql && $db->num_rows($resql) > 0) { while ($obj = $db->fetch_object($resql)) { if (!dolDispatchToDo($obj->rowid)) { $resarray[] = $obj->rowid; } } } if (count($resarray)) { $res = '(' . implode(',', $resarray) . ')'; } else { //hack to make sure ordered SQL request won't syntax error $res = '(0)'; } return $res; }
'<td class="liste_titre" align="right">'; $src = DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png'; $value = dol_escape_htmltag($langs->trans('Search')); print '<input type="image" class="liste_titre" name="button_search" src="' . $src . '" value="' . $value . '" title="' . $value . '">'. '</td>'. '</tr>'; $var = true; $userstatic = new User($db); while ($i < min($num,$conf->liste_limit)) { $obj = $db->fetch_object($resql); $var = !$var; $showline = dolDispatchToDo($obj->rowid) && (!$sproduct || in_array($sproduct, getProducts($obj->rowid))); if ($showline) { $href = DOL_URL_ROOT . '/fourn/commande/card.php?id=' . $obj->rowid; print '<tr ' . $bc[$var] . '>'. // Ref '<td>'. '<a href="' . $href . '">'. img_object($langs->trans('ShowOrder'), 'order') . ' ' . $obj->ref. '</a></td>'; // Company $href = DOL_URL_ROOT . '/fourn/card.php?socid=' . $obj->socid; print '<td>'. '<a href="' . $href .'">'.