34include_once DOL_DOCUMENT_ROOT.
"/core/modules/DolibarrModules.class.php";
35require_once DOL_DOCUMENT_ROOT.
'/subtotals/class/commonsubtotal.class.php';
37if (!defined(
'SUBTOTALS_SPECIAL_CODE')) {
38 define(
'SUBTOTALS_SPECIAL_CODE', 81);
57 $this->numero = SUBTOTALS_SPECIAL_CODE;
59 $this->rights_class =
'subtotals';
63 $this->family =
"technic";
64 $this->module_position =
'42';
66 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
70 $this->version =
'dolibarr';
72 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
76 $this->picto =
'donation';
80 $this->dirs = array(
"/subtotals/temp");
83 $this->config_page_url = array(
"subtotals.php");
86 $this->hidden =
false;
87 $this->depends = array();
88 $this->requiredby = array();
89 $this->conflictwith = array();
90 $this->phpmin = array(7, 0);
91 $this->need_dolibarr_version = array(3, 0);
92 $this->langfiles = array(
"subtotals");
97 $this->
const = array();
100 $this->dictionaries = array(
101 'langs' =>
'subtotals',
102 'tabname' => array(
"c_subtotals_titles",
"c_subtotals_texts"),
103 'tablib' => array(
"SubtotalsPredefinedTitles",
"SubtotalsPredefinedTexts"),
105 'SELECT rowid, code, label, active, entity FROM '.MAIN_DB_PREFIX.
'c_subtotals_titles WHERE entity IN ('.
getEntity(
'c_subtotals_titles').
')',
106 'SELECT rowid, code, label, content, active, entity FROM '.MAIN_DB_PREFIX.
'c_subtotals_texts WHERE entity IN ('.
getEntity(
'c_subtotals_texts').
')',
108 'tabsqlsort' => array(
"label ASC",
"label ASC"),
109 'tabfield' => array(
"code,label",
"code,label,content"),
110 'tabfieldvalue' => array(
"code,label",
"code,label,content"),
111 'tabfieldinsert' => array(
"code,label,entity",
"code,label,content,entity"),
112 'tabrowid' => array(
"rowid",
"rowid"),
114 'tabhelp' => array(array(), array()),
119 $this->tabs[] = array();
122 $this->boxes = array();
125 $this->rights = array();
131 $this->module_parts = array(
'substitutions' => 1);
142 public function init($options =
'')
144 $result = $this->
_load_tables(
'/install/mysql/',
'subtotals');
150 $this->
remove($options);
157 return $this->
_init($sql, $options);
_init($array_sql, $options='')
Enables a module.
_load_tables($reldir, $onlywithsuffix='')
Create tables and keys required by module:
Description and activation class for module subtotals.
__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.
isModEnabled($module)
Is Dolibarr module enabled.
getEntity($element, $shared=1, $currentobject=null)
Get list of entity id to use.
$conf db name
Only used if Module[ID]Name translation string is not found.