Skip to content
Snippets Groups Projects
Commit ea860c3d authored by Rodolphe Quiedeville's avatar Rodolphe Quiedeville
Browse files

Positionnement du modèle de propale par défaut

parent 14b2a5fe
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ class modPropale
*/
$const[0][0] = "PROPALE_ADDON_PDF";
$const[0][1] = "chaine";
$const[0][2] = "propale_rouge";
$const[0][2] = "rouge";
foreach ($const as $key => $value)
{
......@@ -78,15 +78,9 @@ class modPropale
}
}
$sql = "INSERT INTO llx_boxes_def (name,file) VALUES('Proposition commerciales', 'box_propales.php');";
if ( $this->db->query($sql) )
{
}
/*
* Permissions
* Permissions et valeurs par dfaut
*/
$sql = array(
"insert into llx_rights_def values (20,'Tous les droits sur les propositions commerciales','propale','a',0);",
......@@ -95,7 +89,9 @@ class modPropale
"insert into llx_rights_def values (24,'Valider les propositions commerciales','propale','d',0);",
"insert into llx_rights_def values (25,'Envoyer les propositions commerciales aux clients','propale','d',0);",
"insert into llx_rights_def values (26,'Clturer les propositions commerciales','propale','d',0);",
"insert into llx_rights_def values (27,'Supprimer les propositions commerciales','propale','d',0);"
"insert into llx_rights_def values (27,'Supprimer les propositions commerciales','propale','d',0);",
"INSERT INTO llx_boxes_def (name,file) VALUES('Proposition commerciales', 'box_propales.php');",
"REPLACE INTO llx_propal_model_pdf SET nom = '".$const[0][2]."'"
);
//"insert into llx_rights_def values (23,'Modifier les propositions commerciales d\'autrui','propale','m',0);",
for ($i = 0 ; $i < sizeof($sql) ; $i++)
......@@ -112,16 +108,16 @@ class modPropale
Function remove()
{
$sql = "DELETE FROM llx_boxes_def WHERE file = 'box_propales.php';";
$sql = array(
"DELETE FROM llx_boxes_def WHERE file = 'box_propales.php';",
"DELETE FROM llx_rights_def WHERE module = 'propale';"
);
if ( $this->db->query($sql) )
for ($i = 0 ; $i < sizeof($sql) ; $i++)
{
$this->db->query($sql[$i]);
}
$sql = "DELETE FROM llx_rights_def WHERE module = 'propale';";
$this->db->query($sql);
}
}
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment