forked from Wavyzz/dolibarr
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop6
This commit is contained in:
@@ -239,7 +239,7 @@ function show_array_actions_to_do($max=5)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("LastActionsToDo",$max).'</td>';
|
||||
print '<td colspan="2" align="right"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=todo">'.$langs->trans("FullList").'</a>';
|
||||
print '<td colspan="2" align="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=todo">'.$langs->trans("FullList").'</a>';
|
||||
print '</tr>';
|
||||
|
||||
$var = true;
|
||||
@@ -336,7 +336,7 @@ function show_array_last_actions_done($max=5)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("LastDoneTasks",$max).'</td>';
|
||||
print '<td colspan="2" align="right"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=done">'.$langs->trans("FullList").'</a>';
|
||||
print '<td colspan="2" align="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=done">'.$langs->trans("FullList").'</a>';
|
||||
print '</tr>';
|
||||
$var = true;
|
||||
$i = 0;
|
||||
|
||||
@@ -1071,6 +1071,12 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
|
||||
$morehtmlstatus.=$tmptxt;
|
||||
}
|
||||
elseif ($object->element == 'loan')
|
||||
{
|
||||
$tmptxt=$object->getLibStatut(6, $object->totalpaye);
|
||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
|
||||
$morehtmlstatus.=$tmptxt;
|
||||
}
|
||||
elseif ($object->element == 'contrat')
|
||||
{
|
||||
if ($object->statut==0) $morehtmlstatus.=$object->getLibStatut(2);
|
||||
@@ -1082,7 +1088,8 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
$morehtmlstatus.=$tmptxt;
|
||||
}
|
||||
if (! empty($object->name_alias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>'; // For thirdparty
|
||||
if (! empty($object->label)) $morehtmlref.='<div class="refidno">'.$object->label.'</div>'; // For product
|
||||
if ($object->element == 'product' && ! empty($object->label)) $morehtmlref.='<div class="refidno">'.$object->label.'</div>';
|
||||
|
||||
if ($object->element != 'product')
|
||||
{
|
||||
$morehtmlref.='<div class="refidno">';
|
||||
@@ -1096,7 +1103,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
$morehtmlref.='</div>';
|
||||
}
|
||||
|
||||
print '<div class="'.($onlybanner?'':'arearef ').'heightref valignmiddle" width="100%">';
|
||||
print '<div class="'.($onlybanner?'arearefnobottom ':'arearef ').'heightref valignmiddle" width="100%">';
|
||||
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlstatus, $morehtmlright);
|
||||
print '</div>';
|
||||
print '<div class="underrefbanner clearboth"></div>';
|
||||
|
||||
@@ -2007,13 +2007,14 @@ function getElementProperties($element_type)
|
||||
|
||||
/**
|
||||
* Fetch an object from its id and element_type
|
||||
* Inclusion classes is automatic
|
||||
* Inclusion of classes is automatic
|
||||
*
|
||||
* @param int $element_id Element id
|
||||
* @param string $element_type Element type
|
||||
* @param ref $element_ref Element ref (Use this if element_id but not both)
|
||||
* @return int|object object || 0 || -1 if error
|
||||
*/
|
||||
function fetchObjectByElement($element_id, $element_type)
|
||||
function fetchObjectByElement($element_id, $element_type, $element_ref='')
|
||||
{
|
||||
global $conf;
|
||||
global $db,$conf;
|
||||
@@ -2023,11 +2024,11 @@ function fetchObjectByElement($element_id, $element_type)
|
||||
{
|
||||
dol_include_once('/'.$element_prop['classpath'].'/'.$element_prop['classfile'].'.class.php');
|
||||
|
||||
$objectstat = new $element_prop['classname']($db);
|
||||
$ret = $objectstat->fetch($element_id);
|
||||
$objecttmp = new $element_prop['classname']($db);
|
||||
$ret = $objecttmp->fetch($element_id, $element_ref);
|
||||
if ($ret >= 0)
|
||||
{
|
||||
return $objectstat;
|
||||
return $objecttmp;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user