diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php index 9e508985c2f..63f8df2b563 100644 --- a/htdocs/api/class/api_documents.class.php +++ b/htdocs/api/class/api_documents.class.php @@ -596,8 +596,10 @@ class Documents extends DolibarrApi } elseif (is_array($ecmfile->lines) && count($ecmfile->lines) > 0) { $count = count($filearray); for ($i = 0 ; $i < $count ; $i++) { - if ($filearray[$i]['name'] == $ecmfile->lines[$i]->filename) { - $filearray[$i] = array_merge($filearray[$i], (array) $ecmfile->lines[0]); + foreach ($ecmfile->lines as $line) { + if ($filearray[$i]['name'] == $line->filename) { + $filearray[$i] = array_merge($filearray[$i], (array) $line); + } } } } diff --git a/htdocs/langs/en_US/contracts.lang b/htdocs/langs/en_US/contracts.lang index af909337ce7..7eb3335cd8f 100644 --- a/htdocs/langs/en_US/contracts.lang +++ b/htdocs/langs/en_US/contracts.lang @@ -47,6 +47,7 @@ DateContract=Contract date DateServiceActivate=Service activation date ListOfServices=List of services ListOfInactiveServices=List of not active services +ListOfNotExpiredServices=List of unexpired active services ListOfExpiredServices=List of expired active services ListOfClosedServices=List of closed services ListOfRunningServices=List of running services diff --git a/htdocs/langs/fr_FR/contracts.lang b/htdocs/langs/fr_FR/contracts.lang index 9337aa4240c..704f13b0917 100644 --- a/htdocs/langs/fr_FR/contracts.lang +++ b/htdocs/langs/fr_FR/contracts.lang @@ -47,6 +47,7 @@ DateContract=Date contrat DateServiceActivate=Date activation du service ListOfServices=Liste des services ListOfInactiveServices=Liste des services inactifs +ListOfNotExpiredServices=Liste des services actifs non expirés ListOfExpiredServices=Liste des services actifs expirés ListOfClosedServices=Liste des services fermés ListOfRunningServices=Liste des services actifs diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index d6d3eba7c98..3a758238062 100755 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -219,6 +219,7 @@ if (empty($reshook)) { $db->begin(); $getRef = GETPOST("ref", 'alphanohtml'); + $test = new Ticket($db); if ($test->fetch('', $getRef) > 0) { $object->ref = $object->getDefaultRef();