Debug v16
This commit is contained in:
parent
7a7d296533
commit
0104f00a7a
@ -33,10 +33,6 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
|||||||
|
|
||||||
$langs->loadLangs(array("products", "suppliers"));
|
$langs->loadLangs(array("products", "suppliers"));
|
||||||
|
|
||||||
if (!$user->rights->produit->lire && !$user->rights->service->lire) {
|
|
||||||
accessforbidden();
|
|
||||||
}
|
|
||||||
|
|
||||||
$sref = GETPOST('sref', 'alphanohtml');
|
$sref = GETPOST('sref', 'alphanohtml');
|
||||||
$sRefSupplier = GETPOST('srefsupplier');
|
$sRefSupplier = GETPOST('srefsupplier');
|
||||||
$snom = GETPOST('snom', 'alphanohtml');
|
$snom = GETPOST('snom', 'alphanohtml');
|
||||||
@ -72,13 +68,15 @@ $catid = GETPOST('catid', 'intcomma');
|
|||||||
$hookmanager->initHooks(array('supplierpricelist'));
|
$hookmanager->initHooks(array('supplierpricelist'));
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
|
if (empty($user->rights->produit->lire) && empty($user->rights->service->lire)) {
|
||||||
|
accessforbidden();
|
||||||
|
}
|
||||||
|
|
||||||
|
$permissiontoadd = ($user->hasRight('produit', 'lire') || $user->hasRight('service', 'lire'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ACTIONS
|
* Actions
|
||||||
*
|
|
||||||
* Put here all code to do according to value of "action" parameter
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (GETPOST('cancel', 'alpha')) {
|
if (GETPOST('cancel', 'alpha')) {
|
||||||
@ -228,7 +226,11 @@ if ($resql) {
|
|||||||
if ($optioncss != '') {
|
if ($optioncss != '') {
|
||||||
$param .= '&optioncss='.$optioncss;
|
$param .= '&optioncss='.$optioncss;
|
||||||
}
|
}
|
||||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords);
|
|
||||||
|
$newcardbutton = '';
|
||||||
|
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/list.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
|
||||||
|
|
||||||
|
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton);
|
||||||
|
|
||||||
if (!empty($catid)) {
|
if (!empty($catid)) {
|
||||||
print "<div id='ways'>";
|
print "<div id='ways'>";
|
||||||
@ -358,6 +360,12 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
|
// If no record found
|
||||||
|
if ($num == 0) {
|
||||||
|
$colspan = 8;
|
||||||
|
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print "</table></div>";
|
print "</table></div>";
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user