Clean module
This commit is contained in:
parent
04114a5e1e
commit
ecc338b1eb
@ -85,7 +85,7 @@ if ($action == 'add_currency')
|
||||
|
||||
if ($currency->create($user) > 0)
|
||||
{
|
||||
if ($currency->addRate($rate)) setEventMessages($langs->trans('SuccessAddRate'), array());
|
||||
if ($currency->addRate($rate)) setEventMessages($langs->trans('RecordSaved'), array());
|
||||
else setEventMessages($langs->trans('ErrorAddRateFail'), array(), 'errors');
|
||||
}
|
||||
else setEventMessages($langs->trans('ErrorAddCurrencyFail'), array());
|
||||
@ -112,7 +112,7 @@ elseif ($action == 'update_currency')
|
||||
|
||||
if ($currency->fetch($fk_multicurrency) > 0)
|
||||
{
|
||||
if ($currency->delete() > 0) setEventMessages($langs->trans('SuccessDeleteCurrency'), array());
|
||||
if ($currency->delete() > 0) setEventMessages($langs->trans('RecordDeleted'), array());
|
||||
else setEventMessages($langs->trans('ErrorDeleteCurrencyFail'), array(), 'errors');
|
||||
}
|
||||
}
|
||||
@ -131,10 +131,13 @@ if ($resql)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
$page_name = "multicurrency";
|
||||
|
||||
$page_name = "MultiCurrency";
|
||||
|
||||
llxHeader('', $langs->trans($page_name));
|
||||
|
||||
// Subheader
|
||||
@ -147,7 +150,7 @@ $head = multicurrencyAdminPrepareHead();
|
||||
dol_fiche_head(
|
||||
$head,
|
||||
'settings',
|
||||
$langs->trans("Module500000Name"),
|
||||
$langs->trans("ModuleSetup"),
|
||||
0,
|
||||
"multicurrency"
|
||||
);
|
||||
|
||||
@ -46,7 +46,7 @@ class modMultiCurrency extends DolibarrModules
|
||||
|
||||
// Id for module (must be unique).
|
||||
// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
|
||||
$this->numero = 500000; // TODO Go on page http://wiki.dolibarr.org/index.php/List_of_modules_id to reserve id number for your module
|
||||
$this->numero = 40000;
|
||||
// Key text used to identify module (for permissions, menus, etc...)
|
||||
$this->rights_class = 'multicurrency';
|
||||
|
||||
@ -54,14 +54,12 @@ class modMultiCurrency extends DolibarrModules
|
||||
// It is used to group modules in module setup page
|
||||
$this->family = "financial";
|
||||
// Module position in the family
|
||||
$this->module_position = 500;
|
||||
// Gives the possibility to the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this)
|
||||
$this->familyinfo = array('financial' => array('position'=>'009', 'label'=>$langs->trans("ModuleFamilyFinancial")));
|
||||
$this->module_position = 555;
|
||||
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->description = "Description of module MyModule";
|
||||
$this->description = "Module to enter elements with a foreign currency";
|
||||
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or 'dolibarr_deprecated' or version
|
||||
$this->version = 'development';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user