diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 14f3ea7075f78b4491583126a3800c945b8a7ecb..9b2d39c448759860cd442c159ab9c98fcb1a1278 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2930,16 +2930,16 @@ else if ($id > 0 || ! empty($ref)) // Ref print '<tr><td width="20%">' . $langs->trans('Ref') . '</td>'; print '<td colspan="5">'; - $morehtmlref = ''; + $morehtmlright = ''; $discount = new DiscountAbsolute($db); $result = $discount->fetch(0, $object->id); if ($result > 0) { - $morehtmlref = ' (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')'; + $morehtmlright = ' (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')'; } if ($result < 0) { dol_print_error('', $discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', '', '', 0, '', '', $morehtmlright); print '</td></tr>'; // Ref customer diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d4267eccfb1ac6cd161d529f92da9c0290f5d568..507f45a12f8b48e8af3d1b60a647d92803982171 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5582,10 +5582,11 @@ class Form * @param string $moreparam More param to add in nav link url. * @param int $nodbprefix Do not include DB prefix to forge table name * @param string $morehtmlleft More html code to show before ref - * @param string $morehtmlright More html code to show before navigation arrows + * @param string $morehtmlstatus More html code to show under navigation arrows (status place) + * @param string $morehtmlright More html code to show after ref * @return string Portion HTML avec ref + boutons nav */ - function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlright='') + function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlstatus='',$morehtmlright='') { global $langs,$conf; @@ -5604,7 +5605,7 @@ class Form //print "xx".$previous_ref."x".$next_ref; $ret.='<div style="vertical-align: middle">'; - $ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>'; + if ($morehtmlleft) $ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>'; $ret.='<div class="inline-block floatleft valignmiddle refid'.(($shownav && ($previous_ref || $next_ref))?' refidpadding':'').'">'; @@ -5624,6 +5625,8 @@ class Form } $ret.='</div>'; + if ($morehtmlright) $ret.='<div class="inline-block floatleft">'.$morehtmlright.'</div>'; + if ($previous_ref || $next_ref || $morehtml) { $ret.='<div class="pagination"><ul>'; @@ -5641,7 +5644,7 @@ class Form { $ret.='</ul></div>'; } - if ($morehtmlright) $ret.='<div class="statusref">'.$morehtmlright.'</div>'; + if ($morehtmlstatus) $ret.='<div class="statusref">'.$morehtmlstatus.'</div>'; $ret.='</div>'; return $ret;