29include_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");
70 $this->
const = array();
73 $this->
const[$r][0] =
"DON_ADDON_MODEL";
74 $this->
const[$r][1] =
"chaine";
75 $this->
const[$r][2] =
"html_cerfafr";
76 $this->
const[$r][3] =
'Nom du gestionnaire de generation de recu de dons';
77 $this->
const[$r][4] = 0;
80 $this->
const[$r][0] =
"DONATION_ART200";
81 $this->
const[$r][1] =
"yesno";
82 $this->
const[$r][2] =
"0";
83 $this->
const[$r][3] =
'Option Française - Eligibilité Art200 du CGI';
84 $this->
const[$r][4] = 0;
87 $this->
const[$r][0] =
"DONATION_ART238";
88 $this->
const[$r][1] =
"yesno";
89 $this->
const[$r][2] =
"0";
90 $this->
const[$r][3] =
'Option Française - Eligibilité Art238 bis du CGI';
91 $this->
const[$r][4] = 0;
94 $this->
const[$r][0] =
"DONATION_ART978";
95 $this->
const[$r][1] =
"yesno";
96 $this->
const[$r][2] =
"0";
97 $this->
const[$r][3] =
'Option Française - Eligibilité Art978 du CGI';
98 $this->
const[$r][4] = 0;
101 $this->
const[$r][0] =
"DONATION_MESSAGE";
102 $this->
const[$r][1] =
"chaine";
103 $this->
const[$r][2] =
"Thank you";
104 $this->
const[$r][3] =
'Message affiché sur le récépissé de versements ou dons';
105 $this->
const[$r][4] = 0;
108 $this->
const[$r][0] =
"DONATION_ACCOUNTINGACCOUNT";
109 $this->
const[$r][1] =
"chaine";
110 $this->
const[$r][2] =
"758";
111 $this->
const[$r][3] =
'Compte comptable de remise des versements ou dons';
112 $this->
const[$r][4] = 0;
115 $this->boxes = array();
118 $this->rights = array();
119 $this->rights_class =
'don';
121 $this->rights[1][0] = 701;
122 $this->rights[1][1] =
'Lire les dons';
123 $this->rights[1][2] =
'r';
124 $this->rights[1][3] = 1;
125 $this->rights[1][4] =
'lire';
127 $this->rights[2][0] = 702;
128 $this->rights[2][1] =
'Creer/modifier les dons';
129 $this->rights[2][2] =
'w';
130 $this->rights[2][3] = 0;
131 $this->rights[2][4] =
'creer';
133 $this->rights[3][0] = 703;
134 $this->rights[3][1] =
'Supprimer les dons';
135 $this->rights[3][2] =
'd';
136 $this->rights[3][3] = 0;
137 $this->rights[3][4] =
'supprimer';
154 public function init($options =
'')
158 $result = $this->
_load_tables(
'/install/mysql/',
'don');
164 "DELETE FROM ".MAIN_DB_PREFIX.
"document_model WHERE nom = '".$this->db->escape($this->const[0][2]).
"' AND type = 'donation' AND entity = ".((
int) $conf->entity),
165 "INSERT INTO ".MAIN_DB_PREFIX.
"document_model (nom, type, entity) VALUES('".$this->db->escape($this->const[0][2]).
"','donation',".((
int) $conf->entity).
")",
168 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.