29include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
47 $this->family =
"financial";
49 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
52 $this->version =
'dolibarr';
53 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
56 $this->picto =
'donation';
59 $this->dirs = array(
"/don/temp");
62 $this->depends = array();
63 $this->requiredby = array();
66 $this->config_page_url = array(
"donation.php@don");
69 $this->
const = array();
72 $this->
const[$r][0] =
"DON_ADDON_MODEL";
73 $this->
const[$r][1] =
"chaine";
74 $this->
const[$r][2] =
"html_cerfafr";
75 $this->
const[$r][3] =
'Nom du gestionnaire de generation de recu de dons';
76 $this->
const[$r][4] = 0;
79 $this->
const[$r][0] =
"DONATION_ART200";
80 $this->
const[$r][1] =
"yesno";
81 $this->
const[$r][2] =
"0";
82 $this->
const[$r][3] =
'Option Française - Eligibilité Art200 du CGI';
83 $this->
const[$r][4] = 0;
86 $this->
const[$r][0] =
"DONATION_ART238";
87 $this->
const[$r][1] =
"yesno";
88 $this->
const[$r][2] =
"0";
89 $this->
const[$r][3] =
'Option Française - Eligibilité Art238 bis du CGI';
90 $this->
const[$r][4] = 0;
93 $this->
const[$r][0] =
"DONATION_ART978";
94 $this->
const[$r][1] =
"yesno";
95 $this->
const[$r][2] =
"0";
96 $this->
const[$r][3] =
'Option Française - Eligibilité Art978 du CGI';
97 $this->
const[$r][4] = 0;
100 $this->
const[$r][0] =
"DONATION_MESSAGE";
101 $this->
const[$r][1] =
"chaine";
102 $this->
const[$r][2] =
"Thank you";
103 $this->
const[$r][3] =
'Message affiché sur le récépissé de versements ou dons';
104 $this->
const[$r][4] = 0;
107 $this->
const[$r][0] =
"DONATION_ACCOUNTINGACCOUNT";
108 $this->
const[$r][1] =
"chaine";
109 $this->
const[$r][2] =
"758";
110 $this->
const[$r][3] =
'Compte comptable de remise des versements ou dons';
111 $this->
const[$r][4] = 0;
114 $this->boxes = array();
117 $this->rights = array();
118 $this->rights_class =
'don';
120 $this->rights[1][0] = 701;
121 $this->rights[1][1] =
'Lire les dons';
122 $this->rights[1][2] =
'r';
123 $this->rights[1][3] = 0;
124 $this->rights[1][4] =
'lire';
126 $this->rights[2][0] = 702;
127 $this->rights[2][1] =
'Creer/modifier les dons';
128 $this->rights[2][2] =
'w';
129 $this->rights[2][3] = 0;
130 $this->rights[2][4] =
'creer';
132 $this->rights[3][0] = 703;
133 $this->rights[3][1] =
'Supprimer les dons';
134 $this->rights[3][2] =
'd';
135 $this->rights[3][3] = 0;
136 $this->rights[3][4] =
'supprimer';
153 public function init($options =
'')
157 $result = $this->
_load_tables(
'/install/mysql/',
'don');
163 "DELETE FROM ".MAIN_DB_PREFIX.
"document_model WHERE nom = '".$this->db->escape($this->const[0][2]).
"' AND type = 'donation' AND entity = ".((
int)
$conf->entity),
164 "INSERT INTO ".MAIN_DB_PREFIX.
"document_model (nom, type, entity) VALUES('".$this->db->escape($this->const[0][2]).
"','donation',".((
int)
$conf->entity).
")",
167 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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
$conf db name
Only used if Module[ID]Name translation string is not found.