Modification des permissions pour accéder à la page
This commit is contained in:
parent
416376d563
commit
c2f3006f62
@ -31,6 +31,8 @@ require("./pre.inc.php");
|
|||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
|
if (!$user->rights->compta->ventiler) accessforbidden();
|
||||||
|
|
||||||
if ($_POST["action"] == 'ventil' && $user->rights->compta->ventiler)
|
if ($_POST["action"] == 'ventil' && $user->rights->compta->ventiler)
|
||||||
{
|
{
|
||||||
$sql = " UPDATE ".MAIN_DB_PREFIX."facturedet";
|
$sql = " UPDATE ".MAIN_DB_PREFIX."facturedet";
|
||||||
@ -58,12 +60,12 @@ $sql .= " ORDER BY numero ASC";
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$row = $db->fetch_row();
|
$row = $db->fetch_row($result);
|
||||||
$cgs[$row[0]] = $row[1] . ' ' . $row[2];
|
$cgs[$row[0]] = $row[1] . ' ' . $row[2];
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -75,7 +77,7 @@ if ($result)
|
|||||||
*/
|
*/
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
if($_GET["id"] && $user->rights->compta->ventiler)
|
if($_GET["id"])
|
||||||
{
|
{
|
||||||
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_taux, l.remise_percent, l.subprice, ".$db->pdate("l.date_start")." as date_start, ".$db->pdate("l.date_end")." as date_end, l.fk_code_ventilation ";
|
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_taux, l.remise_percent, l.subprice, ".$db->pdate("l.date_start")." as date_start, ".$db->pdate("l.date_end")." as date_end, l.fk_code_ventilation ";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user