Merge pull request #32348 from hregis/fix_dev_missing_create_accounting_dict
FIX missing init function to create accounting table
This commit is contained in:
commit
11dadd4f20
2 changed files with 35 additions and 2 deletions
|
|
@ -400,4 +400,37 @@ class modAccounting extends DolibarrModules
|
|||
'b.multicurrency_code'=>"US (Necessary if devise is different than EUR)",
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function called when module is enabled.
|
||||
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||
* It also creates data directories
|
||||
*
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function init($options = '')
|
||||
{
|
||||
$result = $this->_load_tables('/install/mysql/', 'accounting');
|
||||
if ($result < 0) {
|
||||
return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default')
|
||||
}
|
||||
|
||||
$sql = array();
|
||||
return $this->_init($sql, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function called when module is disabled.
|
||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||
* Data directories are not deleted
|
||||
*
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function remove($options = '')
|
||||
{
|
||||
$sql = array();
|
||||
return $this->_remove($sql, $options);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -351,8 +351,8 @@ if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
|
|||
$tooltiponprice .= '<br>';
|
||||
$tooltiponpricemultiprice .= '<br>';
|
||||
if (!empty($line->special_code)) {
|
||||
$tooltiponprice .= '<br>'.$langs->trans("SpecialLine").' : '.getLabelSpecialcode($line->special_code);
|
||||
$tooltiponpricemultiprice .= '<br>'.$langs->trans("SpecialLine").' : '.getLabelSpecialcode($line->special_code);
|
||||
$tooltiponprice .= '<br>'.$langs->trans("SpecialLine").' : '.getLabelSpecialCode($line->special_code);
|
||||
$tooltiponpricemultiprice .= '<br>'.$langs->trans("SpecialLine").' : '.getLabelSpecialCode($line->special_code);
|
||||
}
|
||||
if ($line->product_type == 9) {
|
||||
$tooltiponprice .= '<br>'.$langs->trans("SpecialLine").' : '.$langs->trans("GroupingLine");
|
||||
|
|
|
|||
Loading…
Reference in a new issue