From b4c8822281adfaa9c3499160abdbce46381ccee1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Jul 2016 16:27:14 +0200 Subject: [PATCH] Fix style of text after ref on invoices --- htdocs/compta/facture.php | 6 +++--- htdocs/core/class/html.form.class.php | 11 +++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 14f3ea7075f..9b2d39c4487 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2930,16 +2930,16 @@ else if ($id > 0 || ! empty($ref)) // Ref print '' . $langs->trans('Ref') . ''; print ''; - $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 ''; // Ref customer diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d4267eccfb1..507f45a12f8 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.='
'; - $ret.='
'.$morehtmlleft.'
'; + if ($morehtmlleft) $ret.='
'.$morehtmlleft.'
'; $ret.='
'; @@ -5624,6 +5625,8 @@ class Form } $ret.='
'; + if ($morehtmlright) $ret.='
'.$morehtmlright.'
'; + if ($previous_ref || $next_ref || $morehtml) { $ret.=''; } - if ($morehtmlright) $ret.='
'.$morehtmlright.'
'; + if ($morehtmlstatus) $ret.='
'.$morehtmlstatus.'
'; $ret.='
'; return $ret;