From 7e80505104ded651f1753be41985279e85a68141 Mon Sep 17 00:00:00 2001 From: De Coninck Laurent Date: Fri, 24 Feb 2017 13:49:34 +0100 Subject: [PATCH] prepend the author firstname and lastname for ER ref Instead of using the validator of the ER use the author firstname and last name. This is not always the case as soon ass someone can create ER for someone else --- htdocs/expensereport/class/expensereport.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 4a6c9df691e..e50623a99b0 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -958,7 +958,7 @@ class ExpenseReport extends CommonObject { $prefix="ER"; if (! empty($conf->global->EXPENSE_REPORT_PREFIX)) $prefix=$conf->global->EXPENSE_REPORT_PREFIX; - $this->ref = strtoupper($fuser->login).$expld_car.$prefix.$this->ref.$expld_car.dol_print_date($this->date_debut,'%y%m%d'); + $this->ref = str_replace(' ','_', $this->user_author_infos).$expld_car.$prefix.$this->ref.$expld_car.dol_print_date($this->date_debut,'%y%m%d'); } require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // We rename directory in order to avoid losing the attachments