$reg = array(); preg_match('/\\((.+)\\)/i', $objp->label, $reg); // Si texte entoure de parenthese on tente recherche de traduction if ($reg[1] && $langs->transnoentitiesnoconv($reg[1]) != $reg[1]) { $description = $langs->transnoentitiesnoconv($reg[1]); } else { $description = $objp->label; } /* * Ajout les liens (societe, company...) */ $links = $acct->get_url($objp->rowid); foreach ($links as $key => $val) { if ($links[$key]['type'] == 'payment') { $paymentstatic->fetch($links[$key]['url_id']); $tmparray = $paymentstatic->getBillsArray(''); foreach ($tmparray as $key => $val) { $invoicestatic->fetch($val); if ($accountelem) { $accountelem .= ', '; } $accountelem .= $invoicestatic->ref; } } elseif ($links[$key]['type'] == 'payment_supplier') { $paymentsupplierstatic->fetch($links[$key]['url_id']); $tmparray = $paymentsupplierstatic->getBillsArray(''); foreach ($tmparray as $key => $val) { $invoicesupplierstatic->fetch($val); if ($accountelem) { $accountelem .= ', '; }