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

This commit is contained in:
Laurent Destailleur 2018-05-18 11:38:26 +02:00
commit fa7f81c828
3 changed files with 10 additions and 4 deletions

View File

@ -86,7 +86,7 @@ $tablib[35]= "DictionaryAccountancyJournal";
// Requests to extract data // Requests to extract data
$tabsql=array(); $tabsql=array();
$tabsql[35]= "SELECT a.rowid as rowid, a.code as code, a.label, a.nature, a.active FROM ".MAIN_DB_PREFIX."accounting_journal as a WHERE a.entity=".$conf->entity; $tabsql[35]= "SELECT a.rowid as rowid, a.code as code, a.label, a.nature, a.active FROM ".MAIN_DB_PREFIX."accounting_journal as a";
// Criteria to sort dictionaries // Criteria to sort dictionaries
$tabsqlsort=array(); $tabsqlsort=array();
@ -102,7 +102,7 @@ $tabfieldvalue[35]= "code,label,nature";
// Nom des champs dans la table pour insertion d'un enregistrement // Nom des champs dans la table pour insertion d'un enregistrement
$tabfieldinsert=array(); $tabfieldinsert=array();
$tabfieldinsert[35]= "code,label,nature,entity"; $tabfieldinsert[35]= "code,label,nature";
// Nom du rowid si le champ n'est pas de type autoincrement // Nom du rowid si le champ n'est pas de type autoincrement
// Example: "" if id field is "rowid" and has autoincrement on // Example: "" if id field is "rowid" and has autoincrement on

View File

@ -303,6 +303,7 @@ if ($id > 0 || ! empty($ref))
// Project // Project
if (empty($withproject)) if (empty($withproject))
{ {
$result=$projectstatic->fetch($object->fk_project);
$morehtmlref.='<div class="refidno">'; $morehtmlref.='<div class="refidno">';
$morehtmlref.=$langs->trans("Project").': '; $morehtmlref.=$langs->trans("Project").': ';
$morehtmlref.=$projectstatic->getNomUrl(1); $morehtmlref.=$projectstatic->getNomUrl(1);
@ -310,7 +311,11 @@ if ($id > 0 || ! empty($ref))
// Third party // Third party
$morehtmlref.=$langs->trans("ThirdParty").': '; $morehtmlref.=$langs->trans("ThirdParty").': ';
$morehtmlref.=$projectstatic->thirdparty->getNomUrl(1); if($projectstatic->socid>0) {
$projectstatic->fetch_thirdparty();
$morehtmlref.=$projectstatic->thirdparty->getNomUrl(1);
}
$morehtmlref.='</div>'; $morehtmlref.='</div>';
} }

View File

@ -568,7 +568,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$contactsoftask=$object->getListContactId('internal'); $contactsoftask=$object->getListContactId('internal');
if (count($contactsoftask)>0) if (count($contactsoftask)>0)
{ {
$userid=$contactsoftask[0]; if(in_array($user->id, $contactsoftask)) $userid = $user->id;
else $userid=$contactsoftask[0];
print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsoftask, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToTheTask"), 'maxwidth200'); print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsoftask, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToTheTask"), 'maxwidth200');
} }
else else