Merge branch 'develop' of git://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
1ccdbbed5e
@ -51,7 +51,14 @@ abstract class CommonDocGenerator
|
||||
'myuser_firstname'=>$user->firstname,
|
||||
'myuser_login'=>$user->login,
|
||||
'myuser_phone'=>$user->office_phone,
|
||||
'myuser_fax'=>$user->office_fax,
|
||||
'myuser_address'=>$user->address,
|
||||
'myuser_zip'=>$user->zip,
|
||||
'myuser_town'=>$user->town,
|
||||
'myuser_country'=>$user->country,
|
||||
'myuser_country_code'=>$user->country_code,
|
||||
'myuser_state'=>$user->state,
|
||||
'myuser_state_code'=>$user->state_code,
|
||||
'myuser_fax'=>$user->office_fax,
|
||||
'myuser_mobile'=>$user->user_mobile,
|
||||
'myuser_email'=>$user->email,
|
||||
'myuser_web'=>'' // url not exist in $user object
|
||||
@ -190,6 +197,28 @@ abstract class CommonDocGenerator
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Define array with couple subtitution key => subtitution value
|
||||
*
|
||||
* @param Translate $outputlangs Language object for output
|
||||
* @return array Array of substitution key->code
|
||||
*/
|
||||
function get_substitutionarray_other($outputlangs)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$now=dol_now('gmt'); // gmt
|
||||
$array_other = array(
|
||||
'current_date'=>dol_print_date($now,'day','tzuser'),
|
||||
'current_datehour'=>dol_print_date($now,'dayhour','tzuser'),
|
||||
'current_server_date'=>dol_print_date($now,'day','tzserver'),
|
||||
'current_server_datehour'=>dol_print_date($now,'dayhour','tzserver'),
|
||||
);
|
||||
|
||||
return $array_other;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
|
||||
@ -886,21 +886,23 @@ class DoliDBMysql
|
||||
$sqlfields[$i] = $field_name." ";
|
||||
$sqlfields[$i] .= $field_desc['type'];
|
||||
if( preg_match("/^[^\s]/i",$field_desc['value']))
|
||||
$sqlfields[$i] .= "(".$field_desc['value'].")";
|
||||
else if( preg_match("/^[^\s]/i",$field_desc['attribute']))
|
||||
$sqlfields[$i] .= " ".$field_desc['attribute'];
|
||||
else if( preg_match("/^[^\s]/i",$field_desc['default']))
|
||||
$sqlfields[$i] .= "(".$field_desc['value'].")";
|
||||
if( preg_match("/^[^\s]/i",$field_desc['attribute']))
|
||||
$sqlfields[$i] .= " ".$field_desc['attribute'];
|
||||
if( preg_match("/^[^\s]/i",$field_desc['default']))
|
||||
{
|
||||
if(preg_match("/null/i",$field_desc['default']))
|
||||
$sqlfields[$i] .= " default ".$field_desc['default'];
|
||||
$sqlfields[$i] .= " default ".$field_desc['default'];
|
||||
elseif ($field_desc['default'] == 'CURRENT_TIMESTAMP')
|
||||
$sqlfields[$i] .= " default ".$field_desc['default'];
|
||||
else
|
||||
$sqlfields[$i] .= " default '".$field_desc['default']."'";
|
||||
$sqlfields[$i] .= " default '".$field_desc['default']."'";
|
||||
}
|
||||
else if( preg_match("/^[^\s]/i",$field_desc['null']))
|
||||
$sqlfields[$i] .= " ".$field_desc['null'];
|
||||
if( preg_match("/^[^\s]/i",$field_desc['null']))
|
||||
$sqlfields[$i] .= " ".$field_desc['null'];
|
||||
|
||||
else if( preg_match("/^[^\s]/i",$field_desc['extra']))
|
||||
$sqlfields[$i] .= " ".$field_desc['extra'];
|
||||
if( preg_match("/^[^\s]/i",$field_desc['extra']))
|
||||
$sqlfields[$i] .= " ".$field_desc['extra'];
|
||||
$i++;
|
||||
}
|
||||
if($primary_key != "")
|
||||
|
||||
@ -30,12 +30,13 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $atarget Target
|
||||
* @param int $type_user 0=Internal,1=External,2=All
|
||||
* @param int $type_user 0=Menu for backoffice, 1=Menu for front office
|
||||
* @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty)
|
||||
* @param array &$menu Object Menu to return back list of menu entries
|
||||
* @param int $noout Disable output (Initialise &$menu only).
|
||||
* @return void
|
||||
*/
|
||||
function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu)
|
||||
function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0)
|
||||
{
|
||||
global $user,$conf,$langs,$dolibarr_main_db_name;
|
||||
|
||||
@ -45,11 +46,11 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu)
|
||||
$id='mainmenu';
|
||||
$listofmodulesforexternal=explode(',',$conf->global->MAIN_MODULES_FOR_EXTERNAL);
|
||||
|
||||
//$tabMenu=array();
|
||||
// Show personalized menus
|
||||
$menuArbo = new Menubase($db,'auguria');
|
||||
$newTabMenu = $menuArbo->menuTopCharger('', '', $type_user, 'auguria',$tabMenu);
|
||||
|
||||
print_start_menu_array_auguria();
|
||||
if (empty($noout)) print_start_menu_array_auguria();
|
||||
|
||||
$num = count($newTabMenu);
|
||||
for($i = 0; $i < $num; $i++)
|
||||
@ -59,24 +60,23 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu)
|
||||
$showmode=dol_auguria_showmenu($type_user,$newTabMenu[$i],$listofmodulesforexternal);
|
||||
if ($showmode == 1)
|
||||
{
|
||||
// Define url
|
||||
if (preg_match("/^(http:\/\/|https:\/\/)/i",$newTabMenu[$i]['url']))
|
||||
$url = $shorturl = $newTabMenu[$i]['url'];
|
||||
if (! preg_match("/^(http:\/\/|https:\/\/)/i",$newTabMenu[$i]['url']))
|
||||
{
|
||||
$url = $newTabMenu[$i]['url'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$url=dol_buildpath($newTabMenu[$i]['url'],1);
|
||||
$param='';
|
||||
if (! preg_match('/mainmenu/i',$url) || ! preg_match('/leftmenu/i',$url))
|
||||
{
|
||||
if (! preg_match('/\?/',$url)) $url.='?';
|
||||
else $url.='&';
|
||||
$url.='mainmenu='.$newTabMenu[$i]['mainmenu'].'&leftmenu=';
|
||||
if (! preg_match('/\?/',$url)) $param.='?';
|
||||
else $param.='&';
|
||||
$param.='mainmenu='.$newTabMenu[$i]['mainmenu'].'&leftmenu=';
|
||||
}
|
||||
//$url.="idmenu=".$newTabMenu[$i]['rowid']; // Already done by menuLoad
|
||||
$url=dol_buildpath($url,1).$param;
|
||||
$shorturl = $newTabMenu[$i]['url'].$param;
|
||||
}
|
||||
$url=preg_replace('/__LOGIN__/',$user->login,$url);
|
||||
|
||||
$shorturl=preg_replace('/__LOGIN__/',$user->login,$shorturl);
|
||||
|
||||
// Define the class (top menu selected or not)
|
||||
if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"';
|
||||
else if (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"';
|
||||
@ -84,12 +84,13 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu)
|
||||
}
|
||||
else if ($showmode == 2) $classname='class="tmenu"';
|
||||
|
||||
print_start_menu_entry_auguria($idsel,$classname,$showmode);
|
||||
print_text_menu_entry_auguria($newTabMenu[$i]['titre'], $showmode, $url, $id, $idsel, $classname, ($newTabMenu[$i]['target']?$newTabMenu[$i]['target']:$atarget));
|
||||
print_end_menu_entry_auguria($showmode);
|
||||
if (empty($noout)) print_start_menu_entry_auguria($idsel,$classname,$showmode);
|
||||
if (empty($noout)) print_text_menu_entry_auguria($newTabMenu[$i]['titre'], $showmode, $url, $id, $idsel, $classname, ($newTabMenu[$i]['target']?$newTabMenu[$i]['target']:$atarget));
|
||||
if (empty($noout)) print_end_menu_entry_auguria($showmode);
|
||||
$menu->add($shorturl, $newTabMenu[$i]['titre'], 0, $showmode, ($newTabMenu[$i]['target']?$newTabMenu[$i]['target']:$atarget), ($newTabMenu[$i]['mainmenu']?$newTabMenu[$i]['mainmenu']:$newTabMenu[$i]['rowid']), '');
|
||||
}
|
||||
|
||||
print_end_menu_array_auguria();
|
||||
if (empty($noout)) print_end_menu_array_auguria();
|
||||
|
||||
print "\n";
|
||||
}
|
||||
@ -127,7 +128,7 @@ function print_start_menu_entry_auguria($idsel,$classname,$showmode)
|
||||
* Output menu entry
|
||||
*
|
||||
* @param string $text Text
|
||||
* @param int $showmode 1 = allowed or 2 = not allowed
|
||||
* @param int $showmode 0 = hide, 1 = allowed or 2 = not allowed
|
||||
* @param string $url Url
|
||||
* @param string $id Id
|
||||
* @param string $idsel Id sel
|
||||
@ -142,7 +143,7 @@ function print_text_menu_entry_auguria($text, $showmode, $url, $id, $idsel, $cla
|
||||
if ($showmode == 1)
|
||||
{
|
||||
print '<a class="tmenuimage" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="mainmenu_'.$idsel.' '.$id.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '</a>';
|
||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
||||
print '<span class="mainmenuaspan">';
|
||||
@ -152,7 +153,7 @@ function print_text_menu_entry_auguria($text, $showmode, $url, $id, $idsel, $cla
|
||||
}
|
||||
if ($showmode == 2)
|
||||
{
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="mainmenu_'.$idsel.' '.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||
print '<span class="mainmenuaspan">';
|
||||
print $text;
|
||||
@ -172,8 +173,8 @@ function print_end_menu_entry_auguria($showmode)
|
||||
if ($showmode)
|
||||
{
|
||||
print '</div></li>';
|
||||
print "\n";
|
||||
}
|
||||
print "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@ -198,20 +199,22 @@ function print_end_menu_array_auguria()
|
||||
* @param array $menu_array_after Table of menu entries to show after entries of menu handler
|
||||
* @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty)
|
||||
* @param array &$menu Object Menu to return back list of menu entries
|
||||
* @param int $noout Disable output (Initialise &$menu only).
|
||||
* @param string $forcemainmenu 'x'=Force mainmenu to mainmenu='x'
|
||||
* @param string $forceleftmenu 'all'=Force leftmenu to '' (= all)
|
||||
* @return void
|
||||
*/
|
||||
function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabMenu,&$menu)
|
||||
function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabMenu,&$menu,$noout=0,$forcemainmenu='',$forceleftmenu='')
|
||||
{
|
||||
global $user,$conf,$langs,$dolibarr_main_db_name,$mysoc;
|
||||
|
||||
$overwritemenufor = array();
|
||||
$newmenu = $menu;
|
||||
|
||||
$mainmenu=$_SESSION["mainmenu"];
|
||||
$leftmenu=$_SESSION["leftmenu"];
|
||||
$mainmenu=($forcemainmenu?$forcemainmenu:$_SESSION["mainmenu"]);
|
||||
$leftmenu=($forceleftmenu?'':(empty($_SESSION["leftmenu"])?'none':$_SESSION["leftmenu"]));
|
||||
|
||||
// Show logo company
|
||||
if (! empty($conf->global->MAIN_SHOW_LOGO))
|
||||
if (empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO))
|
||||
{
|
||||
$mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI;
|
||||
if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
|
||||
@ -245,23 +248,21 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
||||
if (! is_array($menu_array)) return 0;
|
||||
|
||||
// Show menu
|
||||
if (empty($noout))
|
||||
{
|
||||
$alt=0;
|
||||
$num=count($menu_array);
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
$showmenu=true;
|
||||
if (! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($menu_array[$i]['enabled'])) $showmenu=false;
|
||||
|
||||
$alt++;
|
||||
if (empty($menu_array[$i]['level']))
|
||||
if (empty($menu_array[$i]['level']) && $showmenu)
|
||||
{
|
||||
if (($alt%2==0))
|
||||
{
|
||||
if ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION))
|
||||
{
|
||||
print '<div class="blockvmenupair">'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="blockvmenuimpair">'."\n";
|
||||
}
|
||||
print '<div class="blockvmenuimpair">'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -290,7 +291,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
||||
$url.='mainmenu='.$mainmenu;
|
||||
}
|
||||
|
||||
print '<!-- Add menu entry with mainmenu='.$menu_array[$i]['mainmenu'].', leftmenu='.$menu_array[$i]['leftmenu'].', level='.$menu_array[$i]['mainmenu'].' -->'."\n";
|
||||
print '<!-- Add menu entry with mainmenu='.$menu_array[$i]['mainmenu'].', leftmenu='.$menu_array[$i]['leftmenu'].', level='.$menu_array[$i]['level'].' -->'."\n";
|
||||
|
||||
// Menu niveau 0
|
||||
if ($menu_array[$i]['level'] == 0)
|
||||
@ -299,35 +300,42 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
||||
{
|
||||
print '<div class="menu_titre">'.$tabstring.'<a class="vmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>'.$menu_array[$i]['titre'].'</a></div>';
|
||||
}
|
||||
else if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED))
|
||||
else if ($showmenu)
|
||||
{
|
||||
print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$menu_array[$i]['titre'].'</font></div>';
|
||||
print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$menu_array[$i]['titre'].'</font></div>'."\n";
|
||||
}
|
||||
print "\n".'<div id="section_content_'.$i.'">'."\n";
|
||||
print '<div class="menu_top"></div>'."\n";
|
||||
if ($showmenu)
|
||||
print '<div class="menu_top"></div>'."\n";
|
||||
}
|
||||
// Menu niveau > 0
|
||||
if ($menu_array[$i]['level'] > 0)
|
||||
{
|
||||
if ($menu_array[$i]['enabled'])
|
||||
{
|
||||
print '<div class="menu_contenu">'.$tabstring.'<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>'.$menu_array[$i]['titre'].'</a></div>';
|
||||
print '<div class="menu_contenu">'.$tabstring;
|
||||
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
||||
print $menu_array[$i]['titre'];
|
||||
if ($menu_array[$i]['url']) print '</a>';
|
||||
// If title is not pure text and contains a table, no carriage return added
|
||||
if (! strstr($menu_array[$i]['titre'],'<table')) print '<br>';
|
||||
print '</div>'."\n";
|
||||
}
|
||||
else if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED))
|
||||
else if ($showmenu)
|
||||
{
|
||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled">'.$menu_array[$i]['titre'].'</font></div>';
|
||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// If next is a new block or end
|
||||
if (empty($menu_array[$i+1]['level']))
|
||||
{
|
||||
print '<div class="menu_end"></div>'."\n";
|
||||
print "</div><!-- end section content -->\n";
|
||||
print "</div><!-- end blockvmenu pair/impair -->\n";
|
||||
if ($showmenu)
|
||||
print '<div class="menu_end"></div>'."\n";
|
||||
print "</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return count($menu_array);
|
||||
}
|
||||
|
||||
|
||||
@ -151,12 +151,12 @@ class MenuManager
|
||||
/**
|
||||
* Show menu
|
||||
*
|
||||
* @param string $mode 'top' or 'left'
|
||||
* @param string $mode 'top', 'left', 'jmobile'
|
||||
* @return int Number of menu entries shown
|
||||
*/
|
||||
function showmenu($mode)
|
||||
{
|
||||
global $conf;
|
||||
global $conf, $langs;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria.lib.php';
|
||||
|
||||
@ -173,7 +173,53 @@ class MenuManager
|
||||
|
||||
if ($mode == 'top') $res=print_auguria_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu);
|
||||
if ($mode == 'left') $res=print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu);
|
||||
|
||||
if ($mode == 'jmobile')
|
||||
{
|
||||
$res=print_auguria_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,1);
|
||||
|
||||
foreach($this->menu->liste as $key => $val) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
||||
{
|
||||
print '<ul data-role="listview" data-inset="true">';
|
||||
print '<li data-role="list-divider">';
|
||||
if ($val['enabled'] == 1)
|
||||
{
|
||||
$relurl=dol_buildpath($val['url'],1);
|
||||
|
||||
print '<a href="#">'.$val['titre'].'</a>'."\n";
|
||||
// Search submenu fot this entry
|
||||
$tmpmainmenu=$val['mainmenu'];
|
||||
$tmpleftmenu='all';
|
||||
$submenu=new Menu();
|
||||
$res=print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$submenu,1,$tmpmainmenu,$tmpleftmenu);
|
||||
$nexturl=dol_buildpath($submenu->liste[0]['url'],1);
|
||||
$canonrelurl=preg_replace('/\?.*$/','',$relurl);
|
||||
$canonnexturl=preg_replace('/\?.*$/','',$nexturl);
|
||||
//var_dump($canonrelurl);
|
||||
//var_dump($canonnexturl);
|
||||
print '<ul>';
|
||||
if ($canonrelurl != $canonnexturl && $val['mainmenu'] != 'home')
|
||||
{
|
||||
// We add sub entry
|
||||
print '<li data-role="list-divider"><a href="'.$relurl.'">'.$langs->trans("MainArea").'-'.$val['titre'].'</a></li>'."\n";
|
||||
}
|
||||
foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
||||
{
|
||||
$relurl2=dol_buildpath($val2['url'],1);
|
||||
//var_dump($val2);
|
||||
print '<li'.($val2['level']==0?' data-role="list-divider"':'').'><a href="'.$relurl2.'">'.$val2['titre'].'</a></li>'."\n";
|
||||
}
|
||||
//var_dump($submenu);
|
||||
print '</ul>';
|
||||
}
|
||||
if ($val['enabled'] == 2)
|
||||
{
|
||||
print '<font class="vsmenudisabled">'.$val['titre'].'</font>';
|
||||
}
|
||||
print '</li>';
|
||||
print '</ul>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
unset($this->menu);
|
||||
|
||||
return $res;
|
||||
|
||||
@ -264,10 +264,9 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0)
|
||||
$showmode=dol_eldy_showmenu($type_user,$newTabMenu[$i],$listofmodulesforexternal);
|
||||
if ($showmode == 1)
|
||||
{
|
||||
$url = $newTabMenu[$i]['url'];
|
||||
$url = $shorturl = $newTabMenu[$i]['url'];
|
||||
if (! preg_match("/^(http:\/\/|https:\/\/)/i",$newTabMenu[$i]['url']))
|
||||
{
|
||||
$url = $newTabMenu[$i]['url'];
|
||||
$param='';
|
||||
if (! preg_match('/mainmenu/i',$url) || ! preg_match('/leftmenu/i',$url))
|
||||
{
|
||||
@ -414,8 +413,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$newmenu = $menu;
|
||||
|
||||
$mainmenu=($forcemainmenu?$forcemainmenu:$_SESSION["mainmenu"]);
|
||||
$leftmenu=($forceleftmenu?'':$_SESSION["leftmenu"]);
|
||||
|
||||
$leftmenu=($forceleftmenu?'':(empty($_SESSION["leftmenu"])?'none':$_SESSION["leftmenu"]));
|
||||
|
||||
// Show logo company
|
||||
if (empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO))
|
||||
{
|
||||
@ -436,8 +435,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
}
|
||||
|
||||
/**
|
||||
* On definit newmenu en fonction de mainmenu et leftmenu
|
||||
* ------------------------------------------------------
|
||||
* We update newmenu with entries found into database
|
||||
* --------------------------------------------------
|
||||
*/
|
||||
if ($mainmenu)
|
||||
{
|
||||
|
||||
@ -140,7 +140,7 @@ class MenuManager
|
||||
if ($val['enabled'] == 1)
|
||||
{
|
||||
$relurl=dol_buildpath($val['url'],1);
|
||||
|
||||
|
||||
print '<a href="#">'.$val['titre'].'</a>'."\n";
|
||||
// Search submenu fot this entry
|
||||
$tmpmainmenu=$val['mainmenu'];
|
||||
|
||||
@ -105,8 +105,9 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
'object_date'=>dol_print_date($object->date,'day'),
|
||||
'object_date_delivery'=>dol_print_date($object->date_livraison,'dayhour'),
|
||||
'object_date_creation'=>dol_print_date($object->date_creation,'day'),
|
||||
'object_date_modification'=>dol_print_date($object->date_modification,'day'),
|
||||
'object_date_validation'=>dol_print_date($object->date_validation,'dayhour'),
|
||||
'object_date_modification'=>(! empty($object->date_modification)?dol_print_date($object->date_modification,'day'):''),
|
||||
'object_date_validation'=>(! empty($object->date_validation)?dol_print_date($object->date_validation,'dayhour'):''),
|
||||
'object_date_delivery_planed'=>(! empty($object->date_livraison)?dol_print_date($object->date_livraison,'day'):''),
|
||||
'object_date_close'=>dol_print_date($object->date_cloture,'dayhour'),
|
||||
'object_payment_mode_code'=>$object->mode_reglement_code,
|
||||
'object_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code)!='PaymentType'.$object->mode_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code):$object->mode_reglement),
|
||||
|
||||
@ -116,7 +116,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
'object_date_limit'=>dol_print_date($object->date_lim_reglement,'day'),
|
||||
'object_date_creation'=>dol_print_date($object->date_creation,'day'),
|
||||
'object_date_modification'=>(! empty($object->date_modification)?dol_print_date($object->date_modification,'day'):''),
|
||||
'object_date_validation'=>dol_print_date($object->date_validation,'dayhour'),
|
||||
'object_date_validation'=>(! empty($object->date_validation)?dol_print_date($object->date_validation,'dayhour'):''),
|
||||
'object_date_delivery_planed'=>(! empty($object->date_livraison)?dol_print_date($object->date_livraison,'day'):''),
|
||||
'object_payment_mode_code'=>$object->mode_reglement_code,
|
||||
'object_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code)!='PaymentType'.$object->mode_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code):$object->mode_reglement),
|
||||
'object_payment_term_code'=>$object->cond_reglement_code,
|
||||
@ -415,7 +416,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
$array_thirdparty=$this->get_substitutionarray_thirdparty($socobject,$outputlangs);
|
||||
$array_objet=$this->get_substitutionarray_object($object,$outputlangs);
|
||||
$array_propal=is_object($propal_object)?$this->get_substitutionarray_propal($propal_object,$outputlangs,'propal'):array();
|
||||
|
||||
$array_other=$this->get_substitutionarray_other($user,$outputlangs);
|
||||
|
||||
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_propal);
|
||||
complete_substitutions_array($tmparray, $outputlangs, $object);
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Language code: zh_CN
|
||||
* Language code: zh_CN (simplified)
|
||||
* Automatic generated via autotranslator.php tool
|
||||
* Generation date 2010-06-09 00:39:24
|
||||
*/
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
/*
|
||||
* Language code: zh_TW
|
||||
* Language code: zh_TW (traditionnal)
|
||||
* Generation date 2012-09-04 16:02:00
|
||||
*/
|
||||
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
DIRECTION=ltr
|
||||
#FONTFORPDF=chinese
|
||||
FONTFORPDF=stsongstdlight
|
||||
# msungstdlight or cid0ct are for traditionnal chinese (traditionnal does not render with ubuntu pdf reader)
|
||||
# stsongstdlight or cid0cs are for simplified chinese
|
||||
FONTFORPDF=msungstdlight
|
||||
#FONTSIZEFORPDF=9
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=None
|
||||
|
||||
Loading…
Reference in New Issue
Block a user