dolibarr 19.0.3
modIncoterm.class.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
27include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
28
29
34{
40 public function __construct($db)
41 {
42 global $langs, $conf;
43
44 $this->db = $db;
45
46 // Id for module (must be unique).
47 // Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
48 $this->numero = 62000;
49 // Key text used to identify module (for permissions, menus, etc...)
50 $this->rights_class = 'incoterm';
51
52 // Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
53 $this->family = "srm";
54 $this->name = preg_replace('/^mod/i', '', get_class($this));
55 $this->description = "Incoterm management";
56 $this->version = 'dolibarr';
57 // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
58 $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
59 $this->picto = 'incoterm';
60
61 $this->module_parts = array();
62 $this->dirs = array();
63
64 $this->config_page_url = array();
65
66 // Dependencies
67 $this->hidden = false; // A condition to hide module
68 $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
69 $this->requiredby = array(); // List of module ids to disable if this one is disabled
70 $this->conflictwith = array(); // List of module class names as string this module is in conflict with
71 $this->phpmin = array(7, 0); // Minimum version of PHP required by module
72 $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module
73 $this->langfiles = array("incoterm");
74
75 $this->const = array(
76 array('INCOTERM_ACTIVATE', 'chaine', 0, 'Description de INCOTERM_ACTIVATE')
77 );
78
79 $this->tabs = array();
80
81 // Dictionaries
82 if (!isset($conf->incoterm->enabled)) {
83 $conf->incoterm = new stdClass();
84 $conf->incoterm->enabled = 0;
85 }
86 $this->dictionaries = array(
87 'langs'=>'incoterm',
88 'tabname'=>array("c_incoterms"), // List of tables we want to see into dictonnary editor
89 'tablib'=>array("Incoterms"), // Label of tables
90 'tabsql'=>array('SELECT rowid, code, libelle, active FROM '.MAIN_DB_PREFIX.'c_incoterms'), // Request to select fields
91 'tabsqlsort'=>array("rowid ASC"), // Sort order
92 'tabfield'=>array("code,libelle"), // List of fields (result of select to show dictionary)
93 'tabfieldvalue'=>array("code,libelle"), // List of fields (list of fields to edit a record)
94 'tabfieldinsert'=>array("code,libelle"), // List of fields (list of fields for insert)
95 'tabrowid'=>array("rowid"), // Name of columns with primary key (try to always name it 'rowid')
96 'tabcond'=>array($conf->incoterm->enabled),
97 'tabhelp' => array(array())
98 );
99
100 $this->boxes = array(); // List of boxes
101 $r = 0;
102
103 // Permissions
104 $this->rights = array(); // Permission array used by this module
105 $r = 0;
106
107 // Main menu entries
108 $this->menu = array(); // List of menus to add
109 $r = 0;
110 }
111}
Class DolibarrModules.
Description and activation class for module MyModule.
__construct($db)
Constructor.
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.
Definition repair.php:124