diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 0749d0a7645..6de51cfe7ba 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -10,6 +10,7 @@ * Copyright (C) 2014 Cedric GROSS * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> * Copyright (C) 2015-2016 Marcos GarcĂ­a + * Copyright (C) 2019 Lenin Rivas * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -2153,6 +2154,17 @@ function pdf_getLinkedObjects($object, $outputlangs) $linkedobjects[$objecttype]['date_value'] = dol_print_date($elementobject->date_contrat, 'day', '', $outputlangs); } } + else if ($objecttype == 'fichinter') + { + $outputlangs->load('interventions'); + foreach($objects as $elementobject) + { + $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("InterRef"); + $linkedobjects[$objecttype]['ref_value'] = $outputlangs->transnoentities($elementobject->ref); + $linkedobjects[$objecttype]['date_title'] = $outputlangs->transnoentities("InterDate"); + $linkedobjects[$objecttype]['date_value'] = dol_print_date($elementobject->datec, 'day', '', $outputlangs); + } + } elseif ($objecttype == 'shipping') { $outputlangs->loadLangs(array("orders", "sendings")); diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index c4a0ab64afa..6f9b9ad26b8 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -920,7 +920,7 @@ class Societe extends CommonObject } } - // Check for unicity + // Check for unicity on profid if (!$error && $vallabel && $this->id_prof_verifiable($i)) { if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0)))