diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index 313898d0667..543155e0016 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -168,14 +168,17 @@ if (isModEnabled('facture')) { print ''; print ''; - print $form->textwithpicto($langs->trans("INVOICE_ADD_SWISS_QR_CODE"), $langs->trans("INVOICE_ADD_SWISS_QR_CODEMore")); + if (getDolGlobalString('INVOICE_ADD_ZATCA_QR_CODE') == 'bottom') { + print $form->textwithpicto($langs->trans("INVOICE_ADD_SWISS_QR_CODE"), $langs->trans("INVOICE_ADD_SWISS_QR_CODEMore")); + } else { + print $langs->trans("INVOICE_ADD_SWISS_QR_CODE"); + } print ''; - //if ($conf->use_javascript_ajax) { - // print ajax_constantonoff('INVOICE_ADD_SWISS_QR_CODE'); - //} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"), 'bottom' => $langs->trans("AtBottomOfPage").' ('.$langs->trans("Experimental").' - Need PHP 8.1+)'); + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + if (getDolGlobalString('MAIN_FEATURE_LEVEL') >= 1) { + $arrval['bottom'] = $langs->trans("AtBottomOfPage").' ('.$langs->trans("Experimental").' - Need PHP 8.1+)'; + } print $form->selectarray("INVOICE_ADD_SWISS_QR_CODE", $arrval, $conf->global->INVOICE_ADD_SWISS_QR_CODE); - //} print ''; // Mention category of operations diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index a7e319f1f18..83ff8f6ba16 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -800,16 +800,22 @@ class Fichinter extends CommonObject * @param string $option Options * @param int $notooltip 1=Disable tooltip * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param string $morecss Add more css on link * @return string String with URL */ - public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $save_lastsearch_value = -1) + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $save_lastsearch_value = -1, $morecss = '') { global $conf, $langs, $hookmanager; + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } + $result = ''; $params = [ 'id' => $this->id, 'objecttype' => $this->element, + 'option' => $option, ]; $classfortooltip = 'classfortooltip'; $dataparams = ''; @@ -841,20 +847,32 @@ class Fichinter extends CommonObject $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); - $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; + $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); } - $linkstart = ''; - $linkend = ''; + if ($option == 'nolink' || empty($url)) { + $linkend = ''; + } else { + $linkend = ''; + } $result .= $linkstart; if ($withpicto) { - $result .= img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright ' : '').$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1); + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"'), 0, 0, $notooltip ? 0 : 1); } + if ($withpicto != 2) { $result .= $this->ref; } + $result .= $linkend; global $action; diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index a936b22b60a..0bdf5c16792 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -330,8 +330,8 @@ DiscountFromExcessPaid=Payments in excess of invoice %s AbsoluteDiscountUse=This kind of credit can be used on invoice before its validation CreditNoteDepositUse=Invoice must be validated to use this kind of credits NewGlobalDiscount=New absolute discount -NewSupplierGlobalDiscount=New supplier absolute discount -NewClientGlobalDiscount=New client absolute discount +NewSupplierGlobalDiscount=New absolute supplier discount +NewClientGlobalDiscount=New absolute client discount NewRelativeDiscount=New relative discount DiscountType=Discount type NoteReason=Note/Reason diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 5b7f7064c0e..11a65a351bf 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -315,7 +315,7 @@ ErrorUploadFileDragDropPermissionDenied=There was an error while the file(s) upl ErrorFixThisHere=Fix this here ErrorTheUrlOfYourDolInstanceDoesNotMatchURLIntoOAuthSetup=Error: The URL of you current instance (%s) does not match the URL defined into your OAuth2 login setup (%s). Doing OAuth2 login in such a configuration is not allowed. ErrorMenuExistValue=A Menu already exist with this Title or URL -ErrorSVGFilesNotAllowedAsLinksWithout=SVG files are not allowed as external links without option %s +ErrorSVGFilesNotAllowedAsLinksWithout=SVG files are not allowed as external links without the option %s ErrorTypeMenu=Impossible to add another menu for the same module on the navbar, not handle yet # Warnings