Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/projet/tasks/time.php
This commit is contained in:
Laurent Destailleur 2019-06-17 16:02:59 +02:00
commit 4f2d6367b8
9 changed files with 18 additions and 13 deletions

View File

@ -43,6 +43,8 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
// Load translation files required by the page
$langs->load("propal");
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc');
$total=0; $ilink=0;
foreach($linkedObjectBlock as $key => $objectlink)
{

View File

@ -39,6 +39,8 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
// Load translation files required by the page
$langs->load("orders");
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc');
$total=0; $ilink=0;
foreach($linkedObjectBlock as $key => $objectlink)
{

View File

@ -38,6 +38,8 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
$langs->load("bills");
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc');
$total=0; $ilink=0;
foreach($linkedObjectBlock as $key => $objectlink)
{

View File

@ -6480,7 +6480,7 @@ class Form
public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleImportElementsList = false)
{
global $conf,$langs,$hookmanager;
global $bc;
global $bc, $action;
$object->fetchObjectLinked();
@ -6525,6 +6525,7 @@ class Form
$showImportButton=true;
}
$regs = array();
if ($objecttype != 'supplier_proposal' && preg_match('/^([^_]+)_([^_]+)/i', $objecttype, $regs))
{
$element = $regs[1];
@ -6628,7 +6629,7 @@ class Form
public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array())
{
global $conf, $langs, $hookmanager;
global $bc;
global $bc, $action;
$linktoelem='';
$linktoelemlist='';
@ -6663,8 +6664,6 @@ class Form
);
}
global $action;
// Can complete the possiblelink array
$hookmanager->initHooks(array('commonobject'));
$parameters=array('listofidcompanytoscan' => $listofidcompanytoscan);

View File

@ -908,7 +908,7 @@ class FormCompany
$out = '<select class="flat '.$morecss.'" name="'.$htmlname.'" id="'.$htmlidname.'">';
if ($typeinput=='form') {
if ($selected == '') $out .= '<option value="-1">&nbsp;</option>';
if ($selected == '' || $selected == '-1') $out .= '<option value="-1">&nbsp;</option>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
$out .= '<option value="2"'.($selected==2?' selected':'').'>'.$langs->trans('Prospect').'</option>';
}
@ -920,7 +920,7 @@ class FormCompany
}
$out .= '<option value="0"'.((string) $selected == '0'?' selected':'').'>'.$langs->trans('NorProspectNorCustomer').'</option>';
} elseif ($typeinput=='list') {
$out .= '<option value="-1"'.($selected==''?' selected':'').'>&nbsp;</option>';
$out .= '<option value="-1"'.(($selected=='' || $selected == '-1')?' selected':'').'>&nbsp;</option>';
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
$out .= '<option value="1,3"'.($selected=='1,3'?' selected':'').'>'.$langs->trans('Customer').'</option>';
}

View File

@ -1285,7 +1285,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&amp;leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->rights->accounting->mouvements->lire);
// Files
if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2)
if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 1)
{
$newmenu->add("/compta/compta-files.php?mainmenu=accountancy&amp;leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->rights->accounting->mouvements->lire);
}

View File

@ -667,7 +667,7 @@ elseif ($id > 0 || ! empty($ref))
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$title=$langs->trans("ListOfTasks");
$linktotasks = dolGetButtonTitle($langs->trans('GoToGanttView'), '', 'fa fa-calendar-minus-o', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1');
$linktotasks = dolGetButtonTitle($langs->trans('GoToGanttView'), '', 'fa fa-calendar-minus-o paddingleft', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1');
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1);
print load_fiche_titre($title, $linktotasks.' &nbsp; '.$linktocreatetask, 'title_generic.png');

View File

@ -582,7 +582,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$linktocreatetimeBtnStatus = 0;
$linktocreatetimeUrl = '';
$linktocreatetimeHelpText = '';
if ($user->rights->projet->all->lire || $user->rights->projet->lire)
if ($user->rights->projet->all->lire || $user->rights->projet->lire) // To enter time, read permission is enough
{
if ($projectstatic->public || $userRead > 0)
{

View File

@ -952,10 +952,10 @@ else
$object->name = GETPOST('name', 'alpha');
$object->firstname = GETPOST('firstname', 'alpha');
$object->particulier = $private;
$object->prefix_comm = GETPOST('prefix_comm');
$object->client = GETPOST('client')?GETPOST('client'):$object->client;
$object->prefix_comm = GETPOST('prefix_comm', 'alpha');
$object->client = GETPOST('client', 'int')?GETPOST('client', 'int'):$object->client;
if(empty($duplicate_code_error)) {
if (empty($duplicate_code_error)) {
$object->code_client = GETPOST('customer_code', 'alpha');
$object->fournisseur = GETPOST('fournisseur')?GETPOST('fournisseur'):$object->fournisseur;
}
@ -1187,7 +1187,7 @@ else
// Prospect/Customer
print '<tr><td class="titlefieldcreate">'.$form->editfieldkey('ProspectCustomer', 'customerprospect', '', $object, 0, 'string', '', 1).'</td>';
print '<td class="maxwidthonsmartphone">';
$selected=GETPOST('client', 'int')!=''?GETPOST('client', 'int'):$object->client;
$selected=(GETPOSTISSET('client', 'int')?GETPOST('client', 'int'):$object->client);
print $formcompany->selectProspectCustomerType($selected);
print '</td>';