forked from Wavyzz/dolibarr
Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/compta/facture.php htdocs/core/datepicker.php htdocs/core/get_menudiv.php htdocs/core/menus/standard/auguria.lib.php htdocs/core/menus/standard/eldy.lib.php htdocs/core/search_page.php htdocs/main.inc.php htdocs/master.inc.php htdocs/product/list.php htdocs/theme/eldy/style.css.php htdocs/theme/md/style.css.php htdocs/user/card.php htdocs/user/index.php
This commit is contained in:
@@ -3426,7 +3426,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print $object->situation_counter;
|
print $object->situation_counter;
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right" class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
|
|
||||||
$prevsits_total_amount = 0;
|
$prevsits_total_amount = 0;
|
||||||
foreach ($prevsits as $situation) {
|
foreach ($prevsits as $situation) {
|
||||||
@@ -3434,9 +3434,9 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
$prevsits_total_amount += $object->total_ht;
|
$prevsits_total_amount += $object->total_ht;
|
||||||
|
|
||||||
print price($prevsits_total_amount);
|
print price($prevsits_total_amount, 0, $langs, 1, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency) );
|
||||||
print '</td>';
|
|
||||||
print '<td>' . $langs->trans('Currency' . $conf->currency) . '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Previous situation(s) deduction(s)
|
// Previous situation(s) deduction(s)
|
||||||
for ($i = 0; $i < $cprevsits; $i++) {
|
for ($i = 0; $i < $cprevsits; $i++) {
|
||||||
@@ -3447,10 +3447,9 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print $prevsits[$i]->situation_counter;
|
print $prevsits[$i]->situation_counter;
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
|
|
||||||
print '<td align="right" class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
print '- ' . price($prevsits[$i]->total_ht);
|
print '- ' . price($prevsits[$i]->total_ht, 0, $langs, 1, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency) );
|
||||||
print '</td>';
|
print '</td></tr>';
|
||||||
print '<td>' . $langs->trans('Currency' . $conf->currency) . '</td></tr>';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,8 +39,11 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
|||||||
require_once '../main.inc.php';
|
require_once '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
|
||||||
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$langs->load("agenda");
|
$langs->load("agenda");
|
||||||
|
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ if (! defined('DISABLE_SELECT2')) define('DISABLE_SELECT2',1);
|
|||||||
|
|
||||||
require_once '../main.inc.php';
|
require_once '../main.inc.php';
|
||||||
|
|
||||||
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||||
@@ -123,7 +125,7 @@ print '
|
|||||||
}
|
}
|
||||||
li.lilevel3:last-child {
|
li.lilevel3:last-child {
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
a.alilevel0, li.lilevel1 a {
|
a.alilevel0, li.lilevel1 a {
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -131,7 +133,7 @@ print '
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("body ul").click(function(){
|
$("body ul").click(function(){
|
||||||
@@ -145,12 +147,12 @@ $(document).ready(function(){
|
|||||||
$(\'html, body\').animate({
|
$(\'html, body\').animate({
|
||||||
scrollTop: target.offset().top
|
scrollTop: target.offset().top
|
||||||
}, 300);
|
}, 300);
|
||||||
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
';
|
';
|
||||||
|
|
||||||
|
|
||||||
if (empty($user->societe_id)) // If internal user or not defined
|
if (empty($user->societe_id)) // If internal user or not defined
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -411,6 +411,9 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
|
|||||||
case 'intcomma':
|
case 'intcomma':
|
||||||
if (preg_match('/[^0-9,]+/i',$out)) $out='';
|
if (preg_match('/[^0-9,]+/i',$out)) $out='';
|
||||||
break;
|
break;
|
||||||
|
case 'intcomma':
|
||||||
|
if (preg_match('/[^0-9,]+/i',$out)) $out='';
|
||||||
|
break;
|
||||||
case 'alpha':
|
case 'alpha':
|
||||||
$out=trim($out);
|
$out=trim($out);
|
||||||
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
||||||
@@ -755,7 +758,7 @@ function dol_string_unaccent($str)
|
|||||||
*/
|
*/
|
||||||
function dol_string_nospecial($str,$newstr='_',$badcharstoreplace='')
|
function dol_string_nospecial($str,$newstr='_',$badcharstoreplace='')
|
||||||
{
|
{
|
||||||
$forbidden_chars_to_replace=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
$forbidden_chars_to_replace=array(" ", "'", "/", "\\", ":", "*", "?", "\"", "<", ">", "|", "[", "]", ",", ";", "=");
|
||||||
$forbidden_chars_to_remove=array();
|
$forbidden_chars_to_remove=array();
|
||||||
if (is_array($badcharstoreplace)) $forbidden_chars_to_replace=$badcharstoreplace;
|
if (is_array($badcharstoreplace)) $forbidden_chars_to_replace=$badcharstoreplace;
|
||||||
//$forbidden_chars_to_remove=array("(",")");
|
//$forbidden_chars_to_remove=array("(",")");
|
||||||
|
|||||||
@@ -54,20 +54,20 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$m
|
|||||||
if (empty($noout)) print_start_menu_array_auguria();
|
if (empty($noout)) print_start_menu_array_auguria();
|
||||||
|
|
||||||
$usemenuhider = (GETPOST('testmenuhider','int') || ! empty($conf->global->MAIN_TESTMENUHIDER));
|
$usemenuhider = (GETPOST('testmenuhider','int') || ! empty($conf->global->MAIN_TESTMENUHIDER));
|
||||||
|
|
||||||
// Show/Hide vertical menu
|
// Show/Hide vertical menu
|
||||||
if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||||
{
|
{
|
||||||
$showmode=1;
|
$showmode=1;
|
||||||
$classname = 'class="tmenu menuhider"';
|
$classname = 'class="tmenu menuhider"';
|
||||||
$idsel='menu';
|
$idsel='menu';
|
||||||
|
|
||||||
if (empty($noout)) print_start_menu_entry_auguria($idsel,$classname,$showmode);
|
if (empty($noout)) print_start_menu_entry_auguria($idsel,$classname,$showmode);
|
||||||
if (empty($noout)) print_text_menu_entry_auguria('', 1, '#', $id, $idsel, $classname, $atarget);
|
if (empty($noout)) print_text_menu_entry_auguria('', 1, '#', $id, $idsel, $classname, $atarget);
|
||||||
if (empty($noout)) print_end_menu_entry_auguria($showmode);
|
if (empty($noout)) print_end_menu_entry_auguria($showmode);
|
||||||
$menu->add('#', '', 0, $showmode, $atarget, "xxx", '');
|
$menu->add('#', '', 0, $showmode, $atarget, "xxx", '');
|
||||||
}
|
}
|
||||||
|
|
||||||
$num = count($newTabMenu);
|
$num = count($newTabMenu);
|
||||||
for($i = 0; $i < $num; $i++)
|
for($i = 0; $i < $num; $i++)
|
||||||
{
|
{
|
||||||
@@ -77,7 +77,7 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$m
|
|||||||
if ($showmode == 1)
|
if ($showmode == 1)
|
||||||
{
|
{
|
||||||
$url = $shorturl = $newTabMenu[$i]['url'];
|
$url = $shorturl = $newTabMenu[$i]['url'];
|
||||||
|
|
||||||
if (! preg_match("/^(http:\/\/|https:\/\/)/i",$newTabMenu[$i]['url']))
|
if (! preg_match("/^(http:\/\/|https:\/\/)/i",$newTabMenu[$i]['url']))
|
||||||
{
|
{
|
||||||
$tmp=explode('?',$newTabMenu[$i]['url'],2);
|
$tmp=explode('?',$newTabMenu[$i]['url'],2);
|
||||||
@@ -85,11 +85,11 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$m
|
|||||||
$param = (isset($tmp[1])?$tmp[1]:'');
|
$param = (isset($tmp[1])?$tmp[1]:'');
|
||||||
|
|
||||||
// Complete param to force leftmenu to '' to closed opend menu when we click on a link with no leftmenu defined.
|
// Complete param to force leftmenu to '' to closed opend menu when we click on a link with no leftmenu defined.
|
||||||
if ((! preg_match('/mainmenu/i',$param)) && (! preg_match('/leftmenu/i',$param)) && ! empty($newTabMenu[$i]['url']))
|
if ((! preg_match('/mainmenu/i',$param)) && (! preg_match('/leftmenu/i',$param)) && ! empty($newTabMenu[$i]['url']))
|
||||||
{
|
{
|
||||||
$param.=($param?'&':'').'mainmenu='.$newTabMenu[$i]['url'].'&leftmenu=';
|
$param.=($param?'&':'').'mainmenu='.$newTabMenu[$i]['url'].'&leftmenu=';
|
||||||
}
|
}
|
||||||
if ((! preg_match('/mainmenu/i',$param)) && (! preg_match('/leftmenu/i',$param)) && empty($newTabMenu[$i]['url']))
|
if ((! preg_match('/mainmenu/i',$param)) && (! preg_match('/leftmenu/i',$param)) && empty($newTabMenu[$i]['url']))
|
||||||
{
|
{
|
||||||
$param.=($param?'&':'').'leftmenu=';
|
$param.=($param?'&':'').'leftmenu=';
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$m
|
|||||||
if ($search_project_user) $shorturl=preg_replace('/search_project_user=__search_project_user__/', 'search_project_user='.$search_project_user, $shorturl);
|
if ($search_project_user) $shorturl=preg_replace('/search_project_user=__search_project_user__/', 'search_project_user='.$search_project_user, $shorturl);
|
||||||
else $shorturl=preg_replace('/search_project_user=__search_project_user__/', '', $shorturl);
|
else $shorturl=preg_replace('/search_project_user=__search_project_user__/', '', $shorturl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define the class (top menu selected or not)
|
// Define the class (top menu selected or not)
|
||||||
if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"';
|
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"';
|
else if (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"';
|
||||||
@@ -144,7 +144,7 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$m
|
|||||||
function print_start_menu_array_auguria()
|
function print_start_menu_array_auguria()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
print '<div class="tmenudiv">';
|
print '<div class="tmenudiv">';
|
||||||
print '<ul class="tmenu"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?'':' title="Top menu"').'>';
|
print '<ul class="tmenu"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?'':' title="Top menu"').'>';
|
||||||
}
|
}
|
||||||
@@ -258,7 +258,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
|
|
||||||
$usemenuhider = (GETPOST('testmenuhider','int') || ! empty($conf->global->MAIN_TESTMENUHIDER));
|
$usemenuhider = (GETPOST('testmenuhider','int') || ! empty($conf->global->MAIN_TESTMENUHIDER));
|
||||||
global $usemenuhider;
|
global $usemenuhider;
|
||||||
|
|
||||||
// Show logo company
|
// Show logo company
|
||||||
if (empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
if (empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||||
{
|
{
|
||||||
@@ -292,7 +292,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
print '</div>'."\n";
|
print '</div>'."\n";
|
||||||
print "<!-- End SearchForm -->\n";
|
print "<!-- End SearchForm -->\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// We update newmenu with entries found into database
|
// We update newmenu with entries found into database
|
||||||
$menuArbo = new Menubase($db,'auguria');
|
$menuArbo = new Menubase($db,'auguria');
|
||||||
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,($user->societe_id?1:0),'auguria',$tabMenu);
|
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,($user->societe_id?1:0),'auguria',$tabMenu);
|
||||||
@@ -409,7 +409,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
for($j = ($i + 1); $j < $num; $j++)
|
for($j = ($i + 1); $j < $num; $j++)
|
||||||
{
|
{
|
||||||
if (empty($menu_array[$j]['level'])) $lastopened=false;
|
if (empty($menu_array[$j]['level'])) $lastopened=false;
|
||||||
}
|
}
|
||||||
if ($altok % 2 == 0)
|
if ($altok % 2 == 0)
|
||||||
{
|
{
|
||||||
print '<div class="blockvmenuimpair'.($lastopened?' blockvmenulast':'').($altok == 1 ? ' blockvmenufirst':'').'">'."\n";
|
print '<div class="blockvmenuimpair'.($lastopened?' blockvmenulast':'').($altok == 1 ? ' blockvmenufirst':'').'">'."\n";
|
||||||
@@ -470,10 +470,12 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
// Menu level > 0
|
// Menu level > 0
|
||||||
if ($menu_array[$i]['level'] > 0)
|
if ($menu_array[$i]['level'] > 0)
|
||||||
{
|
{
|
||||||
|
$cssmenu = '';
|
||||||
|
if ($menu_array[$i]['url']) $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/','',$menu_array[$i]['url']));
|
||||||
|
|
||||||
if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') // Enabled so visible, except if parent was not enabled.
|
if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') // Enabled so visible, except if parent was not enabled.
|
||||||
{
|
{
|
||||||
print '<div class="menu_contenu">'.$tabstring;
|
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring;
|
||||||
//print $lastlevel0;
|
|
||||||
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
||||||
else print '<span class="vsmenu">';
|
else print '<span class="vsmenu">';
|
||||||
print $menu_array[$i]['titre'];
|
print $menu_array[$i]['titre'];
|
||||||
@@ -485,7 +487,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
}
|
}
|
||||||
else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled.
|
else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled.
|
||||||
{
|
{
|
||||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -497,7 +499,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
if ($blockvmenuopened) { print '</div>'."\n"; $blockvmenuopened=false; }
|
if ($blockvmenuopened) { print '</div>'."\n"; $blockvmenuopened=false; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($altok) print '<div class="blockvmenuend"></div>'; // End menu block
|
if ($altok) print '<div class="blockvmenuend"></div>'; // End menu block
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -510,7 +512,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
print '</div>'."\n";
|
print '</div>'."\n";
|
||||||
print "<!-- End Bookmarks -->\n";
|
print "<!-- End Bookmarks -->\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return count($menu_array);
|
return count($menu_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -811,7 +811,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&search_status=2",$langs->trans("BillShortStatusPaid"),2,$user->rights->facture->lire);
|
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&search_status=2",$langs->trans("BillShortStatusPaid"),2,$user->rights->facture->lire);
|
||||||
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&search_status=3",$langs->trans("BillShortStatusCanceled"),2,$user->rights->facture->lire);
|
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&search_status=3",$langs->trans("BillShortStatusCanceled"),2,$user->rights->facture->lire);
|
||||||
}
|
}
|
||||||
$newmenu->add("/compta/facture/fiche-rec.php",$langs->trans("ListOfTemplates"),1,$user->rights->facture->lire);
|
$newmenu->add("/compta/facture/fiche-rec.php",$langs->trans("ListOfTemplates"),1,$user->rights->facture->creer); // No need to see recurring invoices, if user has no permission to create invoice.
|
||||||
|
|
||||||
$newmenu->add("/compta/paiement/list.php",$langs->trans("Payments"),1,$user->rights->facture->lire);
|
$newmenu->add("/compta/paiement/list.php",$langs->trans("Payments"),1,$user->rights->facture->lire);
|
||||||
|
|
||||||
@@ -1651,10 +1651,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
// Menu level > 0
|
// Menu level > 0
|
||||||
if ($menu_array[$i]['level'] > 0)
|
if ($menu_array[$i]['level'] > 0)
|
||||||
{
|
{
|
||||||
|
$cssmenu = '';
|
||||||
|
if ($menu_array[$i]['url']) $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/','',$menu_array[$i]['url']));
|
||||||
|
|
||||||
if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') // Enabled so visible, except if parent was not enabled.
|
if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') // Enabled so visible, except if parent was not enabled.
|
||||||
{
|
{
|
||||||
print '<div class="menu_contenu">'.$tabstring;
|
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring;
|
||||||
//print $lastlevel0;
|
|
||||||
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
||||||
else print '<span class="vsmenu">';
|
else print '<span class="vsmenu">';
|
||||||
print $menu_array[$i]['titre'];
|
print $menu_array[$i]['titre'];
|
||||||
@@ -1666,7 +1668,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
}
|
}
|
||||||
else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled.
|
else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled.
|
||||||
{
|
{
|
||||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class MenuManager
|
|||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 'top' || $mode == 'jmobile')
|
if ($mode == 'top' || $mode == 'jmobile')
|
||||||
{
|
{
|
||||||
if (empty($noout)) print_start_menu_array_empty();
|
if (empty($noout)) print_start_menu_array_empty();
|
||||||
@@ -98,13 +98,13 @@ class MenuManager
|
|||||||
$showmode=1;
|
$showmode=1;
|
||||||
$classname = 'class="tmenu menuhider"';
|
$classname = 'class="tmenu menuhider"';
|
||||||
$idsel='menu';
|
$idsel='menu';
|
||||||
|
|
||||||
if (empty($noout)) print_start_menu_entry($idsel,$classname,$showmode);
|
if (empty($noout)) print_start_menu_entry($idsel,$classname,$showmode);
|
||||||
if (empty($noout)) print_text_menu_entry('', 1, '#', $id, $idsel, $classname, $atarget);
|
if (empty($noout)) print_text_menu_entry('', 1, '#', $id, $idsel, $classname, $atarget);
|
||||||
if (empty($noout)) print_end_menu_entry($showmode);
|
if (empty($noout)) print_end_menu_entry($showmode);
|
||||||
$menu->add('#', '', 0, $showmode, $atarget, "xxx", '');
|
$menu->add('#', '', 0, $showmode, $atarget, "xxx", '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($noout)) print_start_menu_entry_empty($idsel, $classname, $showmode);
|
if (empty($noout)) print_start_menu_entry_empty($idsel, $classname, $showmode);
|
||||||
if (empty($noout)) print_text_menu_entry_empty($langs->trans("Home"), 1, dol_buildpath('/index.php',1).'?mainmenu=home&leftmenu=', $id, $idsel, $classname, $this->atarget);
|
if (empty($noout)) print_text_menu_entry_empty($langs->trans("Home"), 1, dol_buildpath('/index.php',1).'?mainmenu=home&leftmenu=', $id, $idsel, $classname, $this->atarget);
|
||||||
if (empty($noout)) print_end_menu_entry_empty($showmode);
|
if (empty($noout)) print_end_menu_entry_empty($showmode);
|
||||||
@@ -201,8 +201,12 @@ class MenuManager
|
|||||||
print '<div class="menu_top"></div>'."\n";
|
print '<div class="menu_top"></div>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->menu->liste[$i]['level'] > 0) {
|
if ($this->menu->liste[$i]['level'] > 0)
|
||||||
print '<div class="menu_contenu">';
|
{
|
||||||
|
$cssmenu = '';
|
||||||
|
if ($this->menu->liste[$i]['url']) $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/','',$this->menu->liste[$i]['url']));
|
||||||
|
|
||||||
|
print '<div class="menu_contenu'.$cssmenu.'">';
|
||||||
|
|
||||||
if ($this->menu->liste[$i]['enabled'])
|
if ($this->menu->liste[$i]['enabled'])
|
||||||
{
|
{
|
||||||
@@ -229,7 +233,7 @@ class MenuManager
|
|||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($altok) print '<div class="blockvmenuend"></div>';
|
if ($altok) print '<div class="blockvmenuend"></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,7 +312,7 @@ class MenuManager
|
|||||||
function print_start_menu_array_empty()
|
function print_start_menu_array_empty()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
print '<div class="tmenudiv">';
|
print '<div class="tmenudiv">';
|
||||||
print '<ul class="tmenu"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?'':' title="Top menu"').'>';
|
print '<ul class="tmenu"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?'':' title="Top menu"').'>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,10 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
|
|||||||
|
|
||||||
require_once '../main.inc.php';
|
require_once '../main.inc.php';
|
||||||
|
|
||||||
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
|
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||||
|
|
||||||
@@ -75,11 +78,11 @@ if ($conf->use_javascript_ajax && 1 == 2) // select2 is ko with jmobile
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$conf->global->MAIN_HTML5_PLACEHOLDER = 1;
|
$conf->global->MAIN_HTML5_PLACEHOLDER = 1;
|
||||||
|
|
||||||
|
|
||||||
$usedbyinclude = 1; // Used into next include
|
$usedbyinclude = 1; // Used into next include
|
||||||
include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php';
|
include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php';
|
||||||
|
|
||||||
$accesskeyalreadyassigned=array();
|
$accesskeyalreadyassigned=array();
|
||||||
foreach($arrayresult as $key => $val)
|
foreach($arrayresult as $key => $val)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2634,19 +2634,29 @@ elseif (! empty($object->id))
|
|||||||
// Create bill
|
// Create bill
|
||||||
if (! empty($conf->facture->enabled))
|
if (! empty($conf->facture->enabled))
|
||||||
{
|
{
|
||||||
if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->billed != 1)) // 2 means accepted
|
if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 7 && $object->billed != 1)) // statut 2 means approved, 7 means canceled
|
||||||
{
|
{
|
||||||
if ($user->rights->fournisseur->facture->creer)
|
if ($user->rights->fournisseur->facture->creer)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->fournisseur->commande->creer && $object->statut >= 2 && !empty($object->linkedObjectsIds['invoice_supplier']))
|
|
||||||
{
|
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Classify billed manually (need one invoice if module invoice is on, no condition on invoice if not)
|
||||||
|
if ($user->rights->fournisseur->commande->creer && $object->statut >= 2 && $object->statut != 7 && $object->billed != 1) // statut 2 means approved
|
||||||
|
{
|
||||||
|
if (empty($conf->facture->enabled))
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||||
|
}
|
||||||
|
else if (!empty($object->linkedObjectsIds['invoice_supplier']))
|
||||||
|
{
|
||||||
|
if ($user->rights->fournisseur->facture->creer)
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a remote order using WebService only if module is activated
|
// Create a remote order using WebService only if module is activated
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* removed in PHP 5.
|
|||||||
|
|
||||||
// Defini objet langs
|
// Defini objet langs
|
||||||
$langs = new Translate('..',$conf);
|
$langs = new Translate('..',$conf);
|
||||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang'));
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09'));
|
||||||
else $langs->setDefaultLang('auto');
|
else $langs->setDefaultLang('auto');
|
||||||
|
|
||||||
$bc[false]=' class="bg1"';
|
$bc[false]=' class="bg1"';
|
||||||
@@ -453,9 +453,9 @@ function pFooter($nonext=0,$setuplang='',$jscheckfunction='', $withpleasewait=0)
|
|||||||
print '<div class="nextbutton" id="nextbutton">';
|
print '<div class="nextbutton" id="nextbutton">';
|
||||||
if ($nonext == '2')
|
if ($nonext == '2')
|
||||||
{
|
{
|
||||||
print $langs->trans("ErrorFoundDuringMigration", $_SERVER["REQUEST_URI"].'&ignoreerrors=1').'<br><br>';
|
print $langs->trans("ErrorFoundDuringMigration", $_SERVER["REQUEST_URI"].'&ignoreerrors=1').'<br><br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<input type="submit" '.($nonext == '2' ? 'disabled="disabled" ':'').'value="'.$langs->trans("NextStep").' ->"';
|
print '<input type="submit" '.($nonext == '2' ? 'disabled="disabled" ':'').'value="'.$langs->trans("NextStep").' ->"';
|
||||||
if ($jscheckfunction) print ' onClick="return '.$jscheckfunction.'();"';
|
if ($jscheckfunction) print ' onClick="return '.$jscheckfunction.'();"';
|
||||||
print '></div>';
|
print '></div>';
|
||||||
|
|||||||
@@ -705,9 +705,9 @@ else
|
|||||||
$product_static->status = $obj->tosell;
|
$product_static->status = $obj->tosell;
|
||||||
$product_static->entity = $obj->entity;
|
$product_static->entity = $obj->entity;
|
||||||
|
|
||||||
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $search_type != 1) // To optimize call of load_stock
|
if ((! empty($conf->stock->enabled) && $user->rights->stock->lire && $search_type != 1) || ! empty($conf->global->STOCK_DISABLE_OPTIM_LOAD)) // To optimize call of load_stock
|
||||||
{
|
{
|
||||||
if ($obj->fk_product_type != 1) // Not a service
|
if ($obj->fk_product_type != 1 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) // Not a service
|
||||||
{
|
{
|
||||||
$product_static->load_stock('nobatch'); // Load stock_reel + stock_warehouse. This also call load_virtual_stock()
|
$product_static->load_stock('nobatch'); // Load stock_reel + stock_warehouse. This also call load_virtual_stock()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1332,7 +1332,9 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
print '<div class="divlogofpreviouscustomerprice">';
|
||||||
|
|
||||||
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
if (! $num)
|
if (! $num)
|
||||||
{
|
{
|
||||||
@@ -1475,6 +1477,8 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
print "<br>";
|
print "<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -803,11 +803,6 @@ if (empty($reshook))
|
|||||||
$price_min = $product->multiprices_min [$object->thirdparty->price_level];
|
$price_min = $product->multiprices_min [$object->thirdparty->price_level];
|
||||||
|
|
||||||
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
||||||
|
|
||||||
if ($price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min))) {
|
|
||||||
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
|
||||||
$error ++;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$type = GETPOST('type');
|
$type = GETPOST('type');
|
||||||
$label = (GETPOST('product_label') ? GETPOST('product_label') : '');
|
$label = (GETPOST('product_label') ? GETPOST('product_label') : '');
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ if (empty($conf->db->user)) $conf->db->user='';
|
|||||||
|
|
||||||
// Defini objet langs
|
// Defini objet langs
|
||||||
$langs = new Translate('..',$conf);
|
$langs = new Translate('..',$conf);
|
||||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang'));
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09'));
|
||||||
else $langs->setDefaultLang('auto');
|
else $langs->setDefaultLang('auto');
|
||||||
|
|
||||||
$bc[false]=' class="bg1"';
|
$bc[false]=' class="bg1"';
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ else header('Cache-Control: no-cache');
|
|||||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
||||||
|
|
||||||
if (GETPOST('theme','alpha')) $conf->theme=GETPOST('theme','alpha'); // If theme was forced on URL
|
if (GETPOST('theme','alpha')) $conf->theme=GETPOST('theme','alpha'); // If theme was forced on URL
|
||||||
|
if (GETPOST('lang','aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL
|
||||||
|
|
||||||
$langs->load("main",0,1);
|
$langs->load("main",0,1);
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ else header('Cache-Control: no-cache');
|
|||||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
||||||
|
|
||||||
if (GETPOST('theme','alpha')) $conf->theme=GETPOST('theme','alpha'); // If theme was forced on URL
|
if (GETPOST('theme','alpha')) $conf->theme=GETPOST('theme','alpha'); // If theme was forced on URL
|
||||||
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL
|
||||||
|
|
||||||
$langs->load("main",0,1);
|
$langs->load("main",0,1);
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||||
@@ -2360,6 +2362,15 @@ table.liste, table.noborder, table.formdoc, div.noborder {
|
|||||||
border-bottom-style: solid;
|
border-bottom-style: solid;
|
||||||
|
|
||||||
margin: 0px 0px 8px 0px;
|
margin: 0px 0px 8px 0px;
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
/*
|
||||||
|
-moz-box-shadow: 2px 2px 4px #CCC;
|
||||||
|
-webkit-box-shadow: 2px 2px 4px #CCC;
|
||||||
|
box-shadow: 2px 2px 4px #CCC;
|
||||||
|
*/
|
||||||
|
/* box-shadow: 0 0 3px rgba(0,0,0,0.16); */
|
||||||
|
>>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git
|
||||||
|
|
||||||
-moz-border-radius: 0.1em;
|
-moz-border-radius: 0.1em;
|
||||||
-webkit-border-radius: 0.1em;
|
-webkit-border-radius: 0.1em;
|
||||||
@@ -4630,7 +4641,11 @@ border-top-right-radius: 6px;
|
|||||||
}
|
}
|
||||||
@media only screen and (max-width: 767px)
|
@media only screen and (max-width: 767px)
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
.imgopensurveywizard, .imgautosize { width:95%; height: auto; }
|
.imgopensurveywizard, .imgautosize { width:95%; height: auto; }
|
||||||
|
=======
|
||||||
|
.imgopensurveywizard { width:95%; height: auto; }
|
||||||
|
>>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git
|
||||||
|
|
||||||
#tooltip {
|
#tooltip {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -1163,7 +1163,7 @@ else
|
|||||||
|
|
||||||
// Check if user has rights
|
// Check if user has rights
|
||||||
$object->getrights();
|
$object->getrights();
|
||||||
if(empty($object->nb_rights)) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
|
if (empty($object->nb_rights) && $object->statut != 0) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
|
||||||
|
|
||||||
// Connexion ldap
|
// Connexion ldap
|
||||||
// pour recuperer passDoNotExpire et userChangePassNextLogon
|
// pour recuperer passDoNotExpire et userChangePassNextLogon
|
||||||
|
|||||||
Reference in New Issue
Block a user