diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index 75771f3d419..511bde61bcf 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -2408,7 +2408,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
if (!empty($conf->fournisseur->enabled) || !empty($conf->supplier_proposal->enabled))
{
print '
| '.$langs->trans('Supplier').' | ';
- print yn($object->fournisseur);
+ print showValueWithCopyAndPasteButton(yn($object->fournisseur),'supplier',$langs);
print ' |
';
}
@@ -2423,29 +2423,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
if ($object->client)
{
print '| ';
- print $langs->trans('CustomerCode').' | ';
- print "";
- print '';
- print $object->code_client .' | ';
+ print $langs->trans('CustomerCode');
+ print '';
+ print '';
+ print showValueWithCopyAndPasteButton($object->code_client, 'code_client',$langs);
+ print ' | ';
$tmpcheck = $object->check_codeclient();
if ($tmpcheck != 0 && $tmpcheck != -5) {
print ' ('.$langs->trans("WrongCustomerCode").')';
@@ -2957,7 +2939,43 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
}
}
-
+/**
+ * @param string $valuetoprint the value to print
+ * @param string $spanid unique id for a span
+ * @param Translate $langs the $langs variable
+ * @return string the string to print for the button
+ */
+function showValueWithCopyAndPasteButton($valuetoprint,$spanid,$langs){
+ $stringtoprint= '';
+ $stringtoprint.= $valuetoprint .' ';
+ $stringtoprint.= '';
+ $stringtoprint.='';
+ $stringtoprint.="";
+ return $stringtoprint;
+}
// End of page
llxFooter();
$db->close();
+