$this->export_sql_end[$r]=' FROM '.MAIN_DB_PREFIX.'user as u';
$this->export_sql_end[$r].=', '.MAIN_DB_PREFIX.'expensereport as d';
$this->export_sql_end[$r].=' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON d.fk_soc = s.rowid';
$this->export_sql_end[$r].=' WHERE d.fk_user = u.rowid';
$this->export_sql_end[$r].=' AND d.entity = '.$conf->entity;
// Main menu entries
$this->menu=array();// List of menus to add
$r=0;
// Example to declare a Left Menu entry: fk_mainmenu=home,fk_leftmenu=modulesadmintools
$this->menu[$r]=array('fk_menu'=>'fk_mainmenu=accountancy',// Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'type'=>'left',// This is a Left menu entry
'titre'=>'TripsAndExpenses',
'mainmenu'=>'accountancy',
'leftmenu'=>'expensereport',
'url'=>'/expensereport/index.php',
'langs'=>'trips',// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'enabled'=>'$conf->expensereport->enabled',// Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->expensereport->lire',// Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'user'=>2);// 0=Menu for internal users, 1=external users, 2=both
$r++;
$this->menu[$r]=array('fk_menu'=>'fk_mainmenu=accountancy,fk_leftmenu=expensereport',// Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'enabled'=>'$conf->expensereport->enabled',// Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->expensereport->creer',// Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'user'=>2);// 0=Menu for internal users, 1=external users, 2=both
$r++;
$this->menu[$r]=array('fk_menu'=>'fk_mainmenu=accountancy,fk_leftmenu=expensereport',// Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'enabled'=>'$conf->expensereport->enabled',// Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->expensereport->lire',// Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2);// 0=Menu for internal users, 1=external users, 2=both
$r++;
$this->menu[$r]=array('fk_menu'=>'fk_mainmenu=accountancy,fk_leftmenu=expensereport_detaillist',// Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'type'=>'left',// This is a Left menu entry
'titre'=>'ListToApprove',
'mainmenu'=>'accountancy',
'leftmenu'=>'expensereport_detaillist_approve',
'url'=>'/expensereport/list.php?search_state=2',
'langs'=>'trips',// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100,
'enabled'=>'$conf->expensereport->enabled',// Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->expensereport->approve',// Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'user'=>2);// 0=Menu for internal users, 1=external users, 2=both
$r++;
$this->menu[$r]=array('fk_menu'=>'fk_mainmenu=accountancy,fk_leftmenu=expensereport',// Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'type'=>'left',// This is a Left menu entry
'titre'=>'Statistics',
'mainmenu'=>'accountancy',
'leftmenu'=>'expensereport_detail',
'url'=>'/expensereport/stats/index.php',
'langs'=>'trips',// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'enabled'=>'$conf->expensereport->enabled',// Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->expensereport->lire',// Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
$this->menu[$r]=array('fk_menu'=>'fk_mainmenu=accountancy,fk_leftmenu=expensereport',// Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'type'=>'left',// This is a Left menu entry
'titre'=>'ExportTripCSV',
'mainmenu'=>'accountancy',
'leftmenu'=>'expensereport_detail',
'url'=>'/expensereport/export_csv.php',
'langs'=>'expensereport',// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100,
'enabled'=>'$conf->global->DEPLACEMENT_TO_CLEAN',// Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'user'=>2);// 0=Menu for internal users, 1=external users, 2=both
$r++;
$this->menu[$r]=array('fk_menu'=>'fk_mainmenu=accountancy,fk_leftmenu=expensereport',// Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'type'=>'left',// This is a Left menu entry
'titre'=>'Synchro_Compta',
'mainmenu'=>'accountancy',
'leftmenu'=>'expensereport_detail',
'url'=>'/expensereport/synchro_compta.php',
'langs'=>'expensereport',// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100,
'enabled'=>'$conf->global->DEPLACEMENT_TO_CLEAN',// Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.