28 include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
49 $this->numero = 40000;
51 $this->rights_class =
'multicurrency';
55 $this->family =
"technic";
57 $this->module_position =
'40';
60 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
62 $this->
description =
"Module to manage several foreign currencies in prices and documents";
65 $this->version =
'dolibarr';
67 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
71 $this->picto =
'multicurrency';
77 $this->module_parts = array();
81 $this->dirs = array();
84 $this->config_page_url = array(
"multicurrency.php");
87 $this->hidden =
false;
88 $this->depends = array();
89 $this->requiredby = array();
90 $this->conflictwith = array();
91 $this->phpmin = array(5, 4);
92 $this->need_dolibarr_version = array(3, 0);
93 $this->langfiles = array(
"multicurrency");
100 $this->
const = array();
126 $this->tabs = array();
129 if (!isset($conf->multicurrency->enabled))
131 $conf->multicurrency =
new stdClass();
132 $conf->multicurrency->enabled = 0;
134 $this->dictionaries = array();
154 $this->boxes = array();
163 $this->rights = array();
176 $this->menu = array();
265 public function init($options =
'')
270 $res = $this->
_init($sql, $options);
288 public function remove($options =
'')
292 return $this->
_remove($sql, $options);
303 global $conf, $user, $langs;
307 $langs->loadCacheCurrencies(
'');
310 $multicurrency->code = $conf->currency;
311 $multicurrency->name = $langs->cache_currencies[$conf->currency][
'label'].
' ('.$langs->getCurrencySymbol($conf->currency).
')';
312 $r = $multicurrency->create($user);
314 if ($r > 0) $multicurrency->addRate(1);
</td > param sortfield sortorder printFieldListOption< tdclass="liste_titremaxwidthsearchright"></td ></tr >< trclass="liste_titre">< inputtype="checkbox"onClick="toggle(this)"/> Ref p ref Label p label Duration p duration center DesiredStock p desiredstock right StockLimitShort p seuil_stock_alerte right stock_physique right stock_real_warehouse right Ordered right StockToBuy right SupplierRef right param sortfield sortorder printFieldListTitle warehouseinternal SELECT description FROM product_lang WHERE qty< br > qty qty qty StockTooLow StockTooLow help help help< trclass="oddeven">< td >< inputtype="checkbox"class="check"name="choose'.$i.'"></td >< tdclass="nowrap"> stock</td >< td >< inputtype="hidden"name="desc'.$i.'"value="'.dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
Description and activation class for module MyModule.
$conf db name
Only used if Module[ID]Name translation string is not found.
$conf db
API class for accounts.
static checkCodeAlreadyExists($code)
Check in database if the current code already exists.
_remove($array_sql, $options= '')
Disable function.
createFirstCurrency()
Function called when module is enabled Create the currency from general setting.
init($options= '')
Function called when module is enabled.
__construct($db)
Constructor.
_init($array_sql, $options= '')
Enables a module.