diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 255d4dcf453..873b375496e 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -2247,13 +2247,11 @@ function pdf_getLinkedObjects(&$object, $outputlangs) } elseif ($objecttype == 'commande' || $objecttype == 'supplier_order') { $outputlangs->load('orders'); - if (count($objects) > 1 && count($objects) <= (getDolGlobalInt("MAXREFONDOC") ? getDolGlobalInt("MAXREFONDOC") : 5)) { - $object->note_public .= dol_concatdesc($object->note_public, '
'.$outputlangs->transnoentities("RefOrder").' :
'); + if (count($objects) > 1 && count($objects) <= (getDolGlobalInt("MAXREFONDOC") ? getDolGlobalInt("MAXREFONDOC") : 10)) { + $object->note_public = dol_concatdesc($object->note_public, '
'.$outputlangs->transnoentities("RefOrder").' :
'); foreach ($objects as $elementobject) { - $object->note_public .= dol_concatdesc($object->note_public, $outputlangs->transnoentities($elementobject->ref).($elementobject->ref_client ? ' ('.$elementobject->ref_client.')' : '').($elementobject->ref_supplier ? ' ('.$elementobject->ref_supplier.')' : '').' '); - $object->note_public .= dol_concatdesc($object->note_public, $outputlangs->transnoentities("OrderDate").' : '); - $object->note_public .= dol_concatdesc($object->note_public, dol_print_date($elementobject->date, 'day', '', $outputlangs)); - $object->note_public .= dol_concatdesc($object->note_public, '
'); + $object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities($elementobject->ref).($elementobject->ref_client ? ' ('.$elementobject->ref_client.')' : '').($elementobject->ref_supplier ? ' ('.$elementobject->ref_supplier.')' : '').' '); + $object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities("OrderDate").' : '.dol_print_date($elementobject->date, 'day', '', $outputlangs).'
'); } } elseif (count($objects) == 1) { $elementobject = array_shift($objects); @@ -2283,8 +2281,11 @@ function pdf_getLinkedObjects(&$object, $outputlangs) if (count($objects) > 1) { $order = null; - if (empty($object->linkedObjects['commande']) && $object->element != 'commande') $object->note_public .= dol_concatdesc($object->note_public, '
'.$outputlangs->transnoentities("RefOrder").' / '.$outputlangs->transnoentities("RefSending").' :
'); - else $object->note_public .= dol_concatdesc($object->note_public, '
'.$outputlangs->transnoentities("RefSending").' :
'); + if (empty($object->linkedObjects['commande']) && $object->element != 'commande') { + $object->note_public = dol_concatdesc($object->note_public, '
'.$outputlangs->transnoentities("RefOrder").' / '.$outputlangs->transnoentities("RefSending").' :
'); + } else { + $object->note_public = dol_concatdesc($object->note_public, '
'.$outputlangs->transnoentities("RefSending").' :
'); + } // We concat this record info into fields xxx_value. title is overwrote. foreach ($objects as $elementobject) { if (empty($object->linkedObjects['commande']) && $object->element != 'commande') { // There is not already a link to order and object is not the order, so we show also info with order @@ -2300,12 +2301,12 @@ function pdf_getLinkedObjects(&$object, $outputlangs) } if (! is_object($order)) { - $object->note_public .= dol_concatdesc($object->note_public, $outputlangs->transnoentities($elementobject->ref)); - $object->note_public .= dol_concatdesc($object->note_public, '
'); + $object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities($elementobject->ref)); + $object->note_public = dol_concatdesc($object->note_public, '
'); } else { - $object->note_public .= dol_concatdesc($object->note_public, $outputlangs->convToOutputCharset($order->ref).($order->ref_client ? ' ('.$order->ref_client.')' : '')); - $object->note_public .= dol_concatdesc($object->note_public, ' / '.$outputlangs->transnoentities($elementobject->ref)); - $object->note_public .= dol_concatdesc($object->note_public, '
'); + $object->note_public = dol_concatdesc($object->note_public, $outputlangs->convToOutputCharset($order->ref).($order->ref_client ? ' ('.$order->ref_client.')' : '')); + $object->note_public = dol_concatdesc($object->note_public, ' / '.$outputlangs->transnoentities($elementobject->ref)); + $object->note_public = dol_concatdesc($object->note_public, '
'); } } } elseif (count($objects) == 1) { diff --git a/htdocs/datapolicy/class/datapolicy.class.php b/htdocs/datapolicy/class/datapolicy.class.php index a7ed08d7e6f..7d53020ce3a 100644 --- a/htdocs/datapolicy/class/datapolicy.class.php +++ b/htdocs/datapolicy/class/datapolicy.class.php @@ -269,11 +269,11 @@ class DataPolicy $actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; if ($message) { if ($sendtocc) { - $actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".$sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".$sendtocc); } - $actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic').": ".$subject); - $actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody').":"); - $actionmsg .= dol_concatdesc($actionmsg, $message); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic').": ".$subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody').":"); + $actionmsg = dol_concatdesc($actionmsg, $message); } // Send mail @@ -343,11 +343,11 @@ class DataPolicy $actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; if ($message) { if ($sendtocc) { - $actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".$sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".$sendtocc); } - $actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic').": ".$subject); - $actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody').":"); - $actionmsg .= dol_concatdesc($actionmsg, $message); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic').": ".$subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody').":"); + $actionmsg = dol_concatdesc($actionmsg, $message); }