diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 9500dd02a58..2f1eee2c9b2 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -390,15 +390,6 @@ class Invoices extends DolibarrApi { throw new RestException(405, $this->invoice->error); } - - /*$result = $this->invoice->fetch($id); - - $this->invoice->getLinesArray(); - $result = array(); - foreach ($this->invoice->lines as $line) { - array_push($result,$this->_cleanObjectDatas($line)); - }*/ - return $result; } /** diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 38da587cef0..7d1bdfd693d 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1278,7 +1278,7 @@ function dol_get_fiche_end($notab=0) * Show tab footer of a card. * Note: $object->next_prev_filter can be set to restrict select to find next or previous record by $form->showrefnav. * - * @param object $object Object to show + * @param Object $object Object to show * @param string $paramid Name of parameter to use to name the id into the URL next/previous link * @param string $morehtml More html content to output just before the nav bar * @param int $shownav Show Condition (navigation is shown if value is 1) diff --git a/htdocs/expedition/class/api_shipments.class.php b/htdocs/expedition/class/api_shipments.class.php index 23d4e284484..9857b90c84c 100644 --- a/htdocs/expedition/class/api_shipments.class.php +++ b/htdocs/expedition/class/api_shipments.class.php @@ -155,6 +155,7 @@ class Shipments extends DolibarrApi { $num = $db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); + $i=0; while ($i < $min) { $obj = $db->fetch_object($result); diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index a656eaa68b9..1dfc3c21481 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -607,8 +607,11 @@ class Entrepot extends CommonObject $linkstart.=$linkclose.'>'; $linkend=''; - if ($withpicto) $result.=($link.img_object(($notooltip?'':$label), 'stock', ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend.' '); - $result.=$linkstart.($showfullpath ? $this->get_full_arbo() : (empty($this->label)?$this->libelle:$this->label)).$linkend; + $result .= $linkstart; + if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1); + if ($withpicto != 2) $result.= ($showfullpath ? $this->get_full_arbo() : (empty($this->label)?$this->libelle:$this->label)); + $result .= $linkend; + return $result; } diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index b34a656422c..fe6731f10df 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -483,7 +483,6 @@ class Productlot extends CommonObject global $dolibarr_main_authentication, $dolibarr_main_demo; global $menumanager; - $result = ''; $label = '' . $langs->trans("Batch") . ''; @@ -498,18 +497,39 @@ class Productlot extends CommonObject $label.= '
' . $langs->trans('SellByDate') . ': ' . dol_print_date($this->sellby, 'day'); } - $link = 'id; - if ($withpicto) + if ($option != 'nolink') { - $result.=($link.img_object(($notooltip?'':$label), 'barcode', ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend); - if ($withpicto != 2) $result.=' '; - } - $result.= $link . $this->batch . $linkend; - return $result; + // Add param to save lastsearch_values or not + $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1; + if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1'; + } + + $linkclose=''; + if (empty($notooltip)) + { + if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label=$langs->trans("ShowMyObject"); + $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose.=' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose.=' class="classfortooltip'.($morecss?' '.$morecss:'').'"'; + } + else $linkclose = ($morecss?' class="'.$morecss.'"':''); + + $linkstart = ''; + $linkend=''; + + $result .= $linkstart; + if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1); + if ($withpicto != 2) $result.= $this->batch; + $result .= $linkend; + + return $result; } diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index df4486bf14f..046b3179506 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -865,6 +865,12 @@ if ($resql) { $objp = $db->fetch_object($resql); + $userstatic->id=$objp->fk_user_author; + $userstatic->login=$objp->login; + $userstatic->lastname=$objp->lastname; + $userstatic->firstname=$objp->firstname; + $userstatic->photo=$objp->photo; + $productstatic->id=$objp->rowid; $productstatic->ref=$objp->product_ref; $productstatic->label=$objp->produit; @@ -942,11 +948,6 @@ if ($resql) if (! empty($arrayfields['m.fk_user_author']['checked'])) { print ''; - $userstatic->id=$objp->fk_user_author; - $userstatic->login=$objp->login; - $userstatic->lastname=$objp->lastname; - $userstatic->firstname=$objp->firstname; - $userstatic->photo=$objp->photo; print $userstatic->getNomUrl(-1); print "\n"; }