46 |
* \brief Constructeur. Definit les noms, constantes et boites |
* \brief Constructeur. Definit les noms, constantes et boites |
47 |
* \param DB handler d'accès base |
* \param DB handler d'accès base |
48 |
*/ |
*/ |
49 |
function modCommercial($DB) |
function modCommercial($DB) |
50 |
{ |
{ |
51 |
$this->db = $DB ; |
$this->db = $DB ; |
52 |
$this->numero = 2 ; |
$this->numero = 2 ; |
53 |
|
|
54 |
|
$this->family = "crm"; |
55 |
|
$this->name = "Commercial"; |
56 |
|
$this->description = "Gestion commercial"; |
57 |
|
|
58 |
|
$this->revision = explode(" ","$Revision$"); |
59 |
|
$this->version = $this->revision[1]; |
60 |
|
|
61 |
|
$this->const_name = "MAIN_MODULE_COMMERCIAL"; |
62 |
|
$this->const_config = MAIN_MODULE_COMMERCIAL; |
63 |
|
$this->special = 0; |
64 |
|
$this->picto='commercial'; |
65 |
|
|
66 |
|
// Dir |
67 |
|
$this->dirs = array(); |
68 |
|
|
69 |
|
// Dépendances |
70 |
|
$this->depends = array("modSociete"); |
71 |
|
$this->requiredby = array("modPropale","modContrat","modCommande",); |
72 |
|
|
73 |
|
// Constantes |
74 |
|
$this->const = array(); |
75 |
|
|
76 |
|
// Boxes |
77 |
|
$this->boxes = array(); |
78 |
|
$this->boxes[0][0] = "Derniers clients"; |
79 |
|
$this->boxes[0][1] = "box_clients.php"; |
80 |
|
$this->boxes[1][0] = "Derniers prospects enregistrés"; |
81 |
|
$this->boxes[1][1] = "box_prospect.php"; |
82 |
|
|
83 |
|
// Permissions |
84 |
|
$this->rights = array(); |
85 |
|
$this->rights_class = 'commercial'; |
86 |
|
$r = 1; |
87 |
|
|
88 |
|
// 261 : Permission générale |
89 |
|
$this->rights[$r][0] = 261; |
90 |
|
$this->rights[$r][1] = 'Informations commerciales'; |
91 |
|
$this->rights[$r][2] = 'r'; |
92 |
|
$this->rights[$r][3] = 1; |
93 |
|
$this->rights[$r][4] = 'main'; |
94 |
|
$this->rights[$r][5] = 'lire'; |
95 |
|
$r++; |
96 |
|
} |
97 |
|
|
98 |
|
/** |
99 |
|
* \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module. |
100 |
|
* Définit également les répertoires de données à créer pour ce module. |
101 |
|
*/ |
102 |
|
function init() |
103 |
|
{ |
104 |
|
// Permissions |
105 |
|
$this->remove(); |
106 |
|
|
107 |
|
$sql = array(); |
108 |
|
|
109 |
$this->family = "crm"; |
return $this->_init($sql); |
110 |
$this->name = "Commercial"; |
} |
|
$this->description = "Gestion commercial"; |
|
|
|
|
|
$this->revision = explode(" ","$Revision$"); |
|
|
$this->version = $this->revision[1]; |
|
|
|
|
|
$this->const_name = "MAIN_MODULE_COMMERCIAL"; |
|
|
$this->const_config = MAIN_MODULE_COMMERCIAL; |
|
|
$this->special = 0; |
|
|
$this->picto='commercial'; |
|
|
|
|
|
// Dir |
|
|
$this->dirs = array(); |
|
|
|
|
|
// Dépendances |
|
|
$this->depends = array("modSociete"); |
|
|
$this->requiredby = array("modPropale","modContrat","modCommande",); |
|
|
|
|
|
// Constantes |
|
|
$this->const = array(); |
|
|
|
|
|
// Boxes |
|
|
$this->boxes = array(); |
|
|
$this->boxes[0][0] = "Derniers clients"; |
|
|
$this->boxes[0][1] = "box_clients.php"; |
|
|
$this->boxes[1][0] = "Derniers prospects enregistrés"; |
|
|
$this->boxes[1][1] = "box_prospect.php"; |
|
|
|
|
|
// Permissions |
|
|
$this->rights = array(); |
|
|
$this->rights_class = 'commercial'; |
|
|
} |
|
|
|
|
|
/** |
|
|
* \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module. |
|
|
* Définit également les répertoires de données à créer pour ce module. |
|
|
*/ |
|
|
function init() |
|
|
{ |
|
|
$sql = array(); |
|
|
|
|
|
// Permissions |
|
|
$this->remove(); |
|
|
$r = 1; |
|
|
|
|
|
// 261 : Permission générale |
|
|
$this->rights[$r][0] = 261; |
|
|
$this->rights[$r][1] = 'Informations commerciales'; |
|
|
$this->rights[$r][2] = 'r'; |
|
|
$this->rights[$r][3] = 1; |
|
|
$this->rights[$r][4] = 'main'; |
|
|
$this->rights[$r][5] = 'lire'; |
|
|
$r++; |
|
|
|
|
|
return $this->_init($sql); |
|
|
} |
|
111 |
|
|
112 |
/** |
/** |
113 |
* \brief Fonction appelée lors de la désactivation d'un module. |
* \brief Fonction appelée lors de la désactivation d'un module. |
114 |
* Supprime de la base les constantes, boites et permissions du module. |
* Supprime de la base les constantes, boites et permissions du module. |
115 |
*/ |
*/ |
116 |
function remove() |
function remove() |
117 |
{ |
{ |
118 |
$sql = array(); |
$sql = array(); |
119 |
|
|
120 |
return $this->_remove($sql); |
return $this->_remove($sql); |
121 |
} |
} |
122 |
} |
} |
123 |
?> |
?> |