30include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
48 $this->family =
"financial";
50 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
53 $this->version =
'dolibarr';
54 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
57 $this->picto =
'donation';
60 $this->dirs = array(
"/don/temp");
63 $this->depends = array();
64 $this->requiredby = array();
67 $this->config_page_url = array(
"donation.php@don");
75 'Nom du gestionnaire de generation de recu de dons',
82 'Option Française - Eligibilité Art200 du CGI',
89 'Option Française - Eligibilité Art238 bis du CGI',
96 'Option Française - Eligibilité Art978 du CGI',
103 'Message affiché sur le récépissé de versements ou dons',
107 "DONATION_ACCOUNTINGACCOUNT",
110 'Compte comptable de remise des versements ou dons',
116 $this->boxes = array();
119 $this->rights = array();
120 $this->rights_class =
'don';
122 $this->rights[1][0] = 701;
123 $this->rights[1][1] =
'Lire les dons';
124 $this->rights[1][2] =
'r';
125 $this->rights[1][3] = 0;
126 $this->rights[1][4] =
'lire';
128 $this->rights[2][0] = 702;
129 $this->rights[2][1] =
'Creer/modifier les dons';
130 $this->rights[2][2] =
'w';
131 $this->rights[2][3] = 0;
132 $this->rights[2][4] =
'creer';
134 $this->rights[3][0] = 703;
135 $this->rights[3][1] =
'Supprimer les dons';
136 $this->rights[3][2] =
'd';
137 $this->rights[3][3] = 0;
138 $this->rights[3][4] =
'supprimer';
155 public function init($options =
'')
159 $result = $this->
_load_tables(
'/install/mysql/',
'don');
165 "DELETE FROM ".MAIN_DB_PREFIX.
"document_model WHERE nom = '".$this->db->escape($this->const[0][2]).
"' AND type = 'donation' AND entity = ".((
int)
$conf->entity),
166 "INSERT INTO ".MAIN_DB_PREFIX.
"document_model (nom, type, entity) VALUES('".$this->db->escape($this->const[0][2]).
"','donation',".((
int)
$conf->entity).
")",
169 return $this->
_init($sql, $options);
_init($array_sql, $options='')
Enables a module.
_load_tables($reldir, $onlywithsuffix='')
Create tables and keys required by module:
Class to describe and enable module Donation.
__construct($db)
Constructor.
init($options='')
Function called when module is enabled.
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
$conf db name
Only used if Module[ID]Name translation string is not found.